A distributed computer energy management and control system

A distributed computer energy management and control system

CoatrolEag.Practice,VoL 1, No. 3, pp. 469-478, 1993 0967-0661/93 $6.00 + 0.00 © 1993 Pergamon Press Lid Printed in Gze~t Britain. All rights zesezve...

781KB Sizes 13 Downloads 118 Views

CoatrolEag.Practice,VoL 1, No. 3, pp. 469-478, 1993

0967-0661/93 $6.00 + 0.00 © 1993 Pergamon Press Lid

Printed in Gze~t Britain. All rights zesezved.

A DISTRIBUTED COMPUTER ENERGY MANAGEMENT AND CONTROL SYSTEM M. Wu, D.Y. Shen, L.C. Rap andW.H. Gul Department of Automatic Control Engineering, CentralSouth University of Technology, Changsha, Hunan, 410083, P.R.China

Abstract. A distributedcomputer energy management and control system (DCEMCS) has been establishedin a nonferrous metal smeltery.It consistsof central computer system, local area computer system, real-time baseband localarea network, and measurement and control mechanism. This paper presentsthe theory and techniques applied to the system design,especiallythe hardware architectureand the main functionsof D C E M CS, the hierarchicalconfiguration and the dynamic coordination algorithm based on two levelcomputers, the real-time local area network technique and the programming method, the distributeddesign technique for the applied software and the basic idea of designing and managing the energy database. Key Words. energy management; real-time computer systems; distributed control; hierarchical systems; local area networks; computer communication; programming; energy database design

1. I N T R O D U C T I O N

This paper introduces a distributed computer energy management and control system (DCEMCS), which has been used in a nonferrous metal smeltery. Energy consumed in the smeltery includes electricity, coal, oil, coke, water, steam, compressed air, etc., where electricity is over 5 0 % of overall energy consumption. D C E M C S completed the on-line management for all energy of the smeltery and real-time control for the electrical load of a power supply system. This paper presents the theory and technique used in the system design.

Since the scale of production is expanding and the consumption of energy is increasing, it is important to develop a way of managing and controlling energy. Recent advances in automatic control theory, management science and computer techniques provided the means for management and control of industrial energy. Computers can be used to manage and control energy. In the early 1980s, a lot of factories and enterprises had established ccntralized or distributed computer cncrgy management systems to modernize energy management (Ishii, Takcsue and Kashiwaki, 1982). However, there still exist a number of problems, for instance, on-line managcmcnt and real-time control for industrial energy of large factories or enterprises with dcccntralizcd fields. These problems must bc solved. In recent years, the distributed computer control system ( D C C S ) has been heavily studied and applied. D C C S can in m a n y aspects be considered as a more advanced alternative to centralized computer control systems. It is possible to implement scientific management and effective control for industrial energy by using the theory and technique of D C C S .

First, the hardware architecture and the main functions of D C E M C S are described. Second, a hierarchical configuration of the electrical load control system is explained and a dynamic coordination algorithm is expressed in detail. Third, the local area network (LAN) technique and the programming method applied to real-time data communication are discussed. Fourth, a practical application of the distributed software design technique based on modular programming is expounded, as well as a basic idea of designing and managing the energy database by using the relational data mode. Finally, conclusions are 469

470

M. Wu et al.

given in thispaper.

2. T H E D I S T R I B U T E D A R C H I T E C T U R E AND T H E S Y S T E M F U N C T I O N S The three most commonly used topologies of D C C S are the star, the ring and the global data bus. The distributed architecture has many advantages, such as high reliability, strong fiexibility and extensibility, etc. (Wang and Yang, 1986). Of cause, in the case of DCCS, there certainly appear to be specificproblems, such as allottingfunctional tasks to computers and physically organizing communication between tasks executing in different computers, which must be considered in the system design. It is important to consider the practical application environments and the main functions of the control system in selecting a topology for the D C C S . Real-time data communication is a basic requirement for completing on-line energy management and control. For these requirements, D C E M C S uses a distributed architecture, shown in Fig.l, which consists of central computer system, local area computcr system, real-time baseband L A N , and measurement and control mechanism. 2.1. The Hardware Architcture The central computer system consists of three IBM P C / X T personal computers, which are used as real-time monitoring computer (RTMC), data management computer (DMC) and energy dispatching computer (EDC) respectively. R T M C , D M C and E D C are connected by a ring local area network. The hardware constituents of each o f R T M C , D M C and EDC arc as follows: (1) A basic model IBM PC / XT personal computer including 640KB of random access memory (RAM), where the C P U is an Intel 8088 microprocessor. (2) A 5.25-inch floppy disk drive and its interface adaptor for a standard 360KB diskette. (3) A 20MB hard disk as well as its interface adaptor and drive. (4) A 101-key IBM keyboard (KB). (5) A 14-inch c o l o r / g r a p h i c s monitor (CGM) and its interface adaptor. (6) A 24-pin line printer (LP) and its parallel adaptor. (7) IBM scrial asynchronous communication adaptor (four ports in R T M C , two ports

in both D M C and EDC). (8) A timer interrupt board for real-time data communication. R T M C can be connected with sixteen local area computers (LAC1, LAC2 ..... LAC16) by a star local area network, where ten local area computers are used to collect energy information, a local area computer is used to control electrical load and the other five local area computers are spare. Each o f the ten local area computers collecting energy information consists of different kinds of module on the S-100 bus. In particular, their hardware constituents are as follows: (1) An SC-801C main board, where the C P U is a Z - g 0 microprocessor. (2) An MS-0801 32-channel A / D conversion board. (3) An MS-3101 A / D multiplexer board up to 96-channel. (4) An M S - 2 1 0 2 t i m e r / s e r i a l / p a r a l l e l interface board including Z S 0 - C T C , ZS0-SIO and Z 8 0 - P I O . (5) A 3 0 - k e y microkeyboard(MKB) with an LED display. The local area computer controlling the electrical load is essentially an IBM PC personal computer with similar hardware constituents to R T M C , D M C and EDC, which together with ten industrial control computers (CPU is Z - 8 0 microprocessor) construct an electrical load control system with two levels of computers. The real-time baseband L A N uses type M R D S - 1 (from one node to eight nodes) and type R D S - 1 (from one node to one node) long-line serial communication adaptors to achieve long-distance data transmission. In D C E M C S , the transmission distance of all baseband signals can be up to 9.8 kilometres under 9600bps. The data communication interface (DCI) and Wiring concentrator (WCT) are for data communication between, computers, which contain IBM serial asynchronous communication adapters (SACA) or the serial port of MS-2102 t i m e r / s e r i a l / p a r a l l e l interface boards, as well as type R D S - 1 or type M R D S - 1 long-line serial communication adaptors. In the measurement and control mechanism, the measurement interfaces (MI) convert different kinds o f engineering signals in the ener-

471

