User interface between microcontroller control system and distributed parallel simulation environment


Content
Introduction
1. Actuality
2. Aims and tasks, expected results
3. Design and implementation of the sensor interface
4. Client-program implementation details
Conclusion
List of sources


Introduction

Nowadays, high technologies have a great impact in almost any part of our life, especially in large enterprises. Enterprises use high technologies in such areas as electrical engineering, biotechnology and many others. That is why it’s very important to be able to make effective modeling of technological processes. Such modeling makes it easy to control and improve technological processes, and helps to avoid many common problems [1].

Modeling of complex dynamic system requires a lot of computing power. Such power allows the use of a cluster of multi-processor systems. Having access to the model-representation of any technological process, user specialist or a developer can perform various experiments and researches to achieve different goals.

But usually such a user or developer has a little knowledge of how this technological model works. Moreover user can be far away from multi-CPU cluster, where modeling runs. Therefore, to work with the model requires an intermediate interface, which has to be simple and easy to use, and provide the user with all necessary means to reach required goals. The role of such an interface can play a client program running on the computer [2].

Client not only provides simplicity, but also flexibility. Having an updated cluster database, the user can choose where to make the modeling [3]. The resulting output may be processed and delivered in any desired form. This can greatly increase the efficiency of the research and experiments.


Аctuality

Today, many enterprises where occur various complex dynamic processes, are interested in a reliable and efficient control system to manage and observe these processes. During the development of such a control system it is crucial to make the testing condition as close to the real as possible.

Having an accurate technological model, it is possible to build a system of automatic control and diagnostic . Modeling, which is based on three components: a control system, the model and the interface of the control system allows to approximate the testing conditions to real. Such a modeling is called semi-natural.


Aims and tasks, expected results

Nowadays it is very popular and efficient to use microcontrollers as a control system (MCCS). To link MCCS and a parallel model of complex dynamic object, you need interface, which is a set of hardware and software solutions. Hardware interface is a so called sensor that provides the ability to transfer data from MCCS to the computer where the software-interface runs [7].

During the development of the sensor it is planned to cover next topics:
• The study of the protocol to transfer data from MCCS to PC;
• Implementation and use of the transfer protocol during data exchange;
• Design and implementation of the sensor circuit board with all necessary components.

During the development of the client interface software it is planned to cover next topics:
• The study of the secured protocol to transfer data between computers over network;
• Create a user-friendly interface and easy to work with client program;
• Develop means for graphical representation and tools to build the modeling object.


Design and implementation of the sensor interface

The role of a bridge between MCCS and managed object performs sensor. Figure 1 shows the structure of the system that control air flow.


Figure 1 - Structure of the air flow control system

Sensor, show in the structure transmits to the MCCS a Q parameter, which value must be controlled. MCCS analyzed the data and produces a voltage that is fed through the sensor on the engine, adjusting level of the curtain, limiting thus the flow of air in the mine.

During semi-natural modeling sensor helps to exchange data between MCCS and parallel model on the multi-CPU cluster. Sensor directly connected only with the microcontroller control system. To communicate with the model on a cluster you need special interface, which role plays client-program on PC.

The hardware implementation of the sensor consists of three components:
• main microcontroller;
• COM-usb adapter;
• circuit board with connectors for MCCS.

The central microcontroller is PIC18F2550. PIC is a family of modified Harvard architecture microcontrollers made by Microchip Technology, This microcontroller has all the necessary means to solve required tasks: data analysis and data exchange between PC (via serial COM-interface) and MCCS. Figure 2 shows pin diagram of PIC18F2550


Figure 2 - Pin diagram of the PIC18F2550

In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time (in contrast to aparallel port). Throughout most of the history of personal computers, data was transferred through serial ports connected the computer to devices such as terminals and various peripherals [6].

In order for sensor to send and receive information, UART output pins are used (18 – RX, 19 – TX). Typically, the transmission and receiving via COM-interface on the PC side should be done via COM-port. Today, however, the number of personal computers with the COM-port is pretty rare, so we should provide data transfer via USB. For this purpose, a special COM-USB adapter is used, that allows you to programmatically work with the serial COM-interface, while physically using USB. At the core lies the adapter chip FT232R. Wiring diagram FT232R is shown in figure 3.


Figure 3 - FT232R wiring diagram

Because in addition to computer sensor will also be connected to the MCCS it is necessary to develop a board with connectors for MCCS. The board consists of the connector for the central microcontroller , connector for FT232R, and six connectors which will connect the microcontroller to control MCCS [9]. Schematic diagram of the board is illustrated in figure 4. The developed sensor is shown in figure 5.


Figure 4 - Board schematic diagram


Figure 5 - Image of the sensor with COM-USB адаптером (1), main microcontroller (2) and MCCS connectors (3)



Сlient-program implementation details

The client program running on the PC allows to do modeling of complex dynamic object, working with multi-CPU cluster and MCCS. To run modeling on a multi-CPU cluster, that is located far away from user PC you need to get access to cluster via server. Figure 6 show the process of data exchanging during simulation.

Process of data exchanging during simulation (Animation: 6 frames, delay-time benween frames 1.5 s, cycles 5, size 500х300, 23.7 КB)

Figure 6 - Process of data exchanging during simulation (Animation: 6 frames, delay-time benween frames 1.5 s, cycles 5, size 500х300, 23.7 КB)

However, you need a reliable and flexible interface that will grant a user access to the resources of the cluster. For this purpose, a very commonly used network protocol Secure Shell (SSH) is used, which allow secure and remote control of the PC . Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote shell services or commandexecution and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively) [4].


Conclusion

At the moment the project is in a completion stage and the correlation with previous developments for preserving data.


List of sources
  1. Святний В.А. Паралельне моделювання складних динамічних систем // Моделирование - 2006: Международная конференция. Киев, 2006 г. - Киев, 2006. - С. 83-90.
  2. Святний В.А. Стан та перспективи розробок паралельних моделюючих середовищ для складних динамічних систем з розподіленими та зосередженими параметрами / В.А.Святний, О.В.Молдованова, А.М.Чут.
  3. Конспект лекций по курсу «Параллельные распределенные вычисления», В. А. Святный, 2010.
  4. Secure Shell [Электронный ресурс]
    Режим доступа: www.ru.wikipedia.org/wiki/SSH
  5. PIC микроконтроллеры [Электронный ресурс]
    Режим доступа: www.ru.wikipedia.org/wiki/PIC
  6. Последовательный COM-порт [Электронный ресурс]
    Режим доступа: www.en.wikipedia.org/wiki/Serial_port
  7. Святний В.А. Проблеми паралельного моделювання складних динамічних систем.
  8. SSH.NET Library [Электронный ресурс]
    Режим доступа: www.sshnet.codeplex.com
  9. PIC RS232 Serial Communication example [Электронный ресурс]
    Режим доступа: www.mcuexamples.com/PIC-Serial-Communication.php
  10. Serial Port in C# [Электронный ресурс]
    Режим доступа: www.msdn.microsoft.com/ru-ru/library/system.io.ports.serialport.aspx
© 2013, Saveli Bondini
Укр
Рус