Building of mathematical models of data transferring through the interface RS485 in industrial networks Jelena Chaiko (Dr.sc.ing., Riga Technical University), Nadezhda Kunicina (Dr.sc.ing., Riga Technical University), Antons Patlins (M.sc.ing.,Riga Technical University) Alina Galkina (M.sc.ing., Riga Technical University). Abstract – The mathematical model of data transfer with the use of the pulse response on interface RS485 is developed in the paper. It allows defining frequency transfer function of the cable used at construction of network segment, and the pulse response for each segment.
Keywords – industrial network, mathematical model, transferring signal, receiving signal.
Introduction One of the most developing areas of a modern computer engineering is a microcontroller technique. Modern microcontrollers and their devices are the basis for so called “systems of small automation”, which are commonly used in technique and instrument making industry, for an automation of a complicated industrial and common equipment. These systems are used as a managing apparatus a during the development and construction of new models of technique and automats. Due to the development of a microprocessor and microcontroller technique it became possible to develop some distributed managing systems. The distributed managing systems for data exchange mainly use local computer networks. The specialized local networks used in small automation systems also include some specific characteristics which are connected with using more simplified functional algorithms, high safety and productivity, low value, easy installation, regulation and maintenance [1,2]. For making effective a local computer network it is necessary to make some analysis of the future network segments. For making such analysis it is necessary to have some corresponding mathematical model. The complicity of the analysis is that such mathematical model isn’t described in literature. There is available data about the cable parameters used for network construction [3,4], as well as data exchange interface parameters in the network [2,5]. Thus summarizing and analyzing the available data about the transferring channels, an exchange interface, data transferring protocols, and as a result building of mathematical model of network segments are very important researching tasks.
Building of the mathematical model When transferring data in the channel with noise it is possible to emphasize two cases. The first case, when the transferring signal always makes the same receiving signal, i.e. received signal – it is defined (some) function from the receiving signal, this effect is called as a corruption. The second case, when the function has got an inverse view, none of transferred signals doesn’t coincide with the received signal, then the corruption might be corrected, making the inversion of received signal. More interesting is the case, when the transferring signal is not always changed. In this case we can assume that received signal E is a function of transferred signal S and noise N:
E=f(S,N) (1) Noise can be a stochastic process [6]. There is shown that transferred signal can be described as in formula (1): brx = S (b tx) + N(b tx) (2) Where operation “+” is the operation of signal combining, brx – received data bit; b tx – transferred data bit. Function S – data transferring data in communication channel; Function N – signal corruption function by noise in communication channel. So, if to define functions S, N and operation “+”, it is possible to get a mathematical model of data transferring. Data transferring in communication channel (S function) is a signal passing through the linear system. Dynamical characteristics of the linear system with constant parameters can be described by weight function h(t), sometimes it is called impulse transition function, that is an impulse reaction in some time interval which has come to system input in m time interval up to this moment. The weight function is very useful for describing such systems, taking into account the following option. For random input signal x(t) the system output y(t) is defined by the convolution integral [7]:
(3) i.e. output signal value y(t) is suspended linear (infinite) sum for all input signal realization x(t). If deltafunction [8] is a single impulse function,
(4) then a response of function (t) is (t). The impulse transition function h(t) is defined by (t) in the following way [8]:
(5) where t – function impulse duration (t). In (5) we can be seen that at relatively small t ,h(t). And equation (3) can see in [8]:
(6) Thus, if to define the function (t), we get a mathematical model of data channel, which is easily represented for writing a modeling program of data transferring in network segment (communication channel). Let’s suppose that the channel is a screened wire of 4 twisted pairs, class 5. It is possible to represent the channel through the analog scheme shown in figure 1. The electrical characteristics of the twisted pair as an ordinary system of electromagnetic oscillation are characterized with resistance R, conductor inductivity L, capacity C and insulation conductivity G. Values R and G define heat losses in copper and dielectrics. L and C define the system reactivity, or otherwise its frequency characteristics. It is necessary to emphasize that the screen usage helps to increase the volume on approx. 30% that decrease the operational characteristics of this cable [3].
Fig. 1. Analog scheme of twisted pair class 5 and frequency dependence of electrical characteristics of the twisted pair. According to the analog scheme shown in figure 1 it is easy to get a mathematical dependence of input and output, this dependence is shown [4]: (7) Solution of equations for voltage and current at the optional point of x line has got [4]:
(8) (9) Where Zв() – cable’s complex wave resistance, – line distribution coefficient (constant):
= + j= (R jL)(G jC) (10) As it is seen in formulas (7)(10) the modeling and model construction using the analog scheme is a very complicated process. First, it is difficult to build an analog scheme in concordance with the real system; second, solution of differential equations in concordance with the analog scheme is also a very complicated process. Thus it is necessary to build a model using the impulse response. We got the dependence experimentally, now we’re comparing the received results. Making response digitization and its transformation using Fast Fourier Transform (FFT) [6], we get function h(t), and the model for noload twisted pair (communication channel without transmitters and receivers). Impulse response is shown in figure 2. Then we quantize an impulse response, build function h(t), using FFT. Mathematical pack MatCad 9.0 in calculations has been used there.
U,Vt,ms Fig. 2. Cable impulse response. The impulse response also can be found using Fourier inversion of the frequency transition function of cable:
(11) Knowing the impulse response it is possible to build a channel model using formulas (3) or (6). Then we get a mathematical model for noload channel. Then we are building a model with receivers and transmitters of EIA RS422A/RS485 standard, using the above mentioned principle. The interface RS485 is stable to inphase disturbances, and therefore it is more effectively used in building industrial communication systems. In according to the standard EIA RS422A/RS485 an analog scheme of communication system at inphase disturbances is shown in figure 3.
Fig. 3. Analog scheme of communication system at inphase disturbances.
The stability of communication systems to electromagnetic disturbances appeared in the result of parasitic inductive or capacitive communications of disturbance resources with exchange environment, it is partly defined by asymmetry level (or misbalance) of distributed and concentrated parameters of communication line in relation to the land. Intensity of disturbances between two cable conductors is defined by the level of a full impedance asymmetry in relation to the land, if to suggest that the disturbance source has got the same parasite connection to each of the conductors [5]. Therefore, if we know the state of direct and inverse channel at receiver’s input, then according to the standard EIA RS422A/RS485 it is possible to define the output state. Knowing the communication channel value which includes some receiving transmitters, it is possible to make modelling of the built network using the interface EIA RS422A/RS485. We are building a simple model which includes from 1 to 3 receivers and from 1 to 3 transmitters, the distance between them is 180 m. We are measuring the impulse response on both wires of the twisted pair (figures 46).
U,Vt,ms
Fig. 4. Cable’s impulse response with one receiver and one transmitter at distance 180 m.
U,Vt,ms
Fig. 5. Cable’s impulse response with two receivers and transmitters at the distance 180 m. U,Vt,ms Fig. 6. Cable’s impulse response with three receivers and transmitter at the distance 180 m. It is possible to see in oscillograms shown in figures 46 that impulse responses of segments with 1, 2, 3 receivers and the channel without receivers are the same. Therefore in the first approximation there can be used the channel model as the segment’s model.
Conclusions The recommendations on building the mathematical model of the segment using the impulse response in the above mentioned analysis are given. The spectres of the impulse responses without receivers and transmitters as well as with both of them heve been analysed and compared in the article. On the basis of the made analysis of the spectres of the impulse responses it is possible to suppose the following steps at building and analyzing the segments of commandinformation network that used the interface of EIA RS422A/RS485 standard and contained no more than 3 components: To get the frequency transmitting function of the cable used for building segments (usually it is supplemental information). To get the impulse response using formula (10) in length that is equal to the length of segment. Using formulas (3) or (6) to get the channel model. To research the segment characteristics. References David Crecraft and Stephen Gergely Analog Electronics: Circuits, Systems and Signal Processing by (Paperback  June 19, 2002) S.K.Pandey Encyclopedia of library automation systems and networks, First edition 1999, ISBN 8126103485(set). Communication cables and related technologies: EC '99 A. L. Harmer  Technology & Engineering 1999,354pp Broadcast Engineers reference book editor in chief E.P.J. Tozer, 1033pp Data acquisition techniques using PCs By Howard Austerlitz, 2003, 416pp Stanley J. Baran, Dennis K. Davis, Mass communication theory: foundations, ferment and future Social Science  2003  406 pages Julius S. Bendat, Allan G. Pierso, Random Data: Analysis and Measurement Procedures l  Technology & Engineering  2010  640 pages Introduction to Signal Processing Sophocles J. Orfanidis, Published in August 1995. College Division Prentice Hall, Upper Saddle River, NJ 07458 ISBN: 0132091720 W.K. Chen, Linear Networks and Systems. Belmont, CA: Wadsworth, 1993, pp. 123135.
Y.Chaiko is a senior researcher from the Riga Technical University Faculty of Power and Electrical Engineering Institute of Industrial Electronics and Electrical Engineering. The research interests are Telecommunication, Wireless Communication, Radio wave propagation, Electromagnetics, MW and RF applications, Radar Remote Sensing. She is a member COST Antenna Systems & Sensors for Information Society Technologies ASSIST (IC0603). She is a member COST Action IC0902 „Cognitive Radio and Networking for Cooperative Coexistence of Heterogeneous Wireless Networks" She is a member of IEEE. Dr.sc.ing., senior researcher, Yelena Chaiko Business Address: Riga Technical University, 1, Kalku Latvia, LV 1658. Private Phone:+371 22046003 Email: jelena.caiko@rtu.lv
 N. Kunicina is a senior researcher from the Riga Technical University Faculty of Power and Electrical Engineering Institute of Industrial Electronics and Electrical Engineering.
The scientific interests are in the field of electrical engineering, mainly the research are connected with the improvement of electric energy effectiveness in industrial electronics and electric transport. The investigations are connected with the application of decision making methods.  The main using techniques for problem solving are: graphs and system theory, homomorphic modelling, theory of schedules, multicriteria decision making, intelligent agents, modelling of control procedures. Dr.sc.ing., senior researcher, Nadezhda Kunicina Business Address: Riga Technical University, 1, Kalku Latvia, LV 1658. Phone:+371 67089051 Email: nadezda.kunicina@rtu.lv 
 A.Patlins is a researcher and PhD student from the Riga Technical University Faculty of Power and Electrical Engineering Institute of Industrial Electronics and Electrical Engineering. The scientific interests are related with control algorithms and devices developmentin the field of electrical engineering, mainly the research are connected with the improvement of electric energy effectiveness in industrial electronics and electric transport. The investigations are connected with the application of decision making methods.  M.sc.ing., researcher, Antons Patlins Business Address: Riga Technical University, 1, Kalku Latvia, LV 1658. Phone:+371 29674747 Email: antons.patlins@rtu.lv 
 A.Galkina is a doctorate candidate from the the Riga Technical University Faculty of Power and Electrical Engineering Institute of Industrial Electronics and Electrical Engineering.
The scientific interests are in the field of electrical engineering, mainly the research are connected with the applying the alternative energy resources and improvement of electric energy effectiveness in industrial electronics.
 M.sc.ing., project manager, Alina Galkina Business Address: Riga Technical University, 1, Kalku Latvia, LV 1658. Phone:+371 67089051 Email: alina.galkina@rtu.lv 