DCEMCS 5("

,

~40L('

. . . .

I

MS -2102

R I'ML.

i

R

?

--~

I

I " ~

i . . . . . .

:

I

I

I

i

I _

~

!

....... MS-0801

_1

State input

Y

Digital signals Weight Water levcl

I

[- !32

CuFrent

33 Gas flow 4 Pressure

Ml

;

___j

Fig .2. n0,gy O,oc0,,

Fig.1.

The block diagram of D C E M C S architecture

gy process to voltage signals of 0 ~ 5V, current signals of 0 ~ 1 0 m A / 4 ~ 2 0 m A or digital signals, and control interfaces (CI) transfer control c o m m a n d from computer to controlled process. The connections between the local area computer collectingdifferentkinds of energy data and the measured signals is shown in Fig.2. 2.2. The Main Functions D C E M C S can complete on-line energy management for the smeltery and realize real-time automatic control for a local area. The main functions of D C E M C S are as follows: (1) On-line measuring of different kinds of energy data, such as power, voltage, current, temperature, pressure, flow, water level, weight and material components. (2) Real-time centralized monitoring of energy information, used in two ways, i.e., display of instantaneous values of 2048 energy parameters in 228 frames of pictures and display of 40 analogue pictures with 1200 on-line energy parameters. (3) Automatic control of the electrical load of a power supply system, which implements the full use of power allowed by the local power authority, such that the utilization factor is over 99% and the peak load is controlled to within 100.5% of the given value,

MS-3101

~_jj

Temperature 128

!_

The connections between the local area computer and measured signals

lasting not longer than 15 minutes. (4) Automatic warning of D C E M C S trouble, energy parameters exceeding the bounds of given values and large power equipment breakdown, etc.. (5) Printing of reports and load curves with Chinese characters, showing all energy consumption statistics. (6) Energy information management, such as accumulation, reservation, statistics, classification and query for all energy data, as well as efficiency analysis and cost estimates for some industrial energy. (7) Energy dispatching decision guide, which provides reasons and tactics of dispatching energy for the dispatcher. For example, the assigned values of three independent power systems in a day can be provided on the C G M of the E D C and transferred from the E D C to the electrical load control system to control electrical load under new power inputs. (8) Extensible and alterable functions. These tasks are alloted to R T M C , D M C , E D C and each local area computer in advance.

3. H I E R A R C H I C A L C O N T R O L OF ELECTRICAL LOAD The power supply system provides electrical power for three electrolysis processes of Cu, Pb and Zn and various power equipment such as air-blower, w a t e r - p u m p and light. Of the

472

M. Wu et al.

overall electrical load of the smeltery, the electrical load of the three electrolysis processes is about 70%, while the other power equipment uses about 30%. The former is called the controllable load; it can be controlled by 10 three-phase transistor converters (SCRI, SCR2, --- , SCR10). The latter is the uncontrollable load and varies with time. From the inherent properties of the electrolysis processes of Cu, Pb and Zn, it is possible to control the overall electrical load to a required value by regulating the controllable load when the uncontrollable load varies. For example, AP of the controllable load can be decreased when the uncontrollable load increases AP and vice versa (Shen and Wu, 1990). In the power supply system, three independent power incoming wirings come from different powerplants. Now, the control objective is to guarantee that the overall electrical load should follow a given value and therefore the associated given power values assigned to the three electrolysisprocesses should be changed according to the uncontrollable load. For this purpose, an electricalload control system with two levels of computers in the supply workshop was established. 3.1. The Hierarchical Configuration To stably, reasonably and effectively control the power supply system, consider a hierarchical configuration with two levels of computers, as shown in Fig.3. An IBM personal computer is connected with ten industrial control computers (ICC1, ICC2, ..., ICC10) in a star real-time network. Essentially, the IBM PC is an overall coordinator, and each of the ten industrial control computers is a local control unit (LCU) controlling a three--phase transistor converter. The overall coordinator coordinates the ten local control units to achieve the objective.

IIP,~ - P ~ 11< #,

i = 1,2,3

(1)

where Px~and P ~ a r e the given and output power o f the i - t h power system (i-th power incoming wiring) respectively. The constraint conditions are

I o < Ij < Ikj, where

j= 1,2,...,10

I o, 1Aj and

I j are

the

(2) minimum

allowable current, rating current and output current of j--th converter. It can be verified that the total current error on the i - t h power system is K p ~ ( P ~ - Pa) where

Kp~

is a conversion coefficient from

power to current in the i - t h power system. Therefore, a compensation value to the current regulator (i.e., L C U ) input of the j--th converter at the k - t h control period AI/k)

Ihj

[ ~ I 1 + Kpt(Px~ -- P ~ ) ] - - Ij(3) ih I ~. t

1- I

is obtained, where n is a number of converters supplied by the i-th power system. To achieve the control objective, the compensation value of the current regulator of the ./--th converter at the m - t h control period can be expressed as

Ixj(m ) -- ~ AIj(k)

(4)

t,.e

where A I / 0 ) - - 0

and the

value is set from

the coordinator to the j--th LCU. For each LCU, the control objective is to minimize llI,j-Ijll, where I j = Ixj + loj and Ipj is a preset value of the j--th converter current regulator. The block diagram implementing the dynamic coordination algorithm is shown in Fig.4, where ctjis a given value transferred to the j--th converter, ~ is an interconnection matrix, and Idland Pdi show the current disturbance and the uncontrollable power of the i-th power system respectively.

3.2. The Dynamic Coordination Algorithm A dynamic coordination algorithm to control the overall electrical load to a given value is presented. The power values of three power incoming wirings can be regulated by controlling the output current of each of the ten converters. The objective can be expressed in such a way, i.e.,for a given number/~ > 0, find a mathematical model of the overall coordinator, such that

4. R E A L - T I M E BASEBAND LOCAL AREA NETWORK L A N s have widely been applied to automatic control of various processes in recent years. In D C C S design, the real-time data communication between computers is a key problem for implementing real-time automatic control of

DCEMCS

473

lzz , lz;

Level 2

so, 2 I Fig.3.

Coordinalor ~Pat'P,2' P,)

, .., l"°'Jl

1,, , 1~ ..... 1,,o~11., []e,,--e~][<#~

p., p_. p #

I so,,0 I

The hierarchical configuration with two level computers

L- .

processes. Real-time, high reliability and antidisturbance ability are basic requirements for the data communication network design of DCEMCS, while the requirements of effect and loading ability are not essential. DCEMCS should have a fixed and stable application environment. Therefore, the data communication network of D C E M C S can be designed as a real-time baseband L A N by using L A N techniques based on process control. The network architecture considered in D C E M C S partially meets the IEEE 802 standards. The network has a physical layer and a data-link layer, where the latter includes partial functions of the network layer. The physical layer accords with R S - 2 3 2 and R S - 4 2 2 A standards. The data-link layer uses the protocol with the control characters and the byte counter. The data transmission rate is 9600bps. In the error control, parity check and cyclic redundancy check (CRC) methods are used and a stop-and-wait automatic-repeat-request ( A R Q ) technique is applied. The data communication is in half-duplex, asynchronous, serialtransmission mode. Real-time data communication is completed by four interrupt service subroutines in the central computer system and elcvcn subroutines in the local area computer system, which are initiated by either the timer or the receiver data ready signal. 4.1. The Physical Connection In D C E M C S , the physical connection of the real-time baseband L A N is shown in Fig.5, where five spare ports can be used to extend

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Fig.4. The implementation of the dynamic coordination algorithm new local area computers. It is clear that the physical connection is very simple and extensible. 4.2. The Data-Link Control Procedure The core protocol for most networks is the data-link control procedure, since it is the most basic. The various data-link control procedures in the world today share six primary functions, i.e., data transparency functions, connection and disconnection, failure recovery, error control, sequencing and flow control (Bartee, 1985). These functions are fully considered in the data-link control procedure of the real-time baseband L A N for DCEMCS. The data-link control procedure guarantees data transparency for each computer in DCEMCS by using byte stuWmg. Every message between the computers must conform to the structure defined as follows:

]STX ]SADR~FADRICMD/ RSPIINF IETXIHCRCILCRCI where S T X = Start of text. S A D R = Source address character. T A D R = Target address character. CMD ffi C o m m a n d character. R S P -- Response character. I N F ffi Optional information bytes, which contain energy information or given data. E T X = End of text.

474

M. Wu et al. t-

.

.

.

.

.

.

.

.

.

.

DCI

.

.

F

.

, . . . . RS-422A

.

,

.

.

.

.

J

DCI

-

-

I

DCI

i

l

[

I

LACI ~

~

••

~~



m

-I

r

I P°~'

)

L

-

7

I

I

L

-

LA~C8 ~-~ I 1L III5,1 PC I

E) . . . .

:A#?

RS-232 ~ ' i "

. . . .

~

"

a 7

.

]I

~

po~t:

!

port4

"-]

I

' ~ l EDC ( ' g l

DCI

¢



#.

:

I 1

-

I

L__-I

.

. . . . . . . .

I

. . . . . . . . . .

!7 ~

f------~----m/

J

.

~

I s^cA I I sACA '~, I~

[, [ po~t3 I,

.

RS-232

~

)

r . . . . . . . . . . .

,

.

I

I

.

. L .......

.

r . . . . . . . . . .

A

p - - - - - i - - - ' aP~~ - BBUU ~ . _ l _r _ ~

I

~

.

DCI

'

=---I

m

_

.

RS-422A ' RDS-I I

r--.

.

J RDS-I

RS-422A b .

.

DCI

Io

) -"Ig i I~

[

~

-I~

I

~- . . . . . . . . . . .

r

~

I 1

, t RS-422A

"-- ) : _--~To,parclocalarcacomputcr, RS-422A -

DCI

Fig.5. The physical connections of the real-time baseband L A N

HCRC LCRC

= High byte of C R C - 1 6 code. = L o w byte of C R C - 1 6 code.

Each clement in a message, with the exception of the I N F elcmcnt, is one character in binary form. Each charactcr consists of a start bit, 8 data bits, a parity bit and 2 stop bits. STX, S A D R , T A D R , C M D , R S P and E T X arc rcpresented by a standard ASCII communication code respectively. In D C E M C S , R T M C , D M C and E D C can be defined as a primary station or a tributary station, but cach local arca c o m p u t c r is only defined as a t r i b u t a r y station• Each c o m p u t e r is e n d o w e d with an address character. All mcssages are classified as c o m m a n d , i n f o r m a t i o n and response messages, where the c o m m a n d messages arc sent from primary station to tributary station and indicate the p r o c c d u r e o f data c o m m u n i c a t i o n , while the i n f o r m a t i o n and response messages arc sent from tributary station to p r i m a r y station and arc answcrs to the c o m m a n d messages. To complete real-time data communication between computers, P O L L and S E T messagcs were defined. Their clcmcnts arc shown as follows: (I) c o m m a n d mcssagcs from primary station to tributary station

[$TX

ISADR

~rADR~CMDI

EI"X ~ICRCILCRC

I

+

P O L L c o m m a n d code or S E T c o m m a n d code [$TX I S A D R ] T A D R I C M D ] I N F [ E T X [ H C R C I L C R C I

S E T c o m m a n d codc (2) response message for P O L L or S E T command

i,Tx ISAD ITADRIRSP

)"C ClLCq

t response code (3) i n f o r m a t i o n message for P O L L SET c o m m a n d

or

data code In P O L L messages, one o f the following five ASCII codes can be chosed as C M D : (l) 31H, this m e a n s that the P O L L comm a n d message sent by R T M C is to acquire a predcfincd set o f instantaneous energy data and status bytes. T h e message requests the addressed local area c o m p u t e r to gather a set o f process i n f o r m a t i o n and transmit it to R T M C in the i n f o r m a t i o n message. (2) 32H, which is similar to 31H, but is used to acquire a prcdeFmcd set of prcproccsscd energy data bytes, such as hourly accumu-

I)CEMCS lated values. (3) 33H, which is used to cheek various states of the local area computers. The P O L L command message is sent by R T M C and requests the addressed local area computer to transmit a response message to R T M C . (4) 34H. This means that the P O L L command message sent by D M C or E D C is to acquire a predefined set o f intantaneous energy data and status bytes gathered by RTMC. The message requests R T M C to return an information message to D M C or EDC. (5) 35H, which is similar to 34H, but is used to acquire a predefined set of energy data bytes preprocessed by R T M C .

475

the local area computers connected with R T M C and the additional time (six seconds) is used for processing the messages. In the real-time data communication between D M C or E D C and R T M C , D M C or E D C communicates to R T M C in sixty seconds. In order to perform failure recovery and to achieve accurate communication under normal conditions, the data-link control procedure must manage transmission errors. D C E M C S uses parity check and C R C - 1 6 methods to detect transmission errors, where the latter is realized by programming. A s t o p - a n d - w a i t ARQ technique is used to correct transmission ~'rors.

T w o ASCII codes 30H and 36H can be chosen as C M D in S E T message. W h e n C M D = 30H, the S E T c o m m a n d message has no I N F field and is sent by R T M C to start the addressed local area computer, and requests the local area computer to return a response message. W h e n C M D = 36H, the S E T c o m m a n d message must have an I N F field containing a set of given values and is sent by E D C to the electrical load control system and then to await a response message returned through R T M C . R S P in the response message is one of the following six ASCII codes: (1) A C K (acknowledgement); it shows that data communication or an associated operation is successful. (2) N A K (negative acknowledgement); it shows that the received c o m m a n d message or tributary station operation is a failure. (3) D C (device control)l, DC2, D C 3 and DC4; they indicate four kinds of device failure in the local area computer system. In the information message, RSP only is an ACK character and the I N F field contains different kinds of energy information in predefined form. Each energy parameter is expressed by four bytes. The summed byte number of the I N F field is given by the byte counter, which is associated with the P O L L or SET command message. Only the primary station can use the transmission media to send a command message at any time, but the tributary station can use the transmission media to send a response or information message only after it is addressed. R T M C communicates to a local area computer in six seconds. Each communication period is 6(N+I) seconds, where N is a number of

Transmission errors in messages can be detected in the following ways: (I) The receiver in the computer checks each byte received for framing and overrun crro rs.

(2) All messages contain a pair of C R C - 1 6 characters. The computer compares these characters with the rest of the message and in this way can detect communication errors. (3) All messages are checked by the computer for valid c o m m a n d s and response characters as well as parameters. (4) All messages arc checked by the computer for correct start-of-message (STX), end-of-message (ETX), source address ( S A D R ) and target address ( T A D R ) characters. With the s t o p - a n d - w a i t ARQ technique, the primary station sends one P O L L or SET command message at a time and waits for a response or information message from the tributary station that the P O L L or SET command message was accepted by the error-detection decoder and program before the next P O L L or SET command message is sent. I f the error-detection decoder and program at the tributary station detect an error, it responds with a response message including an N A K character and the primary station sends the same P O L L or SET command message again. The procedure continues until the data communication is successful. I f the data communication still fails after the procedure is repeated three times, it is concluded that a permanent failure has appeared. 4.3. Real-Time Data Communication P r o gramming

476

M. W u et al.

The real-time data communication programming involves two aspects. First, the SACAs in R T M C , D M C and E D C and the serial port of the MS-2102 t i m e r / s e r i a l / p a r a l lel interface board in the local area computers must be initialized. Second, interrupt service subroutines must be programmed and allocated to all the computers. The contents to be initailized are the transmission rate, the asynchronous communication form, timer control and interrupt management, etc.. The interrupt service subroutines allocated in R T M C are C O M A , C O M A B and C O M A C . A n interrupt service subroutine C O M B C is allocated in both D M C and E D C . In each local area computer, an interrupt service subroutine COMLAC is also allocated. C O M A and COMBC are initiatedby the timer to manage all real-time data communication, but COMAB, COMAC and C O M L A C are initi-

ated by the receiver data ready signal. COMA and C O M L A C perform the real-time data communication between R T M C and each local area computer. COMBC and COMAB or COMAC perform the real-time data communication between D M C or E D C and R T M C . The flowchart of the real-time data communication is shown in Fig.6.

5. APPLIED SOFTWARE AND ENERGY DATABASE The design of the applied software for the central computer system and local area computer system were based on modular programming. The distributed software design technique is also used for the software organization of the central computer system. The energy database

I [ntcrrupt Save CPU rcgistcrs Set interrupt mask bits

I Interrupt Save CPU rcgistcrs

I

Sct intcrrupt mask bits ]

f

iRcccivccommand message

J

l

.ke oo°maod °.ssa d |

Initialize

n= 3

_1 -i

[Sendeommaodmos.g, [

iWaitand | -

V

T ! Make information or response message I Imtializc n :- 3 j r

rcccivc informaUon ]

r " ~'nd information or rcspon~ mc~agc t_ r

or rcsponse message !

jI...

T !

i

[ ,,=.-1 i

IReceivedmcssagc handling] N

Revise communication control Nags

x

j j ~ ~

r1

.... .nd,iog I

b intcrrupt

?

,

t

I Rccovcry intcrrupt mask bits-

I Recovery mask bits Restore CPU register~

Restore CPU registers T Rcturn from interrupt ~,

Return from interrupt

(1) The flowchart of C O M A and COMBC Fig. 6.

(2) The flowchart of COMAB, COMAC and C O M L A C

The flowchart of the real-time data communication

DCEMCS

is designed by using the relational data mode and its management procedure is similar to that of the general database. All energy information is stored in the energy database with the energy database Files and distributed in RTMC, DMC and E D C connected by the real-time baseband L A N .

477

porting the information exchange between the run files,general data communication between the computers and man-machine interaction. (4) Man-machine interaction languages implementation (MMILI), which contains c o m m a n d input, result output with Chinese characters,etc..

5.1.The Software Organization of the Central Computer System Since R T M C , D M C and E D C must perform many functions for energy management, it is difficultto achieve the requirements by designing and using centralized applied software. Therefore, the distributed software design technique was considered in the applied software design. In the central computer system, three host run files arc independently designed by 8086 assembler language and are respectively set up in RTMC, D M C and EDC. Using IBM PASCAL, compiler BASIC and 8086 assembler languages, various function run fileswere also designed according to the tasks stipulated in advance. These run filescan be run independently on an I B M personal computer disk operating system (PC-DOS). Each of the function run filescan bc executed to complete the associated function by the host run file. Because only a host run fileand a function run filereside in R A M at any time, the R A M used islessthan 640KB.

Fig.7 shows the software organization of the central computer system, It is clear that the applied software of the central computer system is designed as a concentric ring structure with the following four layers: (I) P C - D O S version 2.00 or above, which consists of I B M D O S , I B M B I O S and C O M MAND and is most basic environment for all the run files(Sikonowiz, 1983). The host run file can execute each function run f'fleand inserfs it in R A M by the function call I N T 21H of P C - D O S . (2) The host run file and interface (HRFI), which resides in R A M and has the functions of handling the real-time data communication, managing all the function run filesand controlling information exchange between the run files. (3) The function run file and interface (FRFI), which contains a function run file doing the current task and the interfaces sup-

Fig.7. The software organization of the central computer system

The design of all function run files is also based on a public procedure module system (PPMS) and a microcomputer graphics treatment system (MGTS). P P M S provides various procedure call interfacesfor programming the function run files,such as Chinese character treatment, keyboard and printer control, date and time management, and disk filesmanagemcnt, etc. Based on man-machine interaction, various analogue pictures can be made on MGTS and stored in the disk with picture files. Using the picture files, D C E M C S can conveniently complete the display of analogue pictures with on-line energy parameters. 5.2. The Basic Idea of Designing and M a n aging the Energy Database The energy data stored in the energy database are classified as the data terms, records and files. The data term is the most basic unit of the energy data. A record generally contains one or more data terms. Similarly, a file is composcd of one or more records. In the ener. 5y database, each record contains a set of unique energy data, for example, daily statisticsof an energy parameter. In the energy database design, the definition and the description of all relations are realized by the record structure of the IBM PASCAL language. All the energy database files are

M. Wu et al.

478

classified as data, remark, index, form and memory variable files. The access to the energy information is convenient and fast, because these access operations are predef'med and simple. The completeness of the energy informarion is guaranteed by monitoring the execution of all the function run files and refusing or correcting the error operations for the energy information. When the function run files or the energy database files vary, it does not require that the others should vary as well. So the independence o f the energy information is guaranteed. A redundancy technique is used for the failure recover o f the energy database.

6. C O N C L U S I O N S Since 1991, D C E M C S has been running in the nonferrous metal smeltery. It has been shown that the distributed structure met the practical requirements for the energy management and control of the smeltery and the theory and techniques applied in D C E M C S are successful. It is also proved that the hardware of D C E M C S is reliable, and the applied software is correct. D C E M C S is designed for the energy management and control of the smeltery, but it can also be suited to distributed computer control and management of other factories with decentralized fields, because it has high flexibility.

ACKNOWLEDGEMENTS This work was supported in part by the China National Nonferrous Metals Industry Corp. and the Zhuzhou Smeltery.

The authors would like to thank Professor W a n g Honggui for his helpful direction and engineers X.H.Zheng, G.Z.Wang, Y.Q.Liao, T . M . W u and C.H.Yang, main members of D C E M C S research group, for their contribution to thisproject. The authors also would like to thank Professor M.G.Rodd who has carefully checked and revised the paper and given some useful suggestion.

REFERENCES Bartee, T.C.(1985). Data Communications, Networks, and Systems. Howard W. Sams & Co., Inc, Indianapolis. Ishii, A., and G.Takesue(1982). An energy management system for a steelwork (in Japanese). The Energy Conservation, 34(10), 7-16. Kashiwaki,M.(1982). An energy management system for a chemistry factory (in Japanese). The Energy Conservation, 34(10), 25-31. Shen, D.Y., and M.Wu(1990). Electrical loading hierarchical control with two-level computers (in Chinese). Metallurgical Industry Automation, 14(57, 27-31. Sikonowiz, W.(1983). Guide to the IBM Personal Computer. McGraw-Hill, Inc., New York. Wang, Z.T., and D.L.Yang(1986). Distributed Computer Control and Management Systems (in Chinese). Electronics Press, Beijing.