Monday, December 27, 2010

Embedded network intelligent control system

Summary: embedded device and Internet integration will represent the real future of embedded technology.

Text embedded network intelligent control system to embedded operating systems and Internet networks, first given based on the Web server embedded network intelligent control system architecture; then, the design of software systems, and embedded network intelligent control Terminal and the exchange of information between the Web server the message format, the scheduling server parameters calculation method and load scheduling algorithm; Finally, the experimental results and conclusions.

Key words: embedded operating systems; Web servers; scheduling algorithm

1 Introduction

As Internet technology development and application of universal access to information appliances and EOS (Embedded Operating System) of miniaturization and specialization, EOS starting from a single weak function to the high specialization of strong functional direction.

Marked as Internet-based embedded system, is now in the phase of rapid development. Most embedded systems also isolated from the Internet, but with the development of Internet and Internet technologies, and information appliances, industrial control technology, combined with increasingly close, embedded devices and the Internet combined represent the real future of embedded technology.

This article on embedded network intelligent Terminal control systems, micro-processing system directly with the Ethernet connection ways, embedded operating systems and Internet network organically.

The following is from the embedded network intelligent control system architecture, software systems in two parts.

2 embedded network intelligent control system architecture

Embedded network intelligent control system for application environment and network topology shown in Figure 1.

Figure 1 shows the topology by embedded network intelligent Terminal, scheduling, server, Web server group [2], the Internet host. Embedded network intelligent terminal using uCLinux OS [1], the Terminal is connected directly to the Ethernet, the data is transmitted to Internet WAN Web server. Scheduling server plays in the system load scheduling function, not a Web server, the server is overloaded. Web server group collect embedded network intelligent Terminal system data, answer a wide area network host access. Wide area network in the host can access the Web server gets embedded network intelligent terminal data, there is a specific permission of the host and can directly access the embedded network smart terminal.

  

Figure 1 system application environment and network topology

Embedded network intelligent Terminal consists of a microprocessor, the external interface, network, information processing, shifters, extended memory, and several parts, embedded network intelligent Terminal hardware structure as shown in Figure 2.

  

Figure 2 embedded network intelligent Terminal hardware structure

3 software system

3.1 embedded network intelligent Terminal software architecture

As shown in Figure 1 of this article using uClinux OS environment as software system development platform, Figure 3 shows the overall architecture of software systems.

Software system is divided into two parts: the managed object software and embedded network intelligent Terminal Software section.

The managed object software part deals with how the sensor signal to collect managed objects, how to drive a managed object and peripherals, how will signal to the embedded network intelligent control Terminal.

Embedded network intelligent Terminal software part involves the kernel modifications, the operating system of the transplantations, file processing, graphics, user interface design, task handling, how to add applications to the uClinux and embedded network intelligent control Terminal and Web server information exchange.

  

Figure 3 the overall architecture of software systems

3.2 embedded network intelligent control Terminal and Web server to exchange of information between

Web server is a remote device is an important means for exporting information, it can through the common gateway interface (CGI) form allows to modify the device parameters for remote monitoring and control [2].

Web servers have become remote management, especially those without traditional user interface (such as this article design embedded intelligent Terminal) equipment standards. Web browser can communicate with remote devices, and display the appropriate data. In Figure 1 shows the topology environment Web server, client, and embedded network intelligent Terminal use Hypertext Protocol [3] (HTTP) and network programming to achieve information exchange and remote management.

HTTP is a protocol based on ASCII.

HTTP over TCP/IP protocol using the standard synchronous request/response pattern, the client/server structure [4]. When a client request to the HTTP server, you need to send a HTTP request message, the newspaper article format as shown in Figure 4.

  

  

Figure 4 a HTTP request message format

Figure 4 shows the HTTP request message from the request line and optional headers, an optional message baoti fields.

Request line established later activities of the stage. Optional header that the client requested protocol, as well as the server in response to understand the client's information.

HTTP request message contains a few information, but through this information to notify the server it's "capabilities and preferences".

Similarly HTTP answer also adopts a similar structure, it is no longer here.

3.3 network data submission

Implement embedded Web Intelligence Terminal application network data submission (Figure 3 software layer application), embedded network intelligent Terminal and Wan Web server network communication between a client/server mode, uCLinux OS environment for network programming.

Network programming (data transmission) includes the following five basic process: create Sockets: socket (); called to bind socket: call bind (); creating connections: the call to connect (); listen listening connection: call (); establish the connection: call accept ().

3.4 scheduling server scheduling algorithm

Figure 1 shows the impact of embedded network intelligent control system reliability is the key factor is the scheduling server network performance parameters calculation rationally and mapping and load positioning is the key to improving network performance.

3.4.1 parameter of calculation and mapping

CPU utilization can be a direct reflection of the performance of the server, the following to get the Linux operating system, CPU utilization, linux operating system by reading the/proc/stat file that records a sys, user, nice and idle variables.

Calculate the CPU usage is as long as two reads these variables, and then using the formula:

Total_1=user_1+nice_1+sys_1+idel_1;

Total_2=user_2+nice_2+sys_1+idel_2;

IntCpuRate=(int)(((float)((user_2+sys_2+nice_2)-(user_1+sys_1+nice_1))/(float)(total_2-total_1))*100);

Which total_1 to first read the sum of the parameters, the second total_2 read the sum of the parameters.

For other parameters, such as the size of the buffer, you can call a function for the Linux operating system to obtain ioct1 ().

Gets the corresponding parameter, and then adds the corresponding parameters map to load positioning algorithm, parameters of the conversion process is mainly made of the algorithm are dynamic threshold algorithm [5].

The mathematical model of the algorithm are as follows:

  

B-on as the system interface buffer space capacity, Qi (t) to the ith Web server queue length, Q (t) is the current system, the total queue length T (t) to no longer connect session threshold parameter α for regulators.

The above formula, dynamic threshold algorithm based system status values for the dynamic adjustment control valve, the valve size and current system idle resources proportional to when a Web Server buffer space exceeds a threshold, it will block the Web server, not to the Web server to distribute the load.

3.4.2 load positioning strategy

According to the preceding get parameter, these parameters are passed to the scheduling server.

Scheduling server by using the weighted round robin algorithm [5] to select the appropriate server, load positioning to the specific Web server. Positioning strategies of the algorithms are described below:

Suppose you have a set of Web server is represented as S = {S0, S1, ..., Sn-1}, W (Si) Web server Si power value, the variable I said the last choice of Web server variables cw indicates the current scheduling of weight, max (S) S the collection on all Web servers in the most power value, the gcd (S) S the collection of all the Web servers of the pacts.

Variable I and the initial cw was initialized to zero. Algorithms are described below:

while (true) {

if (i == 0) {

cw = cw - gcd(S);

if (cw <= 0) {

cw = max(S);

if (cw == 0)

return NULL;

}

} else i = (i + 1) mod n;

if (W(Si) >= cw)

return Si}

4 experimental environment and results

Experiment with the topology shown in Figure 1 the simplest system.

Embedded network intelligent Terminal embedded uClinux OS and uClinux OS add the appropriate network communication program. Scheduling server used as the operating system and achieve Linux9.0 3.3 section of scheduling algorithm. Web server group, Internet hosts as common forms. Figure 5 is the use of Ethereal network protocol analyzer Gets a packet, the figure shows the design of this system and the use of algorithms.

  

Figure 5 get packets

5. concluding remarks

Experiments show this article's system structure, load calculation method and scheduling algorithms embedded network intelligent control terminals, remote control.

Through the use of weighted round robin algorithm and dynamic threshold algorithm for solving the system load scheduling, the system has a good networkPerformance and higher value of the actual application. The system is further embedded network remote control system services research to build a good network platform.

Reference documents

[1] Li Jing, Zhang Wei-new. UClinux real-time tasks under an implementation of [J]. a micro-computer information 2005 (1): 129-130

[2] Wang Tong ping, fangbinxing, cloud xiaochun. Web-based management of network monitoring technology design and real [J]. Computer engineering, 2002 (10), 2003-2004

[3] J. Gettys J. Mogul Hypertext Transfer Protocol -- HTTP/1.1[S] RFC2068

[4] M.tim jones embedded system TCP/IP application layer protocols [M]. Beijing: electronic industry press, 2003.91-96.

[5] Hahme E L, Choudhury A K. Dynamic queue length threshold for mulitiple loss priorities.

IEEE/ACM Trans Networking[J],2002,10(3):368-380

No comments:

Post a Comment