Faculty of Engineering and Applied Science

Department of Electronics and Computer Science

Serial Digital Multiplexing of Transducer Data

for Intrinsically Safe Applications

by

Richard Paul Collins

A thesis submitted for the degree of Doctor of Philosophy

UNIVERSITY OF SOUTHAMPTON

September 1990 UNIVERSITY OF SOUTHAMPTON ABSTRACT FACULTY OF ENGINEERING AND APPLIED SCIENCE DEPARTMENT OF ELECTRONICS AND COMPUTER SCIENCE

Doctor of Philosophy SERIAL DIGITAL MULTIPLEXING OF TRANSDUCER DATA FOR INTRINSICALLY SAFE APPLICATIONS by Richard Paul Collins

The galvanic isolation of fibre optic transmission offers a distinct advantage in the design of a telemetry system to meet intrinsic safety requirements. So far the usage of fibre optics in instrumentation systems has been largely confined to the implementation of point to point links due to the difficulties encountered in tapping into an optical fibre. Recent developments in the use of intelligence within instrumentation systems, however, have generally tended to concentrate on the concept of multiplexed signal paths. The aim of the work here has been to realise an intrinsically safe fibre optic multi-drop utilising an unbroken fibre as the transmission path. The technique employed involves the modulation of Hght within the fibre using an acoustic wave to vary the characteristics of a multi- mode fibre resulting in a differential phase modulation of the propagating modes. Since the system is unidirectional the use of two-way protocols is precluded and instead the method adopted uses the technique of allowing collisions of data to occur on the basis that they can be detected and the corrupted data can be subsequently ignored. Acknowledgements

I would like to thank my supervisor, Mr J K Atkinson, for his assistance during this

research as well as the other members of the TIDI research group. Thanks are also

due to Sieger Ltd of Poole for their sponsorship of this project as well as to SERC

for the postgraduate studentship. I must also thank my wife, Anita, for her patience,

encouragement and proof reading, my parents for their support over the years, and

finally Tracy for the final draft. Contents

Chapter 1 Introduction 1.1 1.1 Hazardous environment instrumentation 1.1 1.2 Telemetry systems 1.2 1.3 Research objectives 1.8 1.3.1 Programme of work and structure of thesis 1.8

Chapter 2 Transducer Networks 2.1 2.1 Three layer model 2.1 2.1.1 Link level 2.1 2.1.2 Transport 2.3 2.1.3 Application 2.3 2.2 Implementations 2.4 2.2.1 Southampton transducer protocol 2.4 2.2.2 Simple asynchronous protocol 2.10 2.2.3 Fieldbus 2.12

Chapter 3 Fibre Networks 3.1 3.1 Passively tapped buses 3.1 3.2 Actively tapped buses 3.3 3.3 Unidirectional transmission 3.4 3.3.1 Multiplexed tapped buses 3.4 3.3.2 Tap free buses 3.7

Chapter 4 Fibre Modulator Evaluation 4.1 4.1 Fibredyne 4.1 4.1.1 Preliminary Experiments 4.5 4.1.2 Space Diversity Systems 4.8 4.1.3 Optimisation of Depth of Modulation 4.11 4.2 Microbending 4.15

Chapter 5 Stochastic Approach 5.1 5.1 Theoretical Performance 5.3 5.2 Simulation 5.6 5.2.1 Simulation Algorithm 5.10 5.2.2 Random number generation 5.13 5.2.3 Simulation Results 5.15 Chapter 6 RS485 Implementation 6.1 6.1 Slave Bus Stations 6.1 6.2 Bus Receiver 6.6 6.2.1 Interface Hardware 6.9 6.2.2 Interface Software 6.13 6.2.3 Host Software 6.16 6.3 System performance 6.16 6.3.1 Multistation Performance 6.19

Chapter 7 Summary 7.1 7.1 Distributed Control Systems 7.1 7.2 Fibre Optic Telemetry 7.2 7.3 Stochastic Bus Protocol 7.4

Appendix 1 Southampton Transducer Protocol Al.O Interface circuits Al.l Environmental software A1.2 Motor controller software A1.3 Bus test software

Appendix 2 Basic Fibre Theory A2.1 Fibredyne A2.2 Microbending

Appendix 3 SDK51 Receiver test software

Appendix 4 Stochastic bus A4.0 Simulation software A4.1 Slave software A4.2 Interface prototype card circuit A4.3 Interface software A4.4 Host software

Appendix 5 Papers and conference details A5.0 Air motor paper A5.1 Conference paper

Appendix 6 Patent application

References List of Figures

1.0 Means of explosion hazard reduction 1-2 1.1 Centralised data acquisition system 1-7 1.2 Intelligent transducer 1-7 1.3 Decentralised data acquisition system 1.7

2.0 ISO seven layer model 2.2 2.1 Reduced 3 layer model 2.2 2.2 Star bus 2.2 2.3 Ring bus 2.2 2.4 Multidrop bus 2.2 2.5 STP master message formats 2.5 2.6 STP slave response format 2.5 2.7 STP interface units 2.5 2.8 STP environmental system display 2.7 2.9 STP multiaxis motor controller 2.9 2.10 SAP message formats 2.11 2.11 SAP poU response timings 2.13 2.12 SDLC frame formats 2.15 2.13 MIL-STD-1553 frame formats 2.15

3.0 Polished coupler 3.1 3.1 Tapered coupler 3.1 3.2 Wavelength multiplexed highway 3.5 3.3 Time multiplexed fibre optic highway 3.6 3.4 Fibredyne system 3.8

4.0 Trial fibre link 4.3 4.1 Receiver output characteristic 4.4 4.2 PVDF modulator performance 4.6 4.3 Four quadrant receiver 4.7 4.4 Receiver circuit outHne 4.9 4.5 Receiver test system 4.7 4.6 Modulation depth aparatus 4.12 4.7 Multimode fibre mode pattern 4.12 4.8 Multimode fibre modulation depth 4.13 4.9 Two mode fibre mode pattern 4.14 4.10 Six mode fibre mode pattern 4.14 4.11 Six mode fibre modulation depth 4.16 4.12 Two mode fibre modulation depth 4.17 4.13 Microbending modulator response 4.18

5.0 Stochastic bus 5.2 5.1 Stochastic bus transmissions 5.4 5.2 Distribution of transmission attempts 5.7 5.3 Non optimum attempt distribution 5.8 5.4 Non optimum time distribution 5.9 5.5 Simulation algorithm 5.11 5.6 Simulation program output 5.12 5.7 Random number distributions 5.14 5.8 Theoretical vs simulated utilisation 5.16 5.9 Simulated utilisation 5.17

6.0 RS485 test system 6.2 6.1 Packet format 6.2 6.2 Slave bus station 6.3 6.3 Slave station algorithm 6.5 6.4 Slave transmission timings 6.5 6.5 Slave stations 6.7 6.6 Stochastic bus interface controller 6.8 6.7 Manchester receiver 6.10 6.8 CRC checksum verifier 6.11 6.9 Interface logic and microcontroller 6.12 6.10 Bus interface 6.14 6.11 Interface control software 6.15 6.12 Interface host control program 6.17 6.13 Bus host display 6.18 6.14 Multistation performance 6.20 List of tables

1.0 Selection of apparatus according to zone of risk 1-5

2.0 STP environmental system slave configurations 2.7

2.1 STP multiaxis motor controller commands 2.9

4.0 Maximum transmission delays in 2^^ transmissions 4.10

6.0 Single station error rates 6.18 1.1 Chapter 1

1.0 Introduction

This thesis describes a programme of research which has been partly funded by Sieger limited of Poole. Siegers manufacture gas detection and alarm equipment from basic gas sensors and transducers to complete control systems. One of their major markets is the provision of environmental monitoring equipment for use in mining, specifically coal mining and the equipment therefore has to conform to the appropriate hazardous environment safety standards.

1.1 Hazardous Environment Instrumentation

The standards which apply to instrumentation systems are those applied to any electrical installation where there is the risk of an explosive atmosphere, their aim being to reduce the probability of damage or injury to an acceptable level. The fundamental concept behind all the standards is that there should be two independent, improbable events between a safe and an unsafe situation.

For an explosion to develop two things must occur simultaneously [1]:-

(1) There must be a flammable mixture present between its lower explosive limit (LEL) and its upper explosive limit (UEL) of sufficient volume to sustain combustion.

(2) There must be a source of energy sufficient to ignite the mixture.

The explosion risk can therefore be reduced by either allowing ignition but preventing propagation or by preventing ignition (Figure 1.0). In Europe these different design techniques are defined in a range of CENELEC standards published in Britain as BS5501 "Electrical apparatus for potentially explosive atmospheres" [2]. 1.2

Ignition Permitted

Explosion Proof Housing EEx 'd'

Ignition Prevented

No Energy Source Control Atmosphere at Ignition Source

Concentration Isolation of Control Source

Intrinsic Safety Pressurisation Sealing and EEx 'I' EEx 'p' Potting EEx 'n'

Increased Safety Immersion EEx 'e' EEx 'o'

Sand Filling EEx 'q'

Figure 1.0: Means of reducing explosion hazard 1.3

The only technique where ignition is permitted is explosion proof design (EEx'd'[2A]) where any possible source of ignition is within an enclosure which can withstand the pressure generated by an internal explosion. The joints of the enclosure are made long and closely fitting to cool any resulting gas jet to the point where it will not ignite any surrounding gases. The required "flame path" length and permitted temperatures are related to the gas hazard present and for this reason EEx'd' systems are categorised according to gas group. Gas group I corresponds to firedamp (methane and low order hydrocarbons) found in mining, while gas group II relates to the surface industries. Gas group II is itself sub-divided into three subgroups IIA, IIB, IIC corresponding to the maximum experimental safe gap (MESG) in flame paths or the minimum ignition current (MIC) for intrinsically safe design. There is also a restriction placed on the maximum surface temperature permitted on the system and this is given a T class 1-6 corresponding to the range 85°C (T6) to 450°C (Tl). These T classes apply to all the methods of protection.

The methods of ignition prevention are more diverse, Oil immersion (EEx'o'[2B]), Sand filling (EEx'q'[2C]) and Encapsulation (EEx'm'[2D]) isolate any potential ignition source from the potentially explosive atmosphere by a physical barrier, as does pressurisation (EEx'p'[2E]) where the barrier is a constant gas flow away from any ignition source. The other methods of ignition prevention are those based on energy limitation. Increased safety (EEx'e'[2F]) systems are those where the electrical circuits do not produce arcs or sparks in normal operation; terminal boxes are the most common application. The standard specifying minimum creepage and clearance distances and a level of environmental protection (IP54[3]) to ensure that hazardous faults are unlikely to occur.

For active circuits and systems however, the energy limitation principles of Intrinsic safety are more readily applied. The definition of an intrinsically safe circuit to BS5501, part 7 [2G] is "A circuit in which no spark or any thermal effect produced in the test conditions prescribed in this standard (which include normal operating and specified fault conditions) is capable of causing ignition or a given explosive atmosphere". 1.4

This is achieved by restricting the maximum voltages and currents which may occur in a circuit as well as limiting any energy storage devices, such as inductors or capacitors, to below recognised thresholds. AU the permitted values are in fact closely interrelated both to each other and to the gas group of concern. The fault tolerance is achieved by under running all safety critical components and by duplicating or triplicating, corresponding to the classifications 'ib' and 'ia' respectively, all fallible safety components.

When evaluating the type of protection to apply in any given circumstance different techniques are required when an explosive atmosphere is constantly present to those needed when the probability of an explosive atmosphere developing is remote. The approach is to require the equipment to have a lower hazardous fault probability as the probability of an explosive atmosphere increases; this limits the overall risk. The internationally accepted method of implementing this concept is to use an area classification scheme, the location of interest being categorised into 'Zones'. In Great Britain this classification is into three sections BS5345 [4]

'Zone 0': In which an explosive gas or air mixture is continuously present or present for long periods.

'Zone 1': In which an explosive gas or air mixture is likely to occur in normal operation.

'Zone 2': In which an explosive gas or air mixture is not likely to occur in normal operation and if it does occur it will exist only for a short time.

Any other area is deemed non-hazardous and normal electrical installation standards then apply. The types of protection permitted in a given zone are summarised in Table 1.0. It is here that the difference in application of 'ia' and 'ib' certification becomes apparent. In zone 0 an ignitable gas may be constantly present and therefore 'ia' with its two fault tolerance satisfies the 'Two independent events before an unsafe situation' criteria. It is the facility for use in 'Zone 0' together with the cost and size advantages of EExia/ib design which makes I.S design the 1.5 preferred approach to low power instrumentation systems. In some circumstances, notably mining, I.S design is enforced as all non-I.S equipment is turned off in the event of a gas build up. The energy limitation of intrinsically safe design however also applies to a network of separate instruments, where it is possible for the energy distributed among them to be summed. Isolation of devices on a network can hence become an important consideration in a telemetry systems design.

1.2 Telemetry Systems

Until recently analogue transmission has been the basis of the vast majority of industrial telemetry systems. This is partly historical in that no alternative was available when the majority of existing plant was installed and partly due to the effects of standardisation. The existing investment in equipment conforming to analogue standards such as 4-20 mA [5] and 5-15Hz [6] and the general acceptance of these techniques results in a reluctance to change to a new and unproven method unless there is a distinct advantage to the newer approach. The principal factors in the selection of a transmission system are those of economics and noise, analogue transmission requiring the use of a separate cable for each signal (sensor or actuator) on a network. This results in a topology which takes the form of a centralised Data Aquisition System

Zone Type of protection General principle

0 Intrinsic safety EExla Energy limitation Special Protection Special protection

1 Any type suitable for zone 0 Flameproofing EExd Explosion confinement Intrinsic safety EExib Energy limitation Pressurisation EExp Exclude atmosphere Increased safety EExe Refined design Encapsulation EExm Exclude atmosphere Special protection EExs Various

2 Oil immersion EExo Exclude atmosphere Power filling EExq Exclude atmosphere

Table 1.0: Selection of apparatus according to zone of risk 1.6

(DAS) (Figure 1.1) where signals are A/D converted and processed at the central site. This approach can result in a processing bottleneck at the computer interface where many analogue signals have to be converted and sampled all within the minimum acceptable response time of the system.

The development which has allowed alternative approaches is that of the intelligent transducer or smart sensor [7] (Figure 1.2). In this case the signal is digitised at the sensor itself which allows both digital transmission and signal processing at source. This preprocessing may be used to counteract cross sensitivities or non-linearities in the sensing element in ways not readily achieved with the centralised approach. Such sensor based intelligence also allows the use of less ideal cheaper sensing components than could otherwise be used, as well as providing an easier interface to recently developed sensors designed to give a direct digital output [8]. This digital transmission capability when used with a suitable protocol leads to the concept of a decentralised DAS (Figure 1.3) where each sensor has its own processor and a link into a communication network. The physical medium used for the system itself depends on the data rate and the particular environment under consideration. Wire systems are most common although some radio based devices are also now available commercially [9], fibre optics are still to make any major headway in this area for reasons explained later.

Under normal conditions the use of an optical fibre for a transducer instrumentation bus could not normally be justified. The required data rate, and therefore bandwidth, of the bus is generally only a small fraction of the potential offered by the use of fibre. It is this use of the high bandwidth that normally offsets the extra difficulties encountered in using fibre. The property of an optical fibre that alters the situation in this case is the intrinsic safety requirement of a bus for use in a hazardous environment. 1.7

A/B Central Converter Computer

Figure 1.1: Centralised data acqxusition system

A/0 Transducer Multiplexer Microprocessor Converter

Transducer Communication [nterPace

Figure 1.2; Intelligent transducer

Intelligent Transducer

Communications Interface Central Computer

Digital Transmission Network

Figure 1.3: Decentralised data acquisition system 1.8

As previously mentioned one of the requirements of intrinsic safety is the galvanic isolation between individual units on a distributed system to avoid the summing of the energy distributed around a network, which could occur under a fault condition. Some doubts have been expressed about the safety of fibre in a hazardous environment but work so far carried out [10, 11] indicates that the optical power densities normally encountered are unlikely to induce ignition of an explosive gas mixture.

1.3 Research Objectives

The aim of this research program has been to realise a fibre optic telemetry system for the transmission of environmental monitoring data in a mining environment v/ith all its inherent restrictions. The network had therefore to be compatible with the isolation and power requirements of Intrinsically Safe design, low power consumption also being necessary due to the battery backup requirement of safety systems. The geography of most mine installations favours multidrop structures which can be easily reconfigured as the mine is extended as a part of normal operations, this however needs to be achieved with the minimum number of interconnections due to the problems of forming a reliable low loss fibre connection underground.

1.3.1 Programme of Work and Structure of Thesis

The initial phase of the research programme consisted of an assessment of existing and newly emerging telemetry systems for use in industrial environments. At that time very few digital systems existed, most instrumentation signalling being via analogue transmission schemes. Significant effort was subsequently required in the development of systems for Southampton Transducer Protocol (STP), a RS485 based multidrop bus, and the Simple Asynchronous Protocol (SAP), a transformer isolated, FSK, intrinsically safe multidrop bus. These activities are detailed in Chapter 2.

In conjunction with the assessment of existing wire systems, an investigation of optical techniques applicable to a fibre multidrop bus suitable for use in distributed 1.9 instrumentation systems was also performed. The results of the fibre optic investigations in Chapter 3 indicated a need for a system using unbroken fibre with some form of intrinsic fibre modulation scheme. Two different modulation methods were then researched and evaluated as described in Chapter 4.

The outcome of the fibre optic work on unbroken fibre modulation was the need for a transmission protocol suitable for use on a unidirectional transmission channel. The system developed uses a stochastic time division multiplexing technique which was derived and then simulated to verify the expected performance, as detailed in Chapter 5.

Chapter 6 describes a RS485 based implementation of the stochastic protocol which used twisted pair as the physical link. This evaluation/demonstration network was based on a custom designed interface card for a host computer and a number of microcontroller based outstations. The resulting system proved not only the viability of the stochastic bus but had sufficient potential as a novel telemetry technique to be patented for commercial exploitation (Appendix 6). 2.1 Chapter 2 Transducer networks

The problem of defining and implementing a digital communication network is not a trivial one due to the large number of system parameters open to selection. To overcome the problems of complexity and incompatibility that can arise as a result the international standards organisation (ISO) proposed a 7 layer model (Figure 2.0) [12] as a guide in communications systems design. The model separates out the various system functions from the application data at the highest level to the physical link at the lowest. The division of function is now accepted as the optimum approach to network design although few implementations use all 7 layers; in most cases layers are merged or subdivided to optimise performance.

2.1 Three layer model

For an instrumentation bus the complexity of the full ISO model is unnecessary and may be too restricting for real time control applications. Under these circumstances the middle layers may be collapsed down into a single layer giving a simplified 3 layer model of link, transport, and application (Figure 2.1)

2.1.1 Link Level

The link level provides the physical connection between nodes on the system and defines the signalling system to be used. There are an almost limitless number of possible topologies available when constructing a network but they can usually all be described in terms of a few standard structures. The previously described centralised DAS is an example of a star network (Figure 2.2) where connections radiate out from a central node. This is in many ways the easiest to use, there being no need for the inclusion of identification information in the data transmissions since the source is given implicitly by the link from which it derived, although it is possible to confuse the inputs at configuration. This can be overcome in a digital system by making all transducers self identifying. 2.2

Application

Presentation

Session

Transport

Network Application Data

Transport Data link Mechanlsn Physical Physical Link

Figure 2.0: ISO seven layer model Figure 2.1: Reduced 3 layer model

N-1 N-1

Figure 2.2: Star bus Figure 2.3: Ring bus

N-1

Figure 2.4: Multidrop bus 2.3

Ring structures (Figure 2.3) use a different strategy where data passes cyclically around the network between active nodes. The chief disadvantage of such a system is one of reliability; although reconfigurable rings have been developed to cope with link failure, the susceptibility of the whole system to collapse on a node fault is still a largely unsolved problem. The most common topology is that of the multidrop bus (Figure 2.4) which is emerging as the preferred form and is the basis of most of the proposed and recently developed systems.

2.1.2 Transport

The transport layer provides a mechanism for the transfer of data between nodes which is transparent to the application data and the processes which utilise it. The mechanism is responsible for the detection and correction of errors and proper ordering and priority handling of the data transmissions over the network. The possible options for the transport layer are, as in the link layer, numerous: token passing, master slave polling and ethemet style approaches have all been utilised in various forms.

2.1.3 Application

The application layer is the one most open to interpretation and the area where standards are least likely to be achieved. Modem digital instruments are capable of returning considerably more information than a pure instrument reading (type, range, internal status, battery condition etc.) and each manufacturer will assign different priorities and forms of data representation to these various parameters. Most application standards that have been so far developed are therefore normally specific to a supplier but the isolation of application and transport operations in a system allow different devices to still use the same network. 2.4

2.2 Implementations

The application of the three layer model can best be illustrated by the various protocols that have already been developed in the instrumentation field and fit the ideal to a greater or lesser extent.

2.2.1 Southampton Transducer Protocol

The Southampton Transducer Protocol (STP) [13] does not conform to the ISO layer model but instead combines the transport and application layers by using a simple message passing technique, the link being multidrop bus based on RS485 differential transmission [14]. The protocol itself is a single master multiple slave system where each slave has a unique address and may only transmit on the bus in response to a request from the master. The data is transmitted in packets and is byte orientated using an ASCII [15] representation of the data and address information. Master transmissions (Figure 2.5) consist of a start character which identifies it as firom the master, a three digit address field and a command code. The code type indicates the size of the optional data field when appropriate and the packet is terminated by two control characters. The slave response (Figure 2.6) is again started by a unique start character which indicates its source as a slave and should therefore be ignored by other slaves on the system. The start byte is followed by the address, a transducer type code, a two byte data format descriptor and the duplicated data field. Transmissions are again terminated by two control characters. Using ASCII within the protocol eliminates the need for byte stuffing (to avoid data bytes being received as control bytes) and allows the direct monitoring of bus traffic. The disadvantages of such a technique are the inefficiency resulting from the redundancy inherent in an ASCII coded data format and the inclusion of protocol information (e.g. packet length) in the data field.

Byte serial transmissions, as the link level of STP, enables standard computer hardware to be used for the master station, and single chip microcontrollers for the individual slave stations. This reduces the additional overhead of supporting the protocol within an "intelligent instrument" to mainly a software cost, with a minimal 2.5

N N N C D D D D '"sj

X = Unique start character N = Address C = Command D = optional data field = Message, termination

Figure 2.5: SP master message formats

N N N T T F F D D |D l-F

1 = Unique start character N = Address F = Data format D = Optional data field c^F= Message termination

Figure 2.6; STP slave response format

RS232 RS485

TXD

Data RS485 Level Direction Driver Translator RXD

BUS MASTER Master Interface

RS232 RS485

RS485 Data — Level Driver Translator Direction RXD

BUS MONITOR Bus monitor Interface

Figure 2.7: STP interface units 2.6 additional hardware requirement, STP systems having been developed for both monitoring and control based on this principle. The physical link in these cases has been a twin twisted pair cable of up to 500 meters, one pair providing the signal the second a +15V unregulated power supply, the cable screen being used as a OV return. To allow interconnection of the bus to a standard RS232 serial port, level translators have been developed to perform the required conversion, the RS232 RTS signal being used as the data direction control line at the master (Figure 2.7). A simplified version of this unit was then used to interface a standard terminal to the bus as a system monitor (Appendix 1.0).

2.2.1.1 Environmental Monitoring System

The environmental monitoring system was configured to collect and display data from 4 slave stations (Table 2.1) on the 500m multidrop bus. The master station was a microcomputer programmed to poll each slave in turn, to validate the reply and display graphically the resulting data (Figure 2.8). Transmissions on the bus were at 1200 baud with a maximum allowed response delay and interbyte time out period of 0.5 seconds. The main program core (Appendix 1.1) is an mfimte loop which, after initialisation of internal variables and generation of the display screen, polls each of the four configured addresses in turn, waiting for either a valid reply or a time-out to occur, each address being tried three times before being flagged as an error. To minimise execution time of the poll routines, all serial control and timer handling was performed by assembler interrupt routines, the operating system handlers being disabled. The system served to illustrate several of the advantages of a digital system for communicating with remote transducers as well as highlighting some of the problems inherent in the STP message passing technique. The obvious advantage of the system is the use of a single cable to monitor several transducers which return their readings in standard linearised units. Disadvantages with the system are also apparent especially those arising from the combming of application and protocol information within the message format. This is most clearly illustrated by the replies from the magnetic field and temperature sensors both have their data fields described as D3 (three decimal digits) when the magnetic sensor in fact replies with a four digit data field (three decimal digits plus sign). To correctly receive these two formats requires the protocol to know which data format to expect 2.7

Magnetic Field Address 100

-0.5 W. 5

Temperature Address 100

0 50 100

Resistance change Address 300

0 50 100

Flow Address 400

Figure 2.8: STP environmental system display

Sensor Type Address Poll Reply Magnetic Field 100 *100M : 100MTD3 ± DDD ± DDDCj^Lp Temperature loo *100T : 100MTD3DDDDDDCj^Lp Strain (R) 300 *300T :300RKD3DDDDDDCj^Lp Flow 400 *400T :400FLD3DDDDDDCj^Lp

Table 2.0: STP Environmental System Slave Configurations 2.8 from each sensor type and the transport and application layers are no longer transparent to each other and the protocol software is no longer readily configurable to accept other sensor types. Even with these problems however such message passing techniques have found application in distributed gas detection systems although RS485, not being galvanically isolated, cannot be designed I.S and EExd (explosion proof) design has had to be used as the protection form.

2.2.1.2 Multiaxis Motor Control

A development of the initial STP system was a more complex master program to perform the task of a multiaxis control of processor regulated air motors (Appendix 1.2, paper 1). In operation the bus master downloads a set of commands to each motor together with appropriate data (Figure 2.9) from data tables previously created by an operator at the master station. The local motor controller then carries out the requested task returning a command accepted response when completed. The system could cater for up to 10 motors together with an air resevoir pressure sensor which could be trapped on the fly by the motor controllers for their internal use.

2.2.1.3 Response Time

One of the most important considerations in a transducer monitoring system is the maximum time that could elapse between a sensor changing state and that information arriving at the master station. For the environmental system these figures can be derived from the bus data rate and the known packet lengths assuming the transmissions are fault free and all stations take their maximum permitted reply time out. The assumption is also made that the interbyte time period is 0, readily achieved with the use of double buffered uarts and that delays in the master program are not the limiting factor on poll rate.

The complete poll cycle for the four stations requires the transmission of 86 bytes of data (20 from the master and 66 from the slaves) and four 0.5 second delays, giving a total time of 2.71 seconds (10 bits per byte, 1200 baud). From this figure it is clear that even at the low data rates employed the delay in response contributes 2.9

FREE MENORf 241 DIRECTION : SPEEB

Forward Reverse Forward

CONHNDS FILE TABLE EXECUTION 6EKRAI I Load file C Create table R run sequence R Help ciiwwds S Save file M Modify table P Procede T Type file S Generate E Examine table I Bait proyra* Cewiand ? A Advance table

CoMiand complete. . % I l1 21 31 41 SI (• 71 N M IN Presme

Figure 2.9: STP miiltiaxis motor controller

S Speed (RPM) A Acceleration/Deceleration D Direction R Number of Revolutions C Number of Consecutive Events W Wait Time Between Events G Go T Poll Motor Status

Table 2.1: STP Multiaxis Motor Control Commands 2.10 most to the bus delay. At higher bit rates this becomes even more apparent (2.09 seconds at 9600 baud); in all cases however the maximum response delay is a linear function of the number of stations configured.

2.2.2 Simple Asynchronous Protocol

The Simple Asynchronous protocol (SAP) [16] is yet another example of this type of transmission standard, having been developed by the National Coal Board (now British Coal) for use as a low bit rate transmission system in coal mines and more closely fits the three layer model. The standard's aims were to promote compatibility between different manufacturers' control and monitoring equipment in a similar manner to that achieved in the analogue transmission field by BS5745 [17], whilst overcoming the inherent problems with analogue transmission systems notably in this case the lack of galvanic isolation between individual units.

The SAP specification covers both the physical (link) and transport components for either a point to point or a multidrop network and again uses a single master multiple slave protocol. The link uses either optical isolation or transformer coupled FSK to provide the required isolation both systems operating at 600 bits sec. The protocol itself differs from STP by separating the transport mechanism from the application data using different message types (figure 2.10) for the purposes of link control and data transfer. All transactions are initiated by the master which polls each slave in turn, the polling sequence being determined by the status (Active or Failed) of the configured stations in the system. The response may be a link control message or, if data is ready for transfer, an application data message of up to 128 bytes of data. To improve the response time of the system transfers of data from the master to the slave occur asynchronously to the main polling sequence, ADMs directed at particular slaves on the bus may therefore occur, within certain restrictions, at any time, the pending poU being inserted within the ADM frame. To allow the identification of such polls within the frame, byte stuffing of all data bytes matching control bytes is used within the data field. The stuffed byte being replaced by a control byte and a modified data byte, the reverse operation being performed on reception. The application data format itself is not defined within the SAP specifications and is completely independent of the transport mechanism employed. 2.11

SAP Message Formats

Sent First SMB

AB

ADD

ADF

CFH

CFL Sent Last

Applications Data message or Broadcast Message

Sent First SMB

AB Sent Last

Link control or initialisation message format

Figure 2.10; SAP message formats 2.12

The structure allows data from or to several different devices at the same station to be encoded and is defined in an internal NCB document [18]. The only reflection of this within the SAP standard is that due to the low bit rate employed a changes only protocol is adopted where data is only transmitted when it has changed in value by more than some predetermined amount.

2.2.2.1 Response time

The worst case response time for a SAP system is more difficult to calculate due to the master inserting polls within a transmitted application data frame and the restrictions placed on polling a slave whilst it is receiving a ADM. There is also the added complexity of a variable ADM message length all bytes of which could be stuffed. Assuming the worst case situation however, but without transmission errors, for a fully configured 15 station system each transmitting 128 bytes of data all of which require stuffing a single poll on a modem link takes 2960 bit periods corresponding to 4.93 seconds. For a 15 slave network this results in an overall poll cycle time of 1 minute 14 seconds. This worst case is very unlikely to occur; most slave stations would transmit less than 128 bytes of data and only a few would be stuffed. A more realistic case of 16 byte fields with 1 stuff byte translates to a single poll duration of 298 bits or 0.496 seconds, 7.45 seconds for all 15 configured stations. The use of a changes only protocol would further reduce the likely data transfer rate as only a few of the configured stations would be likely to have data to send in any poll cycle. The effect of slave response length to poll duration is summarised in Figure 2.11. The effect of varying the bit rate is harder to calculate as some transmission timings are expressed in the SAP standard in terms of time, others in terms of bit rate; the scaling would excluding these modem timings scale linearly with bit rate.

2.2.3 Fieldbus

The proposed fieldbus standard [19] is to be a subset of the manufacturing automation protocol (MAP) [20] which is a full implementation of the 7 layer model designed to provide a plant wide data highway for information of all forms. The overhead of passing data through such a complex system can however be 2.13

BS6556 SAP Response Times Poll Durations

Duration Bit periods 10000 c

1000

100

10 -J 1—I—I I I I I I I 1 I I I I I I 10 100 1000 Transmission Length Bytes r Master Tx 2 Bytes

T6 L Master RLSD

T2

Slave RTS T5

T3

Slave RFS

2 Byte periods '/ T4

!%ave TX 23 Bit periods n&x 2-264 Bytes L Byte Period Max

Figure 2.11: SAP poll response timings 2.14 considerable. Fieldbus, which fits the three layer model, is envisaged as providing a local subnetwork of the main MAP systems for the interconnection of "intelligent" field mounted sensors or actuators. The motivations for replacement of the current 4-20mA standard are similar to those behind the introduction of SAP over the 0.4-2V technique. Application data on the fieldbus will be of limited resolution (typically 16 bits) while following the MAP message format standard (MMFS). A derivative of MMFS is proposed as the lEA draft standard 1393A (RS511) but this is unlikely to define data fields down to the level of specific transducers.

The fieldbus will be a multidrop bus either as a single trunk with spurs or as a daisy chain, a typical total length being 350m in a process control application. To minimise single point failures all station attachment points are passive and additionally in all implementations there is to be a minimum 500V isolation between the "final elements" (sensors or actuators) and the rest of the station. The maximum permitted number of such final elements on a single field bus is provisionally set at 60 which implies that more than one final element may be present at any one station, the upper Umit on stations being 30. This is the same approach as that taken in both the STP and SAP protocols to reduce the cost per "final element" of the protocol Hnk support hardware. The field bus link level is still to be defined; however two existing techniques are emerging as likely candidates namely SDLC [21] and MIL-STD 1553 [22] based systems although other working groups are proposing further alternatives [23].

2.2.3.1 SDLC

Unlike the previously outlined link layers SDLC (Synchronous Data Link Control) and its derivative HDLC (High level Data Link Control) are bit orientated rather than byte orientated protocols. The SDLC packet format (Figure 2.12) consists of a flag, address, control, and check sum fields (based on the polynomial X^^+X^^+X^ + 1) and a variable length data field. This format would result in a problem if the flag bit sequence 01111110 should occur in any of the other fields, so bit stuffing is used, a 0 bit being inserted after any sequence of five consecutive ones. In HDLC the packet format is changed to allow extended addressing and it is this extended format which is proposed by the National Coal Board [24] as a 2.15

Multiples of eight bits (128 Bytes Max)

Sent First Sent last

01111110 8 Bits 8 Bits 16 Bits 01111110 LSB LSB MSB FLAG ADDRESS CONTROL // FRAME CHECK SEQUENCE FLAG

Figure 2.12; SDLC frame formats

8 10 11 12 13 14 15 16 17 18 19 20

Command Word

5 1 5 5 1

Sync Remote Subaddress/ Data word P Terminal ,mode count/node Address code

Data wo rd 16 1

Sync Data

Figure 2.13: MIL-STD-1553 frame formats 2.16 higher bit rate component (64Kbits/sec) in their mine data network, of which SAP forms the low bit rate component.

2.2.3.2 MIL-STD-1553

MIL-STD-1553 is a standard developed in the early seventies to provide a serial time division multiplexed data bus for use within an aircraft to allow integration of the various aircraft subsystems. Its use for other applications has however grown due mainly to its use of inexpensive twisted pair cable [25]. Transfers on the bus are of the command response format under the control of a bus master; the function of bus master may however be passed to another station if required. Bus messages (Figure 2.13) are 20 bit periods long and use manchester encoding which has the advantage of being both self clocking and transformer coupleable. Message start is indicated by a three bit period synch waveform the polarity of which differentiates between a command/status or data word. The proposed derivative of 1553 for use in field bus [26] envisages transactions on the bus of up to 32 16 bit data words at either 250Kbits/sec or IMbits/sec dependent on bus length and topology.

2.2.3.3 Response times

The derivation of response times for a field bus installation is difficult as there is not yet a definitive bus standard. The draft requirements do however propose a range of performance figures dependent on the particular application and bus length. For a 30m bus the range is from a minimum of 150 messages a second in a process control environment to a maximum of 10,000 messages a second in manufacturing automation. Shorter bus lengths increases the minimum rate to 5000 messages a second with no maximum being specified. In addition to these message rate figures there is also a limit placed on the time delay between a message being ready to transmit and the data being received of 20 milliseconds in process control, 5 milliseconds in manufacturing automation. At low message rates these figures are obviously not obtainable as a fully configured system of 30 stations at 150 messages a second could take 0.2 seconds to interrogate all the configured devices. The response time requirement is therefore relaxed in the draft requirements for low bit rate media. 3.1 Chapter 3 Fibre Networks

When implementing a fibre bus the obvious approach is to treat it in an analogous manner to a wire transmission line and use similar protocols and interconnection techniques. Unlike wire systems, however, there is no equivalent of a high impedance tap to an optical fibre. To read or write to a fibre it is either necessary to break it or to use some form of coupler. The two most popular forms of coupler are described below.

(1) Polished Couplers

In this case the fibres to be coupled are polished to remove some of the outer cladding (glass layer) to expose the core. The two fibres are then butted side on as shown in (Figure 3.0) [27]. It is possible to alter the coupling ratio of such a coupler by mechanical displacement of the fibres.

(2) Tapered Couplers

In this case the two fibres are twisted together and stretched while molten [28], the coupling ratio being set during manufacture. (Figure 3.1).

Due to optical fibre acting in the manner of a waveguide rather than a simple wire transmission line, fibre couplers also differ from v^dre taps in that they are generally unidirectional in operation.

3.1 Passively tapped Busses

The insertion losses of the type of T-Couplers described above are at present of the order of 1-2 dB and it is this loss together with the low power densities and poor receiver sensitivities, compared to non-optical systems, that limits system size [29]. Those systems that have been constructed fall into two main categories:- 3.2

Figure 3.0: Polished coupler

Fused Where Touching

Figure 3.1: Tapered coupler 3.3

(1) In the star bus all fibres are terminated at a common tapered coupler which at present may have up to 100 connected fibres. Optical power in the system is distributed evenly between all the taps and this eliminates the dynamic range problems of some of the other bus structures. The disadvantage of the star bus is that each tap requires its own run of fibre from the transducer to the central point.

(2) The T-bus more closely resembles a standard "bus" format and systems with around 10 taps have been reported [30]. The problem with the T-bus is that losses accumulate along the length of the bus resulting in signals from different points being at different power levels. To counteract this effect the coupling ratios at each tap can be adjusted as a function of the tap position on the bus although this system tuning restricts reconfiguration of the system. By taking this approach the maximum number of taps can be increased to around 40 although this figure is likely to increase as the coupler losses are brought down.

One final system which borders between active and passive taps is a bus that uses optically active crystals to tap ofi" and modulate light passing in a fibre [31]. At present the loss at each tap is 6dB (this can theoretically be improved to a minimum of 1.9dB). This approach is therefore unfortunately not conducive to a large number of taps.

3.2 Actively Tapped Buses

To overcome the power loss and dynamic range limitations of passive taps a common solution is to use an active repeater at each point. The signal is received and regenerated at each tap eliminating the additive losses of the T-bus. The price paid for this signal conditioning is a lower reliability, a susceptibility for total system failure if an individual node fails, and higher power consumption which can cause problems when the equipment is required to be intrinsically safe. A hybrid between an active and a passively tapped bus has been developed as a local area network and uses a combination of 25 receivers at a central node whose outputs are combined 3.4 and used to drive a single input to a 25 way star coupler. This gives an improvement in signal to each remote station of 61 db over the equivalent 25 standard taps in series. The bus does suffer from the inherent problem of star buses however : long cable runs.

3.3 Unidirectional Transmissions

Possible alternatives to the above systems become apparent when it is realised that for many applications the bus only needs to carry data from sensors to the host and that although the ability to address individual transducers may be useful it is not essential. The need for transducers to communicate with each other is often not required. This opens up the possibility of using time or frequency division multiplexing of the transducers onto the bus in a simpler form.

3.3.1 Multiplexed Tapped Buses

The majority of multiplexed buses suffer the same problems as conventional tapped buses as they use similar coupling techniques. In the case of frequency division multiplexing [33] each sensor is connected to the bus via a frequency selective tap, the host then transmits a different frequency signal to each and monitors the return signal which is normally modulated in intensity (Figure 3.2). In this system loss is not the limiting factor on sensor numbers. The problem in this case is the provision of the selective taps and multiplexers; they are an offshoot of developments in high capacity telecommunications and a maximum of four channels is at present the norm.

Time division multiplexed systems generally use either the reflection of a pulse of light from the host or the transmission of the pulse back via a separate fibre [33] (Figure 3.3). The reflected pulse from each transducer is identified by the time delay between the initial source pulse and the reflection. The system still uses couplers however and losses are generally too high for more than a very small number of stations. 3.5

Wavelength Multiplexer Wavelength selective tap for

Wavelength Demultiplexer Wavelength selective tap for

SN

Figure 3.2: Wavelength multiplexed fibre optic highway 3.6

Sensors

JT 0

Pulsed optical source Reflected pulse train

Reflection Time Multiplexed Sensor highway

Pulsed optical source

Sensors ( gA ( gg) ( ss)

Pulse Train

Transnissive Time Multiplexed Sensor Highway

Figure 3.3: Time multiplexed fibre optic highway 3.7 3.3.2 Tap Free Buses

The major problem with all the above systems is that of power loss at taps which severely restrict the number of transducers that can be connected without using repeaters. A method of overcoming this problem is to modulate light passing through the fibre directly. The two parameters of light that can be modulated most easily in this manner are intensity and phase; polarisation modulation is possible however using special fibres that preserve polarisation information. The major problem with tap free buses is that individual transducers cannot read what is on the bus at a given time.

Intensity modulation is achieved by micro-bending induced loss [34] where the fibre is held in a ridged clamp that bends the fibre and allows light to couple from the core to the cladding and thereby escape. A micro-bending system has been implemented [35] whereby light is launched into a fibre as a short pulse and the backscatter from the fibre as a function of time can then be used to identify the position and state of each point on the bus. The problem with the system is the complex signal processing required at the receiver which must be performed in real time; such a system is therefore unlikely to be a viable proposition although it is conceptually elegant.

Phase modulation of light in the fibre can be performed by an ultrasonic source clamped to the fibre. If using multimode fibre and the light in the fibre is coherent, then individual modes are changed differently by the refractive index variations induced by the sound wave. When all the modes in the fibre are summed at a detector the result is an AM modulated signal. A transducer bus based on phase modulation has already been constructed [36] which uses standard fibre with modulators that clip onto it and modulate the light through the cladding. The Fibredyne system, as it is known, has a projected length of greater than 10 Km with up to 50 clip on modulators. (Figure 3.4). The limitations on the number of channels is imposed by the need to use filtering to separate out each channel as well as each channel's individual bandwidth requirements. 3.8

Laser Signal Receiver Cabled Fibre a ^ i ^ Fl F2 FN

FSK

D1 D2 ON

F1

01 02 ON

Figure 3.4: Fibredyne system 4.1 Chapter 4 Fibre Modulator Evaluation

The concept of the Stochastic bus, such as that described in Chapter 5, is based on the idea of a passive connection to the fibre which must modulate some parameter of the light propagating through it. Techniques have been demonstrated to intrinsically modulate the phase [37], polarisation [38] and intensity [39] of a light signal with varying degrees of complexity. Due to the increased difficulty in forming low loss connections between single mode fibres compared to multimode [40] as weU as the increased cost, a passive modulation technique suitable for use on multimode fibre was sought. The use of multimode fibre excludes the use of polarisation modulation as polarisation information is not preserved in this fibre, neither is it preserved in standard single mode fibre. Phase modulation can be acoustically induced into a fibre (either cabled or uncabled) by using a simple acoustic transducer [41]. Intensity modulation can be readily induced into a bare fibre by microbending [42] which couples light firom propagating to lossy cladding modes. The need to access the bare fibre means it would be less practical than phase modulation in this application.

The choice of the digital carrier modulation scheme to use with these possible techniques is limited, particularly with phase modulation, by the fading nature of the received signal which reduces the efficiency of coherent detection techniques [43]. The two main alternatives are incoherent amplitude shift keying or incoherent frequency shift keying. The error probability for a given signal to noise ratio is reduced for the latter technique [44] and this was the method chosen for the initial trials.

4.1 Fibredyne

The term fibredyne is an abbreviation for fibre-optic- self-homodyne, different modes being used to reference each other for demodulation. When a multimode fibre carrying coherent light is subjected to a change in length, refractive index or diameter (normally a combination of all three) the modes are differentially phase 4.2 modulated. This results in changes in the interference pattern at the photodetector giving an amplitude variation.

The property of the resulting signal which is of primary importance is its dependence on the random phases between the interfering modes. In a fibre there will be a large number of modes which will be phase modulated with different random phases and modulation depths. The effect of this is to cause random fades in the received signal level which may disappear altogether. There are however several approaches to improving this fading problem in a digital system using frequency shift keying [45];

1) The random phases can be deliberately forced to cycle by more than 2 within each bit period by mechanically deforming the fibre at a frequency several times the bit rate. The required signal should then maximise sometime within the bit interval. Using an ultrasonic modulator enables bit rates in excess of >100 kbits/sec to be received with this method.

2) A different approach, again mechanical, is to move the photodetector in the output field. Fades in one area of the interference pattern are usually accompanied by signal increases in another; if the scan is done in less than one bit period the signal will maximize some time in the interval. In this case however the maximum frequency is limited by the maximum scan rate of the fibre end over the detector.

3) The final approach is to use a form of space diversity by placing more than one detector in the output field. Due to the bipolar detection characteristic the signals from the separate detectors wiU either be inphase or 180° out of phase and it is therefore possible to combine them to give a more stable output. Systems using a 4 quadrant detector have shown an improvement in fade depth from 70dbm to 14dbm and for 99.99% of the time the signal level will be within 6dbm of its mean value [46]. The improvement in bit error rate is not as great as in the previous two approaches, however, due to the correlation in fading between the signals from the separate detectors. 4.3

4.1.1 Preliminary experiments

The initial experiments carried out into the fibredyne effect were performed to check on the levels of signal fading and the ease of setting up such a system. The initial fibre link was constructed of a few metres of 65/125um multimode optical fibre. The source was a spectra-physics 155A ImW unpolarised HeNe laser launched into the fibre via a 10 x 0.25 microscope objective mounted on a single mode multiaxis positioner for alignment, the detector being a BPX 65 PIN photodiode together with a xlO^ transimpedance amplifier. The phase modulation was induced onto the fibre by clamping it between a 40KHz ultrasonic transmitter and receiver, the receiver providing an indication of the signal level being generated (Figure 4.0).

The output from the detector, with a lOV pk-pk modulator drive consisted of a lOmV pk distorted 40KHz waveform on a 1.2V dc bias level. To remove the dc component and amplify the output signal a 40KHz 4th order biquad bandpass filter was then added with a maximum gain of 36db in the pass band. The signal obtained was, as expected, subject to deep random fades in amplitude which, when the fibre was undisturbed, had a period in the order of seconds. Disturbing the fibre, however, resulted in sharp jumps in the received signal making it difficult to measure. Only peak values could be reliably obtained (Figure 4.1) but these showed a linear increase in output level for increasing modulator drive voltage over the range of input powers available. The observed background noise level at the filter output was approximately SmV.

4.1.1.1 PVDF Modulator

One of the problems encountered with the ceramic piezo- electric modulators being used in the initial experiments was their operating bandwidth, the output power being 3db down at ± IKHz from nominal. As an alternative the piezo-electric polymer polyvinyldynefioride [47] was investigated as it has a very flat response over a wide frequency range [48]. A metaHsed PVDF film was sandwiched between the ceramic piezo-electric transmitter and the fibre from the previous experiments to allow a comparative test of the two sources by switching the drive signal between them. The detected signal from the PVDF modulator was considerably down on that 4.4

Launch Fibre Laser Op-tics

40 KHz

Receiver

Monitor Signal

Output AnpUfier

Figure 4.0: Trial fibre link 4.5

I 0) m SI

m g

0 2 C3 CO CD k. o

o g SI

c CO

Figure 4.1: Receiver output characteristic 4.6 from the resonant device at its peak frequency (Figure 4.2) although the resonant device's output fell rapidly with frequency deviation. The polymer was therefore discounted in spite of its bandwidth advantages as the loss of signal could not be accommodated. The efficiency of the PVDF modulator could possibly have been increased by using alternative structures [49] but this would have been at the expense of not being able to clamp the modulator onto the fibre where required.

4.1.2 Space Diversity Systems

To improve the signal fading problem a space diversity system was constructed (Figure 4.3), the single photodetector from the previous experiments being replaced by a 4 quadrant device. The detector was a centronic type QD-7-0 with a 3mm diameter element, 7mm^ of active area. The quantum efficiency of the detector at the HeNe wavelength of 633nm was approximately 55% giving a responsivity of 0.2794 amps/W. This figure was then used to calculate the required gain of each of the four preamplifiers, one for each quadrant. Assuming a 50% launch efficiency from the laser and an unrealistic 100% of the output falling on the active detector surface, a maximum detector output of 35uA could be expected. This current was converted into a maximum 3.5V by a xlO^ transimpedence amplifier.

The outputs from the preamplifiers were, as previously, a low level ac component on a large dc offset so the signal was again bandpass filtered. The circuit for the filters was changed from the biquad previously used to a dual amplifier bandpass structure DABS (Figure 4.4). This reduced the number of amplifiers needed in the filters from 6 to 4 and had the advantage over a Sallen and Key circuit of only needing variable resistors rather than variable capacitors for tuning. The filters were set up to have a flat response between 39 and 41 KHz to allow for up to ± iKHz of FSK modulation from the nominal 40KHz piezo-electric modulator centre frequency. The modulator output itself is 3db down at this point. The outputs from the four filters were then all frequency doubled by MCI496 balanced modulators to bring the four channels into phase synchronisation. The signals were then summed before being filtered by another DABS filter this time tuned to 80KHz with a flat response from 78-82 KHz. 4.7

(D O C o £ L_ 3 O GO U M— CD o ^^ O> QLt- 0_ CD > Q <0 d. cn L_ _a -2 Q >"o •o -5 ^ > L_ > v_ o O O 'u 3 c -a "O a o o (D c > o c (A a CD c o Qi o

Figure 4.2: PVDF modulator performance 4.8

Frequency Amplifier Doubler

40 KHz

N

Sunning AmpUf!er

CXv DATA OUT rSK Benodulator <- 80 KHz

Figure 4.3: Four quadrant receiver

Laser Launch Photo Detector

FSK Four Modulator Quadrant Receiver

Carier Enable Data out

Carrier Detect

Data in

MCS-51 System Design Kit

Figure 4.5: Receiver test system 4.9

. z \i£ n >H HI H & A Jiit pf

„r

t UK +> _JOOAf Ad

HI

H'

ULT >-c J-HHl

- H=5—IHI

:H'

=Hi D-C :>-HHl

3 8 ^-HHi

5i I rm T Hi

//

Figure 4.4: Receiver circuit outline 4.10

To demodulate the received signal the initial system used a NE565 phase locked loop set to capture in the range 78-82 KHz. The device has an input range of ImV to 3V pk-pk giving a dynamic range of 70db. The 565 had to be replaced as the decoder, however, due to pick up of the on chip lOV pk-pk VCO signal by the front end optical amplifier even when screened. The demodulator was therefore changed to one based on a XR2211 FSK demodulator chip, the modulator being a XR2207 with a low pass filter and power opamp to provide the drive to the piezo device.

4.1.2.1 Receiver Test Svstem

The test system for the detector consisted of an SDK51 system design kit programmed to drive the FSK modulator, receive the output of the demodulator and log the data (Figure 4.6). The software for the system (Appendix 3.0) was designed to use the design kit monitor programme and an interface library SDKLIB.A51 was written to provide an interface between the control programme and the monitor allowing access to aU the keyboard and display drivers. The test routines themselves in FSKDRV.P51 performed five tests, four on demodulator timings, carrier lock, both high and low logic and logic transition timings. The fifth test was for data transmission which sent out data bytes and monitored the response for errors. Initial tests were performed on the FSK system with the optical component and its associated fading eliminated by feeding the attenuated modulator output directly into the receiver, the carrier frequencies used being restricted to the range 39-41KHz by the bandwidth of the ultrasonic devices. The delays introduced by the filters also limited the bit rate, 300 bits/sec being the highest that was within the response time of the receiver.

Time Delay mS

Carrier lock logic 1 3.60 Carrier lock logic 0 1.98 On/off delay 1.13 Off/on delay 0.54

Table 4.0: Maximum Delays Experienced In 2^^ Transmissions 4.11

At 300 bits/sec with a ImS carrier stabilisation delay the direct connection gave no errors in transmitted data over the available run time thereby exhibiting an error rate of better than 1 in 10^.

Problems were, however, encountered with the receiver once the fibre was replaced in the link. The frequency doubling and filtering introduced differing phase delays into the four signal paths due to slight differences in the filter characteristics. These were not significant in the FSK system tests but with a fading signal the summing stage produced a distorted output which although better than the single detector receiver suffered fades in signal level which resulted in a loss of lock in the FSK decoder. The carrier was in fact too unstable to achieve reliable transmission for any period of time.

4.1.3 Optimisation of Depth of Modulation

A series of experiments were then run to try and improve the fading of the received signal by optimising the detector position and the fibre type. The four quadrant detector was mounted on a micrometer adjustable linear translation stage (Figure 4.6) to allow the detector to fibre-end distance to be adjusted and therefore to alter the portion of the fibre output intercepted by the detector. For each fibre type used the dc detector output was measured and by using a hardcopy output oscilloscope the peak ac component was determined. For the multimode fibre (Figure 4.7) the experiment was performed in two runs with the amplifier gain reduced to avoid saturation at the shorter detector distances. The results of both runs were then combined by suitable scaling (Figure 4.8); for this particular fibre the maximum modulation depth was at a fibre detector distance of 8mm. At this separation the mode pattern speckle size is of the same order as the detector element. The procedure was then repeated for two other fibres, one with a cut-off at 750nm which results in only two modes propagating at 633nm [50] (Figure 4.9). The fibre is only just able to sustain two modes, the second mode being easily stripped by wrapping the fibre around a 1cm mandrel. The second fibre had a cut-off of 1450nm giving approximately 6 modes at the 633nm being used. (Figure 4.10). 4.12

Figure 4.6: Modulation depth apparatus

Figure 4.7: Multimode fibre-mode pattern 4.13

Q_ 03 Q

C o

n CD T3 O O c o (D ^5 CO > > £ 0) _C a T3 "S. c O 0) O) Q cn o C < O

3 ~a o > "a c C) 01 (J Q

Figure 4.8: Multimode fibre modulation depth 4.14

Figure 4.9: Two mode fibre mode pattern

Figure 4.10: Six mode fibre mode pattern 4.15

For the 6 mode fibre the peak in modulation depth occurred at 6mm although the detected signal was fairly constant for spacings between 2 and 6 mm (Figure 4.11). For the 2 mode fibre the modulation depth reduced from that with 6 modes; at separations of less than 4 mm the signal was not detectable (Figure 4.12).

The results of these tests indicate that there is an optimum number of propagating modes within a fibre that will maximise the received signal for a given drive power and to obtain the best response the fibre to detector distance also needs to be adjusted to bring the interference pattern spot size up to roughly the same order as the detector element dimensions.

4.2 Microbending Modulation

As an alternative to the fibredyne modulation technique a microbending modulation system was devised using the same multimode fibre launch and detector as previously but in this case the fibre was clamped between the ultrasonic transducer and and a ridged plate. The pitch of the ridges was calculated from the known fibre parameters (Appendix 1.3) to maximise the induced mode coupling and therefore loss at 2 mm. The ultrasonic modulator was mounted on a second linear translation stage to allow adjustment of the fibre compression for maximum signal at the receiver. The resulting output for a range of drive powers (Figure 4.13) shows a linear increase in output with drive as in the phase modulation case. With the maximum 10 volts drive to the modulator the detected signal had a modulation depth of 14%; this is twice the maximum achieved in the phase modulation experiments and was a constant value, the signal not being subject to the random fades of the phase technique.

These gains are however at the expense of only being suitable for use on uncabled fibre. 4.16

CL

o ~o > O ^ a gc is ^ C (D O > _o 3 >OJ -a _aj o a Q

Figiire 4.11: Six mode fibre modulation depth 4.17

LD in in hO CN| CM o d o d d CN

Q. Q<0 oc CL 'u (U "O Q o c 2 o (D O 3 c •a o

(D -2 OQ £ Q Ll- M o<0 c a > b to 43 L. -Q a c "Si O) 2 c In O > 43 43 O O Q -J 3 "O o > > (U

a CN c o CT Q lo "D43 O 43 « Q m o m o LD CN CM

Figure 4.12: Two mode fibre modulation depth 4.18

L_ O

c 3 o "D XCUI TD CD a > 3 C •a O —

c c O) (D 2 in _Q 0 01 3 Q. 3 o

o

Figure 4.13: Mocrobending modulator response 5.1 Chapter 5 Stochastic Approach

In the fibredyne multidrop system the multiplexing of data from a number of modulators is achieved using frequency division multiplexing(FDM). The use of FDM requires that each modulator employs a different carrier frequency and that the detector filters out each of the utilised frequencies. The alternative is to use time division multiplexing(TDM) which allows the individual modulators to be identical and obviates the need for configuration dependent filtering at the expense of requiring some arbitration method or protocol. Since the system described here does not allow the transmission of data to the connected nodes the use of a two way protocol is precluded. Instead the method adopted uses the technique of allowing collisions of data to occur on the basis that they can be detected and the data can be subsequently ignored as invalid (Figure 5.0). It is immediately apparent that there must be some redundancy in the utilisation of the available channel bandwidth to accommodate the overheads of data validation (in the form of transmitted checkcodes) and the inevitable loss of colliding data packets. The stochastic bus consists of a number of independent stations that transmit over a common Unk. The error detection can be implemented in several ways; for example, the use of manchester encoding (in addition to allowing higher data rates, being a self clocking waveform) may be used to provide detection of collisions in the form of manchester violations. CRC checking of the received data can be employed to provide a further level of protection. A situation that must be avoided however is when two stations transmit at the same time then continue to do so indefinitely. In order to avoid this possible deadlock situation, in which no data from those stations would be received, the initiation of transmissions from the connected nodes, or outstations, is achieved on a random basis with each outstation maintaining a random number generator which determines the time intervals between transmissions. 5.2

Source Detector

12 3 N

Continuous Fibre Multidrop Bus

station 1

station 2 1 rwwxwwi

Station N rxwwwwi [

Asynchronous Transmissions

Figure 5.0; Stochastic bus 5.3

5.1 Theoretical performance

Given the available bit rate, packet length, and the number of connected stations, the required system characteristics are those of bus utilisation, the optimisation of transmission rate to maximise the bus throughput and the likely delays between uncorrupted packets from individual stations. To simplify the derivation an ideal bus is assumed where signal propogation times can be ignored, collisions are the only data loss mechanism , and all faulty/colHded packets are detected and ignored.

The randomly derived time intervals are arranged to have a uniform distribution between a minimum set by the stations physical implementation (CH6.1) and a maximum, ideally adapted to match the bus configuration. The average of the distribution is given by

T = T - T . av max mm

A collision occurs if any two data packets of duration L are commenced during a time interval 2L, the probability of which is given by

P = 2VT^^

Given this figure the bus characteristics can be derived, by considering it as a problem in repeated trials [51], using the binomial function. The function only truly applies under conditions of sampling with replacement. In this case this is not strictly true as a slave, once transmmitdng, cannot start another transmission untD the first and its associated housekeeping is completed. The effect on this on the bus performance has however been found to be negligible. Using the binomial function the probability of only one outstation transmitting at any given time is given by

P^d) = PN(1-P)N-1

where N is the number of outstations. Plotting P^(l) against P for systems involving various numbers of outstations (Figure 5.1) indicates an optimum value 5.4

to d

c cVJ o o "D "a in in i/i o 00 d [] oc CO 00 w d cM c £ Q. o o 00 >- a a c (/) Q. (/I a _Oo CO CO J3 > O ro c 00 d _o 13 (O cn c V) Q_ (/J cVJ c10 C o _o u a a o CN oo in 00 d CM o _c o H— Ul c c o o a o in T~ U") c CL L CO in hO CN d d d d d

Figure 5.1: Stochastic bus transmissions 5.5 of P that is a function of N. In general it can be shown that is maximised by the situation

P = 1/N hence the optimum relationship between average transmission interval, packet length and number of stations is derived as

Tav = 2LN

Thus for a given packet length can be calculated to optimise system performance according to the number of connected stations. For large numbers of stations and correspondingly lower transmission probabilities the binomial function can be replaced by the poisson distribution [52]

P(x) = e'" uVx! which with NP = 1 gives P(l) = e'^ = 0.3678 giving a theretical channel utilisation of 0.183 channel secs/sec, 1/e being the probability of only one station transmitting in an interval 2L. This figure for channel utilisation is the ALOHA computer communication system result [53] when retransmissions under that protocol are included in the bus traffic. For low numbers of stations however the discrete representation is the more accurate.

The other system performance figure which is of importance is the likely delay between successful transmissions from individual stations. This is a direct function of the number of attempts required before success and can be represented by the geometric distribution

PpCk) = (i.pp^-\ where P^ is probability of a successful transmission. This is only the case when the other N-1 stations are not transmitting a figure given by 5.6

(Af-1) i-^ T„

Using this value in the geometric distribution therefore gives the probability of needing k transmissions to succeed. The mean of the function is given by 1/ps and the mean delay between successful packets is therefore

tmean = Tav/p^

This is plotted for various N and optimum P (Figure 5.2). The effect of using a non optimum P for a given number of stations is also illustrated (Figures 5.3 and 5.4) in terms of transmissions and time. In both cases increasing or reducing the transmission probability away from the optimum gives an increase in the mean delay between successful transmissions from a station.

5.2 Simulation

In order to model the technique as closely as possible a simulator has been implemented in Pascal using the same random number system and slave transmission algorithm as the physical system. The simulation allows the predicted performance to be checked for numbers of stations not physically realisable in the laboratory as well as avoiding discrepancies due to noise or signal fading that would be present in a physical implementation. Several variants of the simulation software have been developed, the major difference between them being the data collected and its format in the output file, the latter to allow the results to be read into various graphics packages. All the programs, however, utilised the same simulation core. 5.7

c o a OQ 00

CI (/) (/) (D O

c o o o (D a < tn if) C o a cn c o _a LTl CN

Figure 5.2: Distribution of transmission attempts 5.8

m d 00 II CO X

j2 £ 3

Figure 5.3: Non optimum attempt distribution 5.9

O m CN

m d

D II > O o X ^ (D tN qI ^ 1 ^6 o o X

v> m (/I c q O o LO vs d L_. < — O L_ s II o o 3 o o O43 o 1/3 m c "O o X CJ cd o L_ Q_ II X CT ^ Ql £ eg % O 3 in "D

J3

Figure 5.4: Non optimum time distribution 5.10

5.2.1 Simtilation Algoiithni

The simulation program takes as input a file containing a list of parameters for each run of the algorithm, giving the number of stations, the packet length, minimum and maximum time delays and the simulation run time. Due to limitations in the number representation on the computer the maximum simulation time was limited to 10^ bit periods. Upon initialisation the program (Figure 5.5, Appendix 4.0) creates a data structure for each station on the bus and initialises a random number generator for that slave with the station's address. This avoids all the simulated slaves starting the pseudorandom number sequence at the same point and locking up the simulation. The individual slave's records are then assembled into a list in order of transmission time. The program removes the first station from the list, calculates if a collision would have occurred with the next or the previous station's transmission and calculates the next transmission interval for that station. The station is then replaced in the list at the appropriate time point and the process repeats until the requested simulation time is completed. This next event scheduling approach [54] simplifies the main routine to one procedure to compare the next two station records on the list and with few stations at low transmission probabilities is the fastest to execute. As the number of stations increases the program speed suffers from the linear search of the record list which when combined with high transmission probabilities results in the sorting of records in the list, increasing the execution time. A method of overcoming this problem would be to still use event scheduling but to scan the station list until a successful transmission was made and use that as the next event time rather than the next transmission.

The output from the main simulation program (Figure 5.6) is a file containing a list of the input parameters, various calculated performance figures and the number of transmissions for each individual station. The modified versions of the program formatted the data without comments for input into graphing packages. 5.11

( START )

Initialise Station List

Remove Next Station

NO YES CoUlsion 7

Log valid data. Log collision Log tine

Calcu late Ne xt Tran. .mission

Insert In station list

No

YES

Output Results

( STOP)

Figure 5.5: Simulation algorithm 5.12

Numter of slaves = 1

Average tim«out predicted as, 2775 Proo Transmission = 2.52E-02 _ , , Station %4:+03L°a!oOOOOo8:8a'l?r230E+o9"#! >03 isf:} mi Simulated time interval = 1.000002+07 SimuCated.average timeout = 2759 ?!^Si??i?i!?2lt!onWl°53E.OO Number of slaves = 2 5?§fa$^^i.23E.02 Maxdetay = 5.42E+03. Average timeout predicted_asi 2775 Proo Transmission = 2.52E-02 delay, 1""" ifer' ri! Totil ?SSt = 1.Q00QQE+07 SimulatecSimglated.averagl time interye timeoua t = Ratio.valid/sent = 9.45E-p. Capacity utilisation % = 4.77E+00 Number of slaves Pgcket length = 70 ^ Mindelay - Maxoelay Average timeout predicted-as, 2775 Prof•faa Transmission = 2.52E-02 telay. Maxde Station ii is::t % J:®S881:5 , „„„„„ Simulated time interval = 1.000QQE+07

Capacity utilisation % = 6.77E+00 Number of slaves = Pgcfeet length = 70 Mindelay = 1.23E+Q( Maxdelay = 5.42E+02 Average timeout predii 2775 Prob Transmission = Station Sent Maxde

Is;:} ?S3S .1:1138885% Simulated time intecva = ,1.000g%%;07 Capacity uutilisatiot n % = 8. 59E+00 Number of slaves = PgcKet length = 70 Mindelay = 1. Maxdelay = 5. i:8 Average timeout predicted as 2775 Proo Transmission = 2.S2E-02 Station Sgnt ,Lost, elay Maxde mi Bi l+E+li Total Sent 1.8Q3nQQE+' Tgtal Tost .3.3$8uOOE+ Simulated time intecva = ,i.ooogy=+07 Capacity utilisation % = 1.02E+0 1 Numter of slaves = 10 S?55:f,;*?:'?.23E+02 70 Maxdelay = 5.42E+03. 2775 Average timeout predi Prob Transmission = elay Maxde Station

iC I

S?^ !atec^tim«^interva( '= 1.00000^07 Simulated.average timeout =_ 2777 g:^gif^l(!?S!tion#1]57E+01

Figure 5.6: Simulation program output 5.13

5.2.2 Random Number Generation

There are numerous methods available for generating pseudo random numbers [55]; the algorithm chosen for use in both the simulation and in the actual slaves themselves is based on an algorithm used in a number of commercial simulation packages. The next random number U(t) is derived using the formula

U(t) = U(t-1)*5^^ Mod 2^^

The resulting value can then be scaled into the range required by the given system configuration. To ensure both the simulation and physical realisation of the bus match the theoretical predictions, it is important that the number generator used approaches as closely as possible to an ideal uniform distribution. The above algorithm has a repeat length of 2^ and has been extensively tested [56] and found to satisfy most standard numerical tests. The main problem with implementing this algorithm on a small computer however is due to the value of the numbers exceeding standard variable sizes. In the pascal simulation this is overcome by using a base 128 number representation, the numbers being stored as the coefficients of powers of 128. This is easier to implement than writing a multibyte multiplication routine in assembler, as well as being more easily transportable, but slow (2.8 ms on an 8Mhz 80286 CPU machine). As a check on implementation a small program was written to use the algorithm and record the distribution. The runs are for a uniform distribution of 10000 numbers between 1 and 50 (Figure 5.7). As a further check on the algorithm and its implementation a chi-squared test was calculated on each of the runs, aU of which gave results between 10 and 90 % which is considered acceptable [57]. 5.14

Figure 5.7: Random number distributors 5.15 5.2.3 Simulation results

The simulation was run for various combinations of station numbers and transmission time intervals to mimic as closely as possible the physical implementation allowing comparisons of theoretical, simulated and actual performance figures. There was however a slight discrepancy in that the simulation's smallest umt of time was a bit period while tunings in the real implementation were to 1/8 bit period. For the simulation the times from the physical implementation had to be rounded up to the nearest bit period. The main simulation nms were performed on a CPM80 machine and typically took 12-24 hours to complete a sequence of sunulations. The sunulation results correspond closely to those predicted by the theoretical model as can be seen in Figure 5.8. This shows the percentage utilisation of the available channel capacity for both the simulation and the model. The simulation in this case was for 10^ packets for each point. Figure 5.9 is the equivalent to the theoretical plot of Figure 5.1 of utilisation vs transmission probability and shows the peak in through put at pirobabilities that are the reciprocal of N. The simulation run for each point was in this case 10^ bit periods. As a verification of the model and sunulated results a chi^ goodness of fit test was carried out between several of the plots in Figures 5.1 and 5.9 and all values came out within the 10 and 90% limits. 5.16

CO

CD O C ID

O H— ^ GO C _o CO CD (f) CO 03 "5 7D O .i Zr 0} o f] 03 E D — ^ 8 z 03 _o

'-+—' CD i_ O CD co H m 00

3 6Q bQ 6Q 6Q o lO O lO O lO o CO OJ CM

Figure 5.8: Theoretical vs simulated utilisation 5.17

in d

tf) M c c g o "5 "5 U~i o

CO d c C] o 'co (D in O in M c c c o o E D "o (/] "a £ ui (/i C K) 03 O O Jo3 ^ t: oc Q_ lA if) <0 3 "O CD _a d o o o (J 3 a a (/I to E CM U3 o 'ui _c o o CO c c c o o o 0 o a VJ (/J CO f— m in 3 QQ O LD O LTJ LO K) CN CN

Figure 5.9; Simulated utilisation 6.1 Chapter 6: RS485 Implementation

In order to allow a comparison of the predicted performance with a hardware implementation whilst avoiding the complexities of the optical system, a network has been constructed using RS485[58] differential line drivers on twisted pair. This approach allows the isolation of the data errors due to the inherent fading in the fibredyne signal from that due to packet collisions to be quantified. The network consists of a number of slave stations linked to a single receiver card which plugs into an IBM AT compatible computer (Figure 6.0). Transmissions on the system consist of 64 bit manchester encoded data packets at a data rate of 125 Kbits/sec. Each packet contains a flag byte, an address field, 32 bits of data and a I6bit CRC check sum (Figure 6.1). The data received by the interface is transferred to the host cpu after verification by the interface processor together with information on the number of detected invalid transmissions. The main reason for the use of RS485 is that the line drivers are contention protected and shut down if two devices are active on the bus simultaneously, contention between packets being inherent in the bus operation.

6.1 Slave Bus Stations

The individual stations on the bus have been designed to be as simple as possible both for reasons of cost and the necessity of having to assemble several of them. Each station consists of a simple 8031 based computer, an address switch for station address input over the range 1-15 and an RS485 line driver (Figure 6.2). This leaves an unused 8 bit port for instrument operation. Four bits of this port were later used to interface a serial access A/D converter. The cost of minimising the hardware to this basic form was an increase in software complexity especially in terms of execution timings.

The software for the system [A4.1] is based on a core module written in PLM51 [59] with assembler routines to perform the main functions of random timeout calculation, CRC generation and manchester encoded data transmission. The main program (Figure 6.3) consists of an infinite loop which, after initialisation performs 6.2

Interface RS485 nniBumir^

Monitor Computer

RS485

8051 Data Computer Station 1 Station 2 Station n

Figure 6.0: RS485 test system

Flag Address Data ORG checksum

Figure 6.1: Packet format 6.3

rO

^^%339 3SS%3 51 41 & i SH B H & A iili n u} CO 4>

pO- h# wS2 9!n| | i e

a\ HDh db ii i ci rt rf rt M

w a — (umvuivor** ^2 3=2* <<<<<<

32 z;asssas% i; o fH s

!3 wg

Hi

Figure 6.2: Slave bus station 6.4 the main instrument management tasks, in the initial versions this operation consisted of loading dummy data into the work buffers and calling the CRC polynomial calculation routine. In the final software this was replaced with the A/D converter driver routines.

The manchester transmission routine has the tightest constraints on implementation as the waveform is generated using bit shifts and complements of the data field, the opcode execution times being used to provide the correct transmission waveform. For this reason the code is generated using macro expansions for each individual bit rather than subroutines which, due to their call and return overhead, reduce the achievable bit rate. The waveform generated by the procedure (Figure 6.4) consists of two manchester zero bits, a synch pulse and 8 bytes of manchester encoded data. The first six bytes of data are transmitted most significant byte first while the last two are transmitted least significant byte first. This is a requirement of the receiver decode and error detection logic outlined in 5.3.2. By careful ordering of the instructions within each bit transmission, so that data is accessed and stored in the time between signal edges, the bit transmission period was reduced to 8uS with a 12 Mhz processor clock corresponding to 125Kbits/Sec. The total packet duration is therefore 552uS excluding the RS485 Hne driver turn on and off delay which increases the total duration to 555uS.

The random timeout routine is based on the same algorithm as that used in the simulation program and was again implemented using assembler with macro expansions rather than subroutine calls. In this case the aim was to reduce the total execution time to the minimum possible rather than meet critical timing constraints. The time it takes to calculate the new random number places a minimum value on the inter-packet timeout period as the calculation time is in effect added to the calculated delay. The routine has therefore been optimised for speed by not calculating higher product terms of the multibyte multiplication and by using bit shifts and masking for the modulo 2 ^ 35 division. The final execution time for the procedure RANDOM was 360uS to which must be added the interrupt routine service code and the time required to reload and restart the timer which increases this time to 427uS. It is important to note that if the interpacket timeout period is made as short as possible then the main instrument operation will be effectively 6.5

START

Initialise Random

Calculate Time-out Delay

Delay^ Expired

Transmit Packet

Figure 6.3: Slave station algorithm

8uS

L_ Driver Enable /

Zero Zero Sync IDat a

Transnitt data waveform

Figure 6.4: Slave transmission timings 6.6 halted as the processor will be continually in the interrupt service routines. Without a considerable increase in software complexity the maximum programmable delay between transmissions is fixed at 65.535 mS by the 16 bit on chip timers.

The calculation of the CRC polynomial could have been implemented in the higher level PLM51 language of the main program as there are not the time penalties associated with the interrupt routine code. Assembler was still used however as it allows easier access to the carry bit and simplifies the implementation of the algorithm. The calculation is performed by implementing a 16 bit software shift register in bit addressable memory and utilising the boolean processing capabilities of the 8031 to calculate the feedback term before each shift. The execution time for this routine is not critical and was measured using the development system emulator rather than by calculation of opcode timings at 1309 uS.

The initial slave stations filled the packet data field with dummy data (the station address) which was used in early testing as a check on data corruption. Once this was no longer required a serial access Analogue to Digital converter, a TLC1514, was interfaced to each slave processor together with a panel mounted potentiometer to allow the transmission of live data (Figure 6.5). In the demonstration software only one of the 10 possible 10 bit channels on the device was used. If 10 bits resolution is not required it would be possible to transmit four 8 bit values within each data field. The driver software for the device was implemented in PLM.

6.2 Bus Receiver

The bus master (in common with the slaves) is based on an 8031 microcontroller with the tasks of manchester decoding, collision detection and verification performed by dedicated hardware (Figure 6.6). The microcontroller handles the tasks of buffering, error logging and data transfer to the host computer. As in the slave the software is interrupt driven, interrupt routines being coded in assembler, to minimise execution time. 6.7

Stochastic Station No 1 e Actke ^ Power O

Stochastic Stafon No 2 1 Active Q

PowerQ 1

Stochasfc Station No 4 | Aciv© Q [

Power O j

Figure 6.5: Slave stations 6.8

0 a L 1 0) Y U -P L o "Sac in oj c 0; 75 -br j: o L a3 3 u u C. C 01 I Q -adr aU a 1 a C3L 13

-p C 3 L — o dj L O CD "3 • Qi Xu 4-> CJ 01 -r ^ ^ !±; u Ul rJ Of 00 i_ u. u Q: L a ocu Q_ 3 L > Oi o, "o U L -LP CD -H c P O OI U "C 0 cu u u L §• 01 c5 O s_ n U1 L lE <4- (Uk1 "C L u c Oj o M OC C5 m L •P o a 0) U1 c 00 o T3 L. UL O CU •a U 4- U1 < (D 4- 3 Q 3 cq II ui cq in 0) U OJ U L d -H "O 4- in 13 L cJ C Qj C JZ C5 L uCU u • U o L. Oi Z CL C5 -p cO ) (X 4- < 4- CL <4- Z L U (/) L W c3q Qi cq 0/ CL 0_ -cP cq

Figure 6.6: Stochastic bus interface controller 6.9

6.2.1 Inteiface hardware

The signal from the RS485 line receiver is decoded by a dedicated manchester decoder chip that looks for a valid synch pattern in the input waveform. When a valid MIL-STD1553 synch is detected the decoder generates a NR2 data signal, a synchronous clock waveform and a status signal /NVM ( Non Valid Manchester). The decoder bit rate is set at 1/32 the crystal frequency, to provide maximum jitter margin, at 125 Kbits/Sec. The decoded clock signal is gated with /NVM and used to increment a bit counter, the CRC shift register and a monostable pulse generator. The monostable pulse clocks the NRZ data into a serial in parallel out 32 byte FIFO. /NVM and the bit counter overflow signal are themselves gated and drive an interrupt pin on the microcontroller when /NVM goes low before 64 bits of data have been received. If 64 bits of data have been decoded without error then a valid data interrupt is generated (Figure 6.7).

The CRC checksum calculation is performed by a 16 bit shift register with feedback which is reset by the processor before the start of each new data packet (Figure 6.8). The outputs of the 16 register locations are combined to give a single CRC error signal on a port pin. It is the difference between the CRC checksum hardware, which operates least significant bit first, and the serial to parallel FIFO, which operates most significant bit first, that requires the data transmission direction to be reversed in the slave manchester generation routine.

Communication between the microcontroller (Figure 6.9) and the IBM compatible computer is via a second 32 byte FIFO, this time in parallel in parallel out mode, and an eight bit latch. The interface is built onto a prototyping board mapped into the lO address space $300 to $31F (Figure 6.10) [A4.2]. Minimal address decoding is used on the board and for reads of the card the FIFO is mapped to $300, shadowed to $30F, while the latch is mapped to $310 shadowed to $31F. Neither the FIFO or latch are bi-directional and a write to any address within the card's address space results in a reset pulse to the controller from a second monostable. The latch acts as a status register for the interface with bits representing the FIFO flag and output ready signals together with an overflow bit set by the control processor if the 2k byte on card buffer overruns. The latch also acts to synchronise 6.10

X —

aUfalBI «

Figure 6.7: Manchester receiver 6.11

So

a

Figure 6.8: CRC checksum verifier 6.12

—< a\ COidiQ M . m V in ikjDS i >u ss&sisssz psp- \0(Ui n ( * If r~. CS CSC5 O C3 a> C 3 Ct CO B c 5« s = L o- KSEs! SaS25S2S <r>-> T77V ^ ^ ^ Ncqch Q QPQ CT P QQ\ Al (Ij O5.

--ftJC*>'*»-t/^sDhvCO % — (vJifdcu culftjlftjculaj w SSggSSSo LJCC << < "«c

C8O

r

Q T u

JfflEfflZ

Figure 6.9: Interface logic and microcontroller 6.13 the control card to the main computer bus cycle and prevents status signals changing while they are being accessed, the microcontroller running, at 12 Mhz, asynchronously to both the manchester receiver and the host computer.

6.2.2 Interface Software

The PLM interface control program [A4.3] utilises three interrupt routines in operation (Figure 6.11). A timeout interrupt is used to trigger the generation of status information at one second intervals. Information on the number of CRC errors and manchester code violations is then transferred to the host computer in the form of a received bus data packet but with an address field of zero. If 64 valid bits are received the resulting interrupt routine checks the overrun and CRC status bit and clears the bit counter if set. If the 64 received bits are vaHd the FIFO is read into a temporary buffer and the CRC checker and counter are cleared. This enables valid reception of a new packet while the current one is transferred to the 2K byte cyclic buffer for eventual transfer to the host. Manchester data violations before 64 bits are received reset the CRC checker and bit counter and the corresponding interrupt routine flushes the input FIFO and logs the error. By changing the priorities of the interrupt routines it is possible for errors to occur and be serviced while the valid data interrupt routine is still processing the last received data. There is a critical timing constraint here since, in order to avoid the loss of a valid packet, the interrupt routine must clear the serial input FIFO before another packet can generate an error interrupt. At 125 Kbits/Sec this timing constraint is 24uS, equivalent to the manchester synch period. The bus interface/host communication is all via the read only latch and FIFO, data being transferred in 6 byte packets (the CRC check bytes are stripped of by the interface control program) consisting of the flag, address and data fields of the received data packets or the internally generated status information. If the host does not read the received data from the interface at sufficient speed the resulting interface buffer overflow is detected and the interface microcontroller disables all further reception, setting the overflow status bit in the interface status latch. Recovery from this situation is only possible by writing to the interface and thereby forcing a complete interface reset. This hard reset requirement was included to avoid the situation of the bus recovering from overflow when unattended and the event being missed. 6.14

mmm

Figure 6.10: Bus interface 6.15

C start 1

Reset interface HW cstar t 3 Enable Interrupts Flush Serial input FIFO of data

L Second Tineout N Clear bit counter & oendlna nterruot Data n Maift Buffer Generate Status [ncrenent counter Data Packet of manchestpr errors

Transfer to iBM Transfer to IBM Fira FIFO cRetur n J

Main Program Error Interrupt

) c 1

Reload Tiner overrun or CRC error V

Reset bit counter Rush serial FCFO I second elapsed N Transfer data to Internal RAM Clear bit counter loendno nterruot Swap Interrupt Toggle Indicator LED Priorities mcrenent CRC error counter

Set timeout Bit Main Buffer Full Set overflow flog & LED Indicator Return Transfer data to Main Buffer Disable receiver

cRetur n J

Tlner Interrupt Valid Interrupt

Figure 6.11: Interface control software 6.16

6.2.3 Host Software

The host software, written in turbo pascal V3.0, is based on a core procedure which continually polls the bus interface status register until valid data is indicated by the flag bit (Figure 6.12). The received data is the read out in the 6 byte packets and the appropriate station or status information updated. The software exists in two versions, a basic data logger [A4.4] which records the total number of errors and valid transmissions over a specified time, and an enhanced configuration which displays the last received data from each configured slave (Figure 6.13). The use of polling to access the interface is a development of the initial system which used the Flag signal from the Interface FIFO to interrupt drive the program. The control program in this form was subject to crash during long runs especially at high packet rates and as polling is sufficiently fast the interrupt approach was dropped.

6.3.3 System performance

Initial tests on the interface were performed using only a single station programmed to transmit with the minimum possible delay between transmissions. This maximised the packet throughput on the bus allowing reasonable numbers of packets to be checked for CRC checksum errors, manchester encoding errors and corrupted data. To enable the detection of missed packets, the station software was modified to toggle a port bit at the end of the transmission; this was used to trigger a counter the value of which was compared with that at the receiver. In addition a logic analyser was set to capture CRC check sum errors, by triggering on the combination of valid data interrupt and invalid CRC checker output. The initial system suffered from a packet error rate of the order of 1 in 10^ which was eventually traced to the manchester decoder locking on to the wrong edge of the manchester signal. To prevent this the two manchester zero bits were added to the packet at transmission before the three bit period synch waveform. This allows the decoder phase locked loop to lock to the input signal and has reduced the error rate to the extent where the time needed to record an error makes accurate figures difficult to obtain. The results obtained in several overnight runs are summarised in table 6.0. In separate runs of the system no packets were detected as missed entirely by the receiver 6.17

start ^

•pen Result File

Input Run Parameters

^eset all variables Display Header

Reset Enterface cRea d Interface J Rrad Interface

Status Data Avaiable

Buffer Empty

Update Status DIsolav Read Next Packet Update Runtime Loa & •ISDlav

station Data Availablc-^N Update Status Record Qlid Address &Flag Update Station Field Y Data Update Station Record

Update Invalid Update Log Fie Count

Update Flagfault Close Log File Count

d^^HZ) nterface Overflowed

Set overflow Flag

Figure 6.12: Interface host control program 6.18

fie lat lUt occuDDces

total = 2.1748488808E+05 itvalid= 0.88B88088B0E+0B i manerr = 4.4673880B88E+04 crcerr = 1.7360880888E+84

Figure 6.13: Bus Host display

Packets Invalid Manchester CRC errors Flag Faults errors 28024668 0 0 0 0 28024661 0 3 0 0 28024284 0 0 0 0 28024418 0 0 0 0 28024263 0 0 0 0 28023860 0 1 1 0

Table 6.0: Single Station Error Rates 6.19

When additional stations were installed on the bus and packet collisions occurred the interface was found to have an additional problem, packets occasionally being received shifted one bit to the left. This was traced to a timing problem between the clock from the manchester decoder chip and the monostable pulse generator to the serial to parallel FIFO the cure being to gate the clock signal with /NVM from the decoder chip. As a secondary precaution the packet address field was reduced from 16 to 8 bits the first byte being set to $7E, the HDLC flag byte, which provides a means of identifying all shifts in data of up to 7 bits. The host program was then modified to count corrupt first bytes as flag faults.

6.4 Multistation performance

Once the interface was functioning correctly with a single station three other units were constructed to allow the multistation performance to be determined. The required maximum time-outs were calculated using the known minimum transmission time due to the station implementation and the required transmission probabilities. The bus was run overnight with between one and four stations for probabilities in the range 0.1 to 0.5 each. The results (Figure 6.14) confirm those obtained in the simulated system. The host system recorded no flag faults or invalid station faults in all the runs all errors being picked up by the CRC and manchester violation checks. 6.20

to CN CN| CO to CO M r "T" c o

w C

a "oo ^ XI "a o _c cn c o (/) d o ^6 VI o

Figure 6.14: Multistation performance 7.1 Chapter 7 Summary

7.1 Distributed Control Systems

During the course of the research programme, distributed instrumentation systems have become more popular and the concept of a distributed control system (DCS) is now firmly established. Both STP and SAP played a significant role in the acceptance of the distributed instrumentation philosophy.

SAP's significance was as one of the first telemetry systems to be defined by a national standard on both the physical and transport layers. This standardisation was forced by the end user, the National Coal Board (as it then was), to enable equipment from different manufacturers to be connected into the same system. Incompatibility between different systems is one of the reasons that digital telemetry has yet to displace its analogue counterpart. SAP was also significant from the point of view of this research project in that it was tailored specifically to mining and its physical link is therefore compatible with the requirements of intrinsically safe design, the galvanic isolation necessary being provided by transformer coupling the FSK signals onto the bus. As part of the association with the project sponsors, a considerable effort was put into the development of a SAP master based on a Gemini Galaxy computer to allow the development and test of SAP slave units as an accessory to some existing products. This was probably the first functioning SAP master to be implemented and highlighted several inconsistencies within the SAP specification itself when dealing with exception handling. SAP has now become an accepted transmission standard within the mining industry for both monitoring and control.

STP was initially developed as a demonstration system for the concept of distributed mstrumentation and the first master station was the environmental monitoring system outlined in Chapter 2. The slave umts developed by other members of the research group were also some of the first microcontroller based 'intelligent' transducers developed. The motor controller was an extension of the environmental system and served to illustrate the use of STP for both monitoring and control 7.2 applications. Since then the work carried out on STP has been progressed from its initial format and is the basis of a commercially available GDACS (gas data and control system) telemetry system. The GDACS system still uses RS485 transmission over twisted pair but for increased reliability a dual redundant bus is also used. Due to the intended application of GDACS networks in gas detection the system needs to conform to some form of certification. The use of RS485 excludes intrinsic safety as an option and the network has instead been designed to meet EEx'd' design requirements. Isolation is provided within the system however, all instruments using isolated power supplies to stop common mode voltages damaging the line drivers. This approach has changed slightly in the latest GDACS product under development where isolation is provided optically just before the driver stage in the instrument.

Further developments in distributed control systems will no doubt continue but the rate of uptake should accelerate once the fieldbus standard is finally defined and chipsets become available. One of the areas still to be defined for fieldbus is that of the application layer. In SAP the application layer is defined by a National Coal Board document on the applications data protocol. The definition of the applications layer for fieldbus is probably the most difficult part of the system to define due to the range of possible field instruments which must be accommodated. The expected compatibility between different manufacturers equipment should, as in the case of the SAP standard, be an even greater incentive to move away from analogue systems.

7.2 Fibre Optic Telemetry

The use of fibre optics in a mining or other hazardous environment where the restrictions of Ex design apply is of interest due to the inherent galvanic isolation and the reduction in complexity it brings the design of an intrinsically safe network. Standard techniques of connecting onto a fibre network are, however, unsuitable for use in a telemetry system with any significant number of outstations. These problems arise due to the lack of a high impedance tap into an optical fibre or the unavailability of suitable components as in the case of the wavelength multiplexed system. Couplers themselves can have significant losses which, when added to the losses encountered at the connectors each side of the coupler, significantiy reduces 7.3 the possible number of taps. Another consideration given the proposed environment is the physical problem of connecting fibres in an underground location. Mines are by their nature very dusty and with fusion splicing incompatible with the mine safety regulations any connection would have to be via a demountable connector. With single mode fibres having core diameters of the order of a few microns, it would only need one speck of dust to give significant attenuation at a connection. For this reason only systems using multimode fibre, with its larger core size, easier alignment, lower susceptibility to connector contamination and lower cost, were considered. The power budget problems of a conventionally constructed bus also lead to the concept of using an unbroken fibre as the transmission medium. By doing so the connector losses are reduced to those required for installation and repair rather than acquiring additional loss for each installed instrument. The use of an unbroken fibre also allows the reconfiguration of the system as the working environment evolves.

The two modulation methods assessed as being compatible with the goals of multimode fibre and intrinsic modulation were microbending induced loss and acoustically induced differential phase modulation. Microbending loss modulation has the advantages over phase modulation in being more reproducible, considerably easier to implement and does not suffer from the fading inherent in the multimode phase modulation system. The major disadvantage of microbending is the need to remove the cable sheath firom the fibre to attach the modulator, removing the easy reconfigurability which was sought. Such a bare fibre would also be vulnerable to damage in a mining environment. The advantage of phase modulation over microbending is that it can be used on cabled fibre providing both the required reconfigurability and the resistance to damage. For this reason the phase modulation is considered the most suitable approach despite the greater difficulties involved in modulation and demodulation of the signal, the fading problem being reduced to an acceptable level by suitable signal processing techniques.

The results of the optical experiments illustrated the technique of phase modulation but the earner frequency used and the received signal to noise ratios were too low to be commercially viable although higher values have been reported at higher earner firequencies [60]. The further development of the fibre aspect of the network 7.4 depends mainly on the development of a commercial clip on modulator to allow a move to higher carrier frequencies and bit rates. This would require the evaluation of different modulator structures to help reduce the required power drain by focusing the generated acoustic energy more efficiently into the fibre. A redesign of the receiver to operate at the new carrier frequency would also be required.

7.3 Stochastic Bus Protocol

The unidirectional nature of the phase modulated bus required an alternative transmission strategy to be used from that of bi-directional systems where master slave or random systems with retransmission on error can be used. As there is no method of indicating when a station should transmit or when a collision and associated data corruption occurs the system must be evaluated on the assumption that data loss is inevitable. For a system used to transfer information on only slowly varying quantities, such data loss is not important as long as at least one valid data packet from an individual station gets through within an acceptable time. The developed system effectively uses redundancy to overcome the limitations of the umdirectional channel, sending more data than is required assuming a large proportion will be lost. The verification of the bus performance via simulation allowed conditions not physically realisable to be tested as well as permitting the evaluation of the random number generation algorithm used within each station, the use of random transmission timings being essential to stop a permanent deadlock occurring on the bus.

The R5485 system based on the stochastic protocol was initially conceived as a means of verifying the model and simulation results. The system does, however, function most reliably as a telemetry system. The RS485 drivers, being contention protected, withstood the inherent collisions on the bus without failure during all the test runs on the system. The major advantages of the bus are the simplicity of the outstations and the simplification of the bus control requirements from those of a conventional polled network. The host computer need not be reconfigured to install another outstation on the hnk as the host can be set up to accept data from any station address. If a commercial realisation of the bus were to be developed an obvious improvement would be to combine all the slaves functions into an ASIC; 7.5 8051 cores are now available as standard components in a cell library and the whole of a slave except the final bus line drivers could be readily incorporated with it. The CRC checking and random number generation could also be implemented in hardware to minimise the minimum time out between transmissions.

The developed system would be applicable to any monitoring function where the required variables are slow to change and loss of intermediate data is not significant. In the mining application the network would be used to replace tube bundle and other gas detection systems where response times of minutes are not uncommon, the probability of failing to get a reading over these time scales being insignificant at a reasonable data rate. The system could also be used with other forms of transmission. Any technique where two or more stations can transmit simultaneously without damage could be used, transformer coupling being the obvious one which has the advantage of being amenable to intrinsically safe design. Overall it is the stochastic protocol that has been the aspect of the research to after the most commercial potential and is now covered by a patent (Appendix 6) for further development. Appendix 1 Southampton Transducer Protocol

Al.O Interface circuits

Al.i Environmental software

A1.2 Motor controller software

Al,3 Bust test software BBC BUS

1/4 75188

1/4 75189

1/4 7400 1/4 75189

+5V +5V

: lOuF

^D3 V+ V+ 1N914 10X14) EC4 7660 Cap- Cop+ GND D4 IN914

:iOulOuFF lOuF D1 02 1N914 1N914I V- lOuF :iOuF Tcici)

ov

RS423 to RS485 interface circuit A1.1 Environmental Software

All the STP master software has been written in Basic [61] or 6502 Assembler [62]. Due to the limited memory available in the BBC microcomputer used, the programs have been implemented using overlays [63], procedures being loaded into memory from disc as required. The main environmental program "MAIN" therefore consists of only variable declarations, the overlay handling routine and calls to load and execute each of the main program procedures in turn. Memory space for the assembly language serial port and timer interrupt routines was also declared here to ensure its preservation during overlay swapping.

On initialisation the overlay handler loads the code segment in the file O.CODE which contains source code for the interrupt handlers written in assembler. These are then assembled by the Basic's internal two pass assembler which generates the executable code. The output is stored in the variable space previously declared in the main module. The baud rate and bus timeouts are also set up in this section. With the interrupt routines is a further initialisation procedure which patches the operating system interrupt and event vectors with the start addresses of the new handlers.

The serial port interrupt handler initially checks on entry that the interrupt is due to the 6850 UART by testing the status word. If the interrupt is from another source then control is handed on to the operating system. If the interrupt is due to the serial port then the type is identified from the status word and either the transmit or receive handler executed. The transmit handler sends the next waiting byte from the buffer and checks for the end of message character. If the last byte has been sent a one byte period delay is inserted, the receiver is enabled and the timer is set up to provide the bus timeout. The routine then exits via the original operating system vector. The receiver interrupt handler initially reloads the timeout timer with the maximum interbyte timeout delay and reads the received byte from the UART. If the end of message character has been received then the timer is disabled and a flag is set to indicate the successful reception to the main program. Again, on exit, the routine vectors to the operating system handler. The final routine is the timer event handler. This is only invoked on a bus timeout, the UART is disabled and a flag is set for the main program before control is returned via the operating system event vector.

The main program procedures are contained in a file O.EXECUTE loaded after O.CODE. All the required poll strings and display parameters are set up together with the display timer in the procedure "initialise". The working display is then generated by a second procedure procdisplay which draws the four bar graph frames and all the titles and scales. All bus operation is then controlled by a final procedure "procexecute" which polls each of the four configured stations in turn until interrupted by a user key press. The poll routine tries each station three times before assuming a fault and displaying the timeout error message. If a valid reply is received the new data is extracted from the response string, is scaled to match the appropriate display which is then updated to indicate this new value.

A1.2 Motor Controller Software

The STP motor controller software uses the same interrupt and vector initialisation code as the environmental display system software. The main program is however considerably more complex. Due to its size, the program was split into several overlay files each providing a related set of functions. This had the secondary advantage of increasing the memory available for storage of the motor control data tables.

The main program MOTORl generates the on screen display and calls the interrupt code initialisation routines in O.CODE. All further functions are then under user control, being selected by entering the appropriate letter from the display menu. The available options split easily into four groups. Those in O.FILOV provide basic file operations to load and save command table data prompting if data will be lost by loading new values over the unsaved current ones. This overlay also contains the generate routine which clears memory of all data and allows a new configuration of motors and their corresponding bus addresses to be loaded. The overlay O.TABOV contains a collection of routines to enter motor controller data on direction, speed, revolutions etc, to modify previously set values and to ease the step through the data tables present or select a particular one. Range checking is performed on all user input to prevent commands outside the air motor controller's range being sent across the bus.

All transactions on the bus are under the control of procedures in O.EXEOV. These are based on the poll procedures from the environmental system but they had to be considerably expanded to cater for the multiple poll types required to download all the information required by the motors. The overlay provides two main routines; one to action a selected command table from memory and a second to action all tables in sequence. Included in the polling routine was an automatic halt sequence which cancelled any active motors if an invalid response was received over the system. In addition to these main routines there were a few supplementary procedures which were held in the file O.GENOV. These provided the online command help explaining available options, the routines to list all the active tables to the printer and the test on exit to ensure data was not unintentionally lost.

A1.3 Bus Test Software

The bus test software developed for initial debugging of the bus is a development of the O.CODE program segment used in both the environmental and motor controller systems. The size of the program meant overlays were not required and all the necessary extra functions were simply added to the original overlay file. The program consists of a simple endless loop which waits for user input of a poll string to send, loads up the buffer and initiates a transmission. The response, or bus time out message if no reply is received, is then displayed. Appendix 2 Basic Fibre Theory

A2.1 Fibredyne

A2.2 Microbending A2.0 Optical Fibre Propagation

An optical fibre is a dielectric waveguide which confines light at the boundary between glasses of differing refractive indexes. A plane wave incident on such a dielectric boundary is both reflected and refracted by it (Figure A2.0); the angle of reflection is that of the angle of incidence, while the angle of refraction is given by Snell's law

sin 6j /ij sin 02 «2

If > ^2 then at a critical angle of 6^

e.-sin-'g'

the refracted wave no longer propagates and decays away from the boundary, at angles above 6^ the ray undergoes 'total internal reflection'. Light launched into a fibre core of higher refractive index than the surrounding cladding will propagate if its angle of incidence to the core cladding boundary is greater than 6^. The acceptance angle of a fibre is the range of input angles which meet this requirement (Figure A2.1).

26^" = 2 sin"^(njsin0^) = 2 sia.'^ ^(nl - n^)

from which is calculated the numerical aperture

NA = sin0j^ = M^sinGg = y(nf-n|) Reflected Ray

— ^-'•^Refra.c-teciR&y

1 y/ X

Incident Ray N1 N2

Figure A2.0: Snell's Law

N2

NA = SinCB-'n)

Figure A2.1: Fibre Acceptance Angles The number of modes that may propagate in a fibre is related to the normalised frequency V.

a = core diameter A, = wavelength

for values below 2.405 only one mode is bounded (in two polarisations) while for larger values the number of modes (for a step index fibre) is given approximately by

m = — 2

The distinction between single and multimode fibres is important both in terms of their properties and in the methods required to analyse them. In multimode fibre the fibre dimensions are large compared to the wavelength of light and geometric optics can be used,while in the single mode case a complete waveguide analysis is required.

A2.1 Fibredyne when a multimode fibre carrying coherent light is subjected to a change in length, refractive index, or diameter (normally a combination of all three) the modes are differentially phase modulated. This results in changes in the interference pattern at the photodetector giving an amplitude variation. The most significant of the fibre changes in causing this is that of length [64].

The detected amplitude variation results from three main mechanisms [65]:- a) Differential phase modulation

If an optical fibre is considered to be carrying two modes

^ 4 sin [w/ + Aesinw^f]

— sin + A G^sinw^r - 4)j

(Carrier = wj: Modulation = wj Relative carrier phase = ({> ) which are summed and square law detected, the resulting photocurrent is given by

i{t) = cos^ ^ [^(A 8 - A6^)sinw^f - ())j

This can be expanded and simplified assuming optimum relative carrier phase o =

Ht) = ±-^ (A0 - A 8^) sinw^r

b) Delay Demodulation

Delay demodulation occurs if the relative delay between interfering modes is significant with respect to W^. The second mode can be considered to include this delay r giving

— sin^w^r + A0 sin>v^(r - t) + (J)j which results, assuming

i(t) = ± A w X cos wj

the amplitude of this signal is dependent on the modulation frequency and at low frequencies in low dispersion fibres the effect is negligible. c) Triple Transit echo

Triple transit echo is caused by the reflections from the fibre end faces interfering with the direct signal resulting in a second mode

— Eg sin + 3A0sinw^f +

r^ = r2 = reflection coefficient a. = attenuation coefficient

If the delay propagation time is short with respect to the modulation frequency the resulting current is

z(f) = ± AGsinw^f

To reduce this effect it is therefore necessary either to reduce the fibre reflections or increase attenuation.

The most important of these three effects is differential phase modulation. The effect of delay demodulation is small fraction of that caused due to other effects assuming low dispersion fibre (graded index). Use of a low dispersion fibre is additionally important as the dispersion limits the fibre length over which the light remains coherent and therefore the length over which the fibredyne effect will still occur [66]. The maximum signal to noise ratio for these effects, assuming optimum optical bias can be calculated as 124dbm^^^ referred to a IHz bandwidth. This is far in excess of what would be expected in practice.

A2.2 Microbending

The principle of a microbending modulator is illustrated in Figure A2.2. The mechanical deformation of the fibre induces coupling between the different modes on the fibre,some of the coupling being to radiative modes the light therefore being lost. The coupling is maximised when the mirobend periodicity coincides with the difference in wave numbers of adjacent modes in the fibre [6 7].

If the two modes to couple are designated by propagation constants and k2 the the required value of B the modulator period is given by

1^, - Kj\ = 2WB

It can be shown that for step index fibres

K, - = |2Al/aj(/n/M)

where A = NA^Ilr^

n^ = core refractive index tx2 = cladding refractive index m = mode number M = total number of propagating modes NA = core numerical aperture for a parabolic index fibre the dependence on mode number disappears and Displacement

Light

Figure A2.2: Microbend Modulation K, - = K. - I = (2A)Va

For a 50uM graded index fibre = 0.015 this gives a typical value of B of 1.8 mm.

Overall it can be shown [68] that the loss is maximised when the bend pitch is set so that

B = Curn (NA)'^

C = core factor 1.42 for step index fibres, 2 for graded index fibres, r = core radius, n = core index of refraction, NA is the fibre numerical aperture. Appendix 3 SDK51 Receiver test software

A3.0.1 Main program

A3.0.2 Assembler interface code to SDK51 Monitor routines A3.0.1 Main Program

The SDK51 receiver test software is a control program for running timing and transmission error tests on the prototype 40khz FSK communication system. To simplify the program design all user input/output >vas via the system monitor although some interface routines were required to permit access. There were five main commands available to the user; the sixth just lists the other five, and the corresponding command letter, on the display with a three second delay between each. Four of the commands related to timing tests on the network, carrier lock delays with both high and low data and high to low and low to high transition timings. All four tests were carried out by the same procedure by passing it different command parameters. The selected test was performed for the requested number of iterations and the resulting minimum and maximum delays were then displayed. The final routine performs actual data transmission tests across the channel. The user enters values for the number of attempts and the carrier turn on delay. The routine then attempts the requested number of transfers using the values between 0 and 255 in sequence as data. Any missed or corrupt bytes are logged and at the end of the test the corresponding attempted corrupted and missed transfers are reported.

A3.0.2 Assembler Interface Code to SDK51 Monitor Routines

To allow access to the SDK51 monitor keyboard and display driver routines from within a PLM program it was necessary to write a set of interface routines which translated the PLM parameter passing and name conventions into those of the monitor program. The interface also contained the patch to the monitor start address vector. The available routines provide console status, keyboard character input, display blanking, character hex value and string output and a time delay function of 100/LtS times the 16 bit delay parameter. Appendix 4 Stochastic Bus

A4.0 Simulation Software

A4.1 Slave Software

A4.2 Interface prototyping card circuit

A4.3 Interface card software

A4.4 Host Software (Data logging version). A4.0 Simulation Software

The core of the Turbo Pascal V3.0 simulation program is the procedure SIM. This takes as input a list of parameters, read in from the simulation data file, which specify the number of slaves, the packet size, minimum and maximum timeout delays, and the overall simulation time. A dynamic data structure is then set up consisting of a linked list of records, one for each station in the simulation. Each record contains information on the station address, minimum and maximum timeouts and next transmission time. The simulation is then run for the required simulated time interval. The next station to transmit, the first in the list, is removed, its next transmission time is calculated and any collision with the next or previous station in the list is logged. The record is then reinserted in the list which is in transmission time order. Once the required interval has been run, the output procedure is called which generates a data file in a form suitable either for a human or a graphing progam to read. An important part of the simulation is the random number generator used. To allow the use of very large numbers while still using standard Pascal features the algorithm is calculated using a base 128 number representation. The disadvantage of this approach is the increased execution time over that of an optimised assembler equivalent.

A4.1 Slave Software

The slave station software is written in a mixture of PLM51 and assembler, the assembly language sections providing the Manchester transmission, CRC checksum calculation and random number generation functions. After initialisation, the main program enters an endless loop which calls any instrument control procedures and then transfers the results into the working data buffer. In the final version of the station, this instrument control was a PLM routine to drive the A to D converter and read back the results. Once the buffer is loaded, the CRC calculation function is called, the result being saved at the end of the buffer. Interrupts are then temporarily disabled while the new work buffer data is copied into the transmit buffer. The CRC routine was written in assembler to allow easier access for bit manipulation, the calculation being performed by a pseudo shift register implemented in bit addressable on chip RAM,

All the stochastic transmissions are carried out independently of the main routine by the timer 1 interrupt handler. On timeout the Manchester transmission routine is called which generates the required wave forms by bit shifting the data buffer values out to the port. To ensure correct timing, the opcode cycle times are carefully matched for each bit period. The majority of the code was generated by macro expansions as the time penalty of using subroutine calls was not acceptable. The timer is then reloaded with a new random value calculated by the random number generator. The generator was again implemented by macro expansions both to maximise execution speed and simplify parameter passing within the algorithm.

The A to D driver is a PLM module which controls the serial access device using four port bits for clock, select and data. All eight channels are read in one go, the previous result of one channel being clocked out as the command to convert the next is clocked in. PLM could be used as there is no real time constraint on this operation. A4.2 Circuit diagram

pa; 07 (Aj7rA28) AOA03* (Aj) 0«3 (A23(A2g); A0#3 WA6) 0O4J (JU4) AO7 (A22(A2j) AOa* (A*(Aa) 00! (All) A(M 7*SIJ« 7AALS44 74LS245

311) -sweww 74310 [912) -SwewA 7431jg (814(81 j)) -.(O-(ORW #3V 7*S00 74AL344 74SOO

CSIS 04 (Gin 7*300 ]* (CI2) Oi0W(C%3l (CM3) 01J(CI*012(013) LINKGPERArrO 70R 1N6 8[T 0I4(C17) 7*300 013(CI8) 3PA«e (CIO) -WEMW 7*LS243 10 20 7431 J* 74AL3%44 i8W Af PROTOTYPING aOARO GfRCUrr OlAGRAW

Block diagram

A00-A09 AOO-AO* AOORESS 3UFFER Aoa-Ao* OECOOEB

00-07 OAfA -(OR CONTROL -WW OATAauS -swew-SUEWwR COMMAMO -WEWW aUFF&R -I OECOOER -S8ME M!G3YTHE 9/16 arr 08-013 \ OA FA Sa_CCTOR SUFFER [8W AT PROTOTYP[NC 30ARO — SLOCK OIAGRAM A4.3 Interface Card Software

The interface card control program performs two functions: the first is to control the Manchester receiver circuit while the second is to buffer and pass on the received data to the host computer. The Manchester control routines are the time critical ones and are interrupt driven by the receiver hardware. There are three assembly language interrupt routines; the simplest, the timeout interrupt, triggers the one second status packet generation in the main program and as a secondary function toggles a LED indicator to show the system is running. The other two routines are triggered by external interrupts, one on the receiption of a valid packet from the receiver, the second on an error. On error the receiver input buffer is flushed of any data and restarted before a new packet could start to arrive. The error counter is then incremented. If an apparently valid packet is received, the overrun and CRC port check bits are tested and if no errors have been detected the input FIFO is read into internal RAM, the bit counter is cleared to enable the next packet to start and the data in internal RAM is then copied into the external buffer. This copy to external RAM cannot be done initially due to the longer external move instruction cycle times. These would result in the loss of the next packet. If an overrun or CRC error is detected, the Manchester receiver chip is reset together with the input FIFO, the system then being restarted. The main program is a simple data transfer routine. If a timeout interrupt has occurred, a status packet is loaded into the IBM FIFO, otherwise the next packet from the auxiliary data buffer is transferred. If the IBM FIFO is full, the routine waits for it to clear before continuing.

A4.4 Host Software (Data Logging Version)

Several versions of the data logging program have been written, the difference between them being in the output format of the received data, the core procedures and program functions being the same. In the logging system, the specified result file is opened and cleared and a message indicating the program run time remaining is displayed. The interface status register is then checked and if data is available the next data packet is read out of the FIFO buffer. If this packet contains status information the on screen error counts are uptdated, otherwise the record for the individual packet source address is updated. The process repeats until the required time has elapsed or until the program is interrupted by the user. The logged data is then written to the result file and the program terminates. If the interface should suffer a buffer overflow then any logged data is saved before the program exits. Appendix 5 Conference Papers

A5.0 Control of Air Powered Motors Using Distributed Processing J.K. Atkinson, R.P. Collins and S.S. Shahi INCEMADS 86, Eforie Nord, Romaina, 16-17 September 1986

A5.1 Fibre Optic Telemetry Link Using Unbroken Fibre lEE Computing and control colloquium on:- The application of fibre optics in control and process engineering 17 March 1987

Eurosensors 87, 3rd conference on sensors and their applications Cavendish Laboratory Cambridge 22-24 September 1987 CONTROL OF AIR POWERED MOTORS USING DISTRIBUTED PROCESSING

J.K. Atkinson, R..P. Collins and S.S. Shahi University of Southampton, ENGLAND

INTRODUCTION

As a result of a research project carried out for the National Engineering Laboratory, East Kilbride, Scotland, a smart air motor controller has been developed. The air motor controller is microprocessor based and implements a digital control system capable of accurate speed and position-control. This paper describes how the high degree of positional control possible can be employed to allow multi-axis control of more than one air motor connected to a central controlling microcomputer. The system implemented uses distributed processing over a common data path employing the Southampton Transducer Protocol.

THE AIR MOTOR CONTROLLER

The air motor developed at NEL consists of a tri-lobed cam and four radial pistons giving 12 possible stopping positions. It is thus possible to control the motor in a manner akin to a Stepper motor. The details of the air r 11 motor have previously been described and as such a full description is

not included here, however some of the advantages of the device are listed

below.

The air motor has a very good torque/weight ratio and is cheaper than the

equivalent electric drive. The motor is supplied with oil-free air and is

consequently very attractive for applications where non-contamination is

important.

The only electrical signals applied to the motor are the low voltage drive signals to the air control valve and the position sensor, hence opening up the possibility of Intrinsically Safe operation in hazardous environments.

Figure 1 shows the block diagram of the air motor controller, the position of the air motor Shaft is determined by a four bit Grey coded shaft encoder employing opto-reflective sensors. The drive to the bidirectional proportional solenoid valve is a pulse width modulated, constant amplitude signal with the power to the valve being determined by the mark/space ratio, hence obviating the need for analogue control signals.

Opto switches for Grey Code 4 bit absolute Pattern Disc position •~~0 Air motor •—a —-•a Shaft

I Opto switch for Inlet and Outlet Ports rev. mark / A Bidirectional proportional solenoid valve

vL 1 ""I

V Controller V

Exhaust O — — Host Computer Interface (STP) Filtered <2 Air supply

Figure 1 Block diagram of motor controller

The microprocessor accepts high level commands from a host computer over a shared data path and implements a local three term (PID) controller in software. The high level commands can specify user defined parameters such as direction, speed, acceleration, number of revs. etc. In addition it is possible to instruct the controller to carry out cyclic operations by issuing commands detailing the number of consecutive events and the time interval between events.

Since the control software implements a PID controller any change in the operating characteristic of the motor must be matched by a resultant change in the control algorithm. As can be seen from Figure 2, the operating characteristic is dependent on the inlet pressure from the air supply to the motor.

Thus in order to maintain accurate control of the motor a means of determining inlet pressure and choosing the required coefficients is required.

The principle of operation of the control software is shown as a simplified flow diagram in Figure 3. The user specified parameters position, speed. acceleration and direction are supplied to the controller which then attempts to accelerate the motor accordingly. If the speed and acceleration profile chosen results in the motor position reaching half the displacement required the motor is decelerated immediately in order to stop precisely at the required position. If the motor reaches the required running speed a breakpoint position is calculated from where the motor will eventually be decelerated to the desired position. In either instance the final position is approached at low speed in order to minimise overshoot. Should overshoot occur however, the motor controller will reverse direction in an attempt to correct the overshoot at base speed.

lOO-r- 0.5i 40

0.4f. 30--

gO.af o o I LU cr 2r Z) U31 o 0.2 z ocr o cc 5 10 O.Lr UJ CCLU

0 - 100 200 3M 400 500 GOO 700 800 900 1000 SPEED (rpm)

Figure 2 Air motor performance curves

The coefficients for the PID controller (K^, & K^) are determined with reference to a pressure sensor connected to the Shared data path as described in the next section. ^ START j

9 01 a d SET BY USER 9 = position (inrevs) (1) z'speed (RPM) a : acceleration factor

LOSURE INLET PRESSURE d = direction ANO OOH: APPROPRIATE NCCEL OF SYSTEM

ACCELERATE NOTOR AT RATE A TILL NEW SPEED >(U OR POSITICN > 9/2

BRING KOTOR TO l-WKE NOTE OF UhE TAKEN BASE SPEEDw TO REACH ^GV SPEED 4 CALOLATE BREAKPOINT (PR) FCR CECEL VHK; PR < 9

POSITION FINISH NEW POSITICN

NEW POSITICN > 9

COfUIE ERROR (E) i k/e, KpE., Kd 6E, IRtCT-0\£R- CECREASE POlfR aj-HJIE KJE, Krf. MOT A\0 flN AT ACCDRDmY Kd6E INCREASE 3ASE SPEED POER ACCCnDLW

Figure 3 Simplified flow diagram of the controller The motor controller replies to a poll from the controlling microcomputer with the following format

: a^a^a^ A M S XX CR LF

where

= unique start character = 3 digit controller address AM = indicates Air Motor controller S = status message

X = status Y = command accepted (repeated) N = command not accepted CR = carriage return LF = line feed

Figure 4 shows the system topology with the air supply pressure to the air motor being monitored by a smart sensor connected to the multi-drop bus.

Air Motors Host i Multidrop (RS485) bus Micro- comouter V Pressure #1 #2 m Sensor

Air suippiy0 .

Figure 4 System interconnection

The controlling microcomputer periodically polls the pressure sensor using the same STP message format as for the motor controllers. The pressure sensor replies with the reading of the air inlet pressure in PSI. Figure 5 shows the messages as they appear on a VDU connected directly to the bus with, in this case, a pressure sensor at address 300 and an air motor controller at address 302.

The reply from the pressure sensor is also monitored by the air motor controllers and used to internally compensate for any change in air motor characteristics as previously described. SYSTEM INTERCONNECTION

The motor controllers for the individual air motors are connected to the central controlling microcomputer via a multi-drop bus. The bus provides power to the controllers in the form of +15 volts, -15 volts and ^ volts and in addition a differential line drive digital communications channel \2^ employing RS 485 compatible transceivers. The power and data lines are implemented using a twin twisted pair cable with a common shield connected to ^ volts.

Data to and from the air motor controllers is transmitted using the Southampton Transducer Protocol which uses an ASCII encoded message format. The format of a message transmitted from the controlling microcomputer to the air motor controller is as follows:-

* 3^32^3 ^I^2'^3'^4'^5 d^d^d^d^d^CR LF

where

* = unique start character a^a^a^ = 3 digit controller address C = command type d^d^d^d^d^ = 5 digit command parameter (repeated) CR = carriage return LF = line feed

The command types are specified as follows

S = speed (RPM)

A = acceleration/deceleration

D = direction R = number of revolutions C = number of consecutive events W = wait time between events

all of which are followed by a 5 digit parameter value, and two which are

not:-

G = go (start sequence) T = poll motor controller status ::%/.v:302«EY. -'. Mc:': *302S3108091B00):: > -v- ^^rSaZfinSTr-- L : ^-:;v vi-v: *3O2fiEe35003253i.^; V- :302aiSY-. -••.w- '^ •'.v: :*302CB020020G20B',:\: -r

tr-s :c22=Ti)53237702877-

,;i;;;:':E25PTI)5E2375e2a75^/::; '; ###%#

V-;r :322PTB58337432374i MMsimme

Figure 5 STP message format on the bus

MULTIAXIAL CONTROLLER

The system shown in Figure 4 has been implemented using a BBC microcomputer as the central controlling (or host) computer. In order to facilitate the programming of a complex sequence of motor movements, a technique for enter-

ing data tables of motor operations has been developed. The user interactively

fills in a template, or data table, for each independent set of motor movements

required which is then tagged with a sequence number and stored. When a

complete sequence of tables have been produced the user can initiate the

sequence where upon the sequence is replayed on the microcomputer screen

as the necessary commands are issued to the motors. Effectively what happens

is that the relevant motors are downloaded with the required parameters

(position, speed, direction etc.) and then given a GO command. The motor

controllers are then polled until all active motors have indicated that the •

commands have been carried out, at which point the next set of parameters

from the following data table are downloaded.

The pressure sensor is also periodically polled to obtain the air supply

resevoir pressure and this information is displayed on the microcomputer

screen as well as being used by the air motor controllers to adopt their

individual PID coefficients. Figure 6 shows a typical screen format for

a tri-axial position controller. The parameters for the three motors are

displayed in the template with the pressure reading appearing as a horizontally

moving bar graph at the bottom of the screen. ?:'tlKEt?;-i. JtlTO--ii MtHESS,: t -lEHSr,!- eUKIHIs:- SnW" i - Kt i, l-Ji.leHw'fi .. li- I? llll^'-i: FofMfdM Mli-i" Hi'; I actio : 3"r "l«wfi-r 1111: I lctiH> J I 7il Firwi "i V3«":,r

" MM- . oiana Kina - •- I UK fiU- -. ' t triitf talt' - I m lUMKt;- I III; ciwW: r s Sm HUt V : A « Miff liM«~ f hKrtt• I Tjfi fill,

: Y. • II- tnmt tmmm

Figure 6 Typical microcomputer display

SUMMARY

The system, as currently implemented, can cater for up to 10 air motor controllers connected to the one bus. In theory this number can be expanded still further, but with the constraints of the available memory and processing capability of the microcomputer used there is a practical limit. The Southampton Transducer Protocol also imposes a limit on system capability once the motor parameters are transmitted as serial ASCII characters at 4800 band. The use of a higher data transmission rate would of course improve on the motor controller response times for parameter downloading although local control of each individual motor is unaffected by the data rate. Since the sequence of events for a data table to be implemented is to download all active motors prior to issuing a GO command only that time taken to load the parameters can be improved upon.

The potential application of the type of system described here are too numerous to mention, however it can readily be appreciated that the general area of robotics and machine control could well benefit. The availability of light, clean intrinsically safe actuators capable of intelligent control should

inspire many further applications.

REFERENCES

[1] Dunlop, R.W. and Shahi, S., "Development of a microprocessor controlled

' oil free pheumat'ic motor", Proc. Aapheher Fluid Technisches Kolloquium,

Aachen, March 1986.

[2] "Line circuits for IEEE-488 and EIA Industry Standards", Texas Instruments,

1982.

[3] Atkinson, J.K., "Addressable transducer protocols", Proc. CAPTEURS '84,

Paris, pp. 307-316, June 1984. A Fibre Optic Telemetry Link Using Unbroken Fibre

R.P.Collins and J.K.Atkinson Department of Electronics and Computer Science, University of Southampton. The use of fibre optic for the transmission of telemetry data in instrumentation is of considerable interest due to the signif- icant advantages offered by this particular technology. Primarily the high level of noise immunity and intrinsically safe nature ot fibre optic have been the reasons behind this interest although the available bandwidth and distance transmission capabilities have obviously contributed. Hitherto the use of fibre optic in instrumentation systems has largely been confined to the impleme ntation of point to point communication links. Recent developments in the use of distributed intelligence within instrumentation systems have generally tended to concentrate on the concept of multiplexed signal paths . The reasons for so doing are fairly obvious and the concept of a factory-wide data highway forms the basis of many of the current generation of instrumentation networks in existence. Certainly the strongest contenders amongst the emerging standards, including the widely supported MAP^, are based on the principle of a multi-drop bus. The difficulties associated with realising a multi-drop trans- mission path would appear to account for the main reason why fibre optic has not generally been embraced by the instrumenta- tion community thus far. The principle difficulty would appear to be the problem of tapping into a fibre optic bus. This probl can be subdivided into two distinct areas, firstly the degrada- tion of system performance brought about by the inclusion of a large number of taps in the transmission path and secondly the difficulty of making a connection in a typical instrumentation environment. The degradation of system performance due to the use of taps is attributable to the fact that it is impossible to introduce a coupler into a fibre without adding loss. Although continual improvement in coupler design is gradually reducing the level of insertion loss, the necessity to divert light into each receiving node on a network dictates that a significant attenuation in signal level must ensue as a result. For a typical instrument- ation system employing many nodes the problem becomes one of dynamic range in that nodes at opposite ends of a network are likely to experience vastly differing levels of received signal. The difficulty of making a connection in many instrumentation environments stems both from the effect of the environment on the task of making a connection and the potential effect on the environment of the connection process. In the former case many instrumentation systems are installed in areas which are not conducive to the attainment of a low-loss connection due to the problems of contamination, e.g. coal mines, offshore oil plat- requirements for Intrinsic Safety.

binary signal using frequency shift keying.

C« tec tor Source

Modulator*

Figure 1 - Continous Fibre Multidrop Bus

inevitable loss of colliding data packets. The initiation of transmissions from the connected nodes, or outstations, is achieved on a random basis with each outstation maintaining a random number generator which determines the time intervals between transmissions. The randomly derived time inter- vals are arranged to have a uniform distribution with an average value given by;

^AV

A collision occurs if any two data packets of duration L are commenced during a time interval 2L. The probability of a station transmitting within this time interval is given by:

P = 2L/T^v (1) The probability of only one outstation transmitting at a time can be derived from the binomial function using the probability of transmission given in (1) above,

Pu(l) = NP(1 - P)N-1 (2) where N is the number of connected outstations. Figure 2 shows a plot of (2) against (1) for systems involving various numbers of outstations. In general it can be shown that is maximised by the situation;

1 P = (3) N Hence the optimum relationship between average transmission interval, packet length and the number of outstations is derived from (1) and (3) as;

^AV = 2LN (4) Thus for a given packet length, Tj^y can be calculated to optimise system performance according to the number of connected out- stations . Perhaps one of the biggest disadvantages Of such a system of data multiplexing however is that there will always be a finite proba- bility of a station being unable to transmit a collison free data packet in any given time period. In practice with a suitable choice of average transmission interval the probability of unsuc- cessful transmission can be made extremely small. The probabi- lities of such an occurance are plotted in figure 3. Pn{l) vs p rransmissiorLS for a given Pfatl Trommitsionf 60r 2 SUtion* i Sl.tdnns — to Station* 30 SU(.>onf

W • lE-6 :E-lE-87 lE-9

' ' ' ' 0.00 0.10 0.20 O.JO 0.40 0 50 0 10 20 JO 40 M 60 70 80 p • 21/Tov NumWf ol S(otie«vi

Figure 2 Figure 3

The results for system performance quoted have been derived from a computer simulation of the system. A practical implementation using 40 KHz ultrasonic transmitters clamped to a 65 micron core optical fibre with a Helium Neon laser source has been found to suffer significant signal degradation due to fading. Further work is currently in progress aimed at improving signal detection. A parallel task is also being carried out to realise a copper wire implementation using RS485 differential line drivers with twisted pair. Experience in using RS485 to date has shown that trans- mission errors are not encountered in normal usage. As a conse- quence it is expected that the performance of the copper wire implementation will more closely fit the simulation model and allow some measure of the degradation due to the fading in the fibre optic to be quantified practically.

Acknowledgements The authors would like to acknowledge the support of Sieger Ltd., of Poole, Dorset. In addition, one of us (RFC) acknowledges the support of SERC. Our thanks also go to the Fibre Optic research group at Southampton University for their active help and advice.

References (1) Atkinson, J.K., "Communication Protocols in Instrumentation", J.Phys.E: Sci. Instrum. 20 (1987). (2) General Motors, "Manufacturing Automation Protocol", Version 2.1, (1985). (3) Culshaw, B., et al., "Fibredyne data collection system for industrial telemetry application", SPIE, Vol. 355, (1982). Appendix 6 Patent Application PAB/28620

UNITED KINGDOM PATENT SPECIFICATION

Application No. 8706272

Application Date 17 MABCH 1987

Priority Date 17 MAECH 1987

Applicant SIEGER LIMITED

Reddie & Grose Chartered Patent Agents European Patent Attorneys 16 Theobalds Road London WCIX 8PL

Telephone: 01-242 0901 Telex: 25445 Reddie G LDE No. 280 — 1 —

FIBRE OPTIC TELEMETRY

The present Invention relates to Improvements In data

transmission networks, especially, but not exclusively networks using fibre optics cable. It is also concerned with a system for

converting electrical signals into optical signals in a fibre optic

cable.

The use of fibre optic for the transmission of telemetry data

in instrumentation is of considerable Interest due to the

significant advantages offered by this particular technology.

Primarily the high level of noise immunity and intrinsically safe

nature of fibre optic have been the reasons behind this

interest although the available bandwidth and distance transmission

capabilities have obviously contributed. Hitherto the use of fibre

optic in instrumentation systems has largely been confined to the

implementation of point to point communication links.

Recent developments in the use of distributed Intelligence

within instrumentation systems have generally tended to concentrate

on the concept of multiplexed signal paths. The concept of a

factory-wide data highway forms the basis of many of the current

generation of Instrumentation networks in existence. Certainly the

strongest contenders amongst the emerging standards are based on the

principle of a multi-drop bus.

The difficulties associated with realising a multi-drop

transmission path would appear to account for the main reason why

fibre optics has, to date, not generally been taken up by the

instrumentation systems. The principal difficulty would appear to

be the problem of tapping into a fibre optic bus. This problem can

be subdivided into two distinct areas, firstly the degradation of

system performance brought about by the inclusion of a large number

of taps In the transmission path and secondly the difficulty of

making a connection in a typical Instrumentation environment.

The degradation of system performance due to the use of taps is

attributable to the fact that It Is impossible to Introduce a

coupler Into a fibre without adding loss. Although the continual

Improvement in coupler design Is gradually reducing the level of

insertion loss, the necessity to divert light into each receiving - 2 - node on a network dictates that a significant attenuation In signal level must ensue. For a typical Instrumentation system employing many nodes the problem becomes one of dynamic range In that nodes at opposite ends ofa network may well experience vastly differing levels of received signal. The result of this dependency of receiver signal levels on network position detracts significantly from the advantages of using a common data path.

The difficulty of making a connection in many instrumentation environments stems both from the effect of the environment on the task of making a connection and the potential effect on the environment of the connection process. In the former case many

Instrumentation systems are installed in areas which are not conducive to the attainment of a low-loss connection due to the problems of contamination, for example, coal mines, offshore oil platforms, flour mills. Secondly these environments are often designated as hazardous areas and the use of arc splicing techniques, generally regarded as the best means of achieving a low-loss fibre optic connection, are consequently precluded under the requirements for intrinsic safety.

According to the present invention in a first aspect, a method for converting an electrical signal to an optical signal in a fibre optic cable comprises applying the electrical signal to a piezo- electric modulator in contact with the fibre optic cable so as to apply an acoustic wave to the fibre optic cable, and passing light through the acoustic wave in the fibre optic cable whereby the light is modulated at the frequency of the electrical signal.

The present invention also provides apparatus for converting an

electrical signal to an optical signal comprising a piezo-electric modulator, a fibre optic cable, the fibre optic cable being clamped

against the modulator so that when energised the modulator applies

an acoustic wave to the fibre optic cable.

In use light from a source is directed into one end of the

fibre optic cable and a detector is arranged to examine the light at

the other end of the cable. The cable may be clamped between the

crystal of piezo electric modulator and another fixed surface so

that when an electric signal is applied to the piezo-electrlc

crystal it compresses the cable transversely at the frequency of the 1/1

So\j£.(£ •r\

Fi g Lire 1

/*n(l) VI p NO MO I kaUww t StkliaM >0 titlMM 0.W ' M kmlWw

ft.40

8.x

e.»

o.to

OM ».00 0.10 O.N 0.30 0.40 O.M f m V** Figure 2

Transmissiora /or a given P/oil

•Or

10

40

— lt-» 20 11-7

10

J0 tIo "lLo M «0 M io Jo C

r i M 'T: r ? — 3 — signal. These compressions cause the phase of the light passing through the cable to be altered at the same frequency. In a multi- mode optical fibre the distribution of light Intensity across a cross-sectional area of the fibre consists of a pattern of light and dark areas resulting from the Interference of the light propagating

In the various modes. If the detector Is located to observe the light at a particular point on the cross-section or on a magnified image of the cross sectional pattern, the light at this point will vary in intensity at a frequency corresponding to the frequency of the electric signal as the pattern of light and dark areas changes at the same frequency as a result of the phase modulation ofthe modes.

The present Invention can thus be used to realise a fibre optic multi-dropped bus utilising an unbroken fibre as the transmission path. The technique employed involves the modulation of light within the fibre using an acoustic wave to vary the characteristics of a multi-mode fibre resulting in a differential phase modulation

of the propagating modes. Figure 1 shows a diagrammatic form of

the network with the connected nodes individually modulating the

fibre via piezoelectric modulators. The resulting variations in

phase cancellation and addition of the propagating modes produces an

output signal at the detector at the frequency of the modulators.

Data from individual modulators may be transmitted as a binary

signal using frequency shift keying.

Multiplexing of data from a number of modulators can be

achieved using either frequency division multiplexing (FDM) or time

division multiplexing (TDM). FDM requires that each modulator

employs a different carrier frequency and that the detector filters

out each of the utilised frequencies. TDM allows the individual

modulators to be identical and obviates the need for configuration

dependent filtering usually at the expense of requiring some

arbitration method or protocol. Since the system described here

does not allow the transmission of data to the connected nodes the

use of a two-way protocol is precluded. Instead the method adopted

uses the technique of allowing collisions of data to occur on the

bus on the basis that they can be detected and the data can be

subsequently ignored as invalid. It is immediately apparent that - 4 - there must be some redundancy in the utilisation of the available channel bandwidth to accommodate the overheads of data validation

(in the form of transmitted check codes) and the inevitable loss of colliding data packets.

The initiation of transmissions from the connected nodes, or outstations, is achieved on a random basis with each outstation maintaining a random number generator which determines the time intervals between transmissions. The randomly derived time

Intervals are arranged to have a uniform distribution with an average value given by:

•^MAX - '^MIN

2

A collision occurs if any two data packets of duration L are commenced during a time interval 2L. The probability of a station

transmitting within this time interval is given by:

P = 21/T^y (1)

The probability of only one outstation transmitting at a time

can be derived from the binomial function using the probability of

transmission given in (1) above, ?%(!) = NP(1 - P)N-1 (2) where N is the number of connected outstations.

Figure 2 shows a plot of (2) against (1) for systems involving

various numbers of outstations. In general it can be shown that

is maximised by the situation:

1

N (3)

Hence the optimum relationship between average transmission

interval, packet length and the number of outstations is derived

from (1) and (3) as:

T^V = 2LN (4)

Thus for a given packet length, T^y can be calculated to

optimise system performance according to the number of connected

outstatlons.

Perhaps one of the biggest disadvantages of such a system of

data multiplexing however is that there will always be a finite - 5 - probability of a station being unable to transmit a collision free data packet In any given time period. In practice with a suitable choice of average transmission Interval the probability of unsuccessful transmission can be made extremely small. The probabilities of such an occurance are plotted in Figure 3.

The results for system performance quoted thus far have been

derived from a computer simulation of the system. A practical

implementation using 40 KHz ultrasonic transmitters clamped to a 65 micron core optical fibre with a Helium Neon laser source has been

found to suffer significant signal degradation due to variations in

the intensity of the light source obscuring the variations In light

signal due to the the accoustlc wave. However, with a sufficiently

stable light source these problems should not arise.

Thus, according to the present invention in another aspect, a

network for monitoring the outputs from several sources, comprises a

bus, each source being connected to apply signals to the bus, and

each source being arranged to deliver its output signals at random

intervals by means of a random number generator. The average time

Interval between transmission should be chosen in relation to the

length of the data packets and the number of sources that there is

an acceptable high probability of data being received from any given

transmitter within a specified time. The system is preferably

Implemented In a fibre optic cable system as described above but it

could be Implemented in other ways, for example, a copper wire

implementation using RS485 differential line drivers with a twisted

pair bus.

The Invention described above may be used in various

applications. For example, it may be used to monitor the output

from a system of gas detectors deployed in a mine. Each detector

can be connected to the bus and arranged separately with transducing

means to issue its output signals to the data bus at random time

Intervals using independent random number generators to determine

the time intervals. References

1. Electrical Instruments In Hazardous Locations Third edition revised and enlarged I.S.A. Ernest C Magison 1980

2. BS5501: Part 1: 1977 EN50014 Electrical apparatus for potentially explosive atmospheres. General requirements.

2A. Part 5:1977 EN50018 Flameproof enclosure'd' 2B. Part 2: 1977 EN50015 Oil immersion 'o' 2C. Part 4: 1977 EN50017 Powder filling 'q' 2D. Part 8: 1977 EN50028 Encapsulation'm' 2E. Part 3: 1977 EN50016 Pressurised apparatus 'p' 2F. Part 6: 1977 EN50019 Increased safety 'e' 2G. Part 7: 1977 EN50020 Intrinsic safety 'i'

3. BS5420: 1977 IEC144: 1963 Specification of protection of enclosures of switchgear and control gear for voltages up to and including lOOOV ac and 1200V dc

4. BS5345: Part 1: 1989 Selection, installation and maintenance of electrical apparatus for use in potentially explosive atmospheres (other than mining applications or explosives processing and manufacture). General guidelines.

5. Sheingold D.H. Transducer Interfacing Handbook Analogue devices 1980

6. Code of practice for mines equipment for telecontrol, definition Gerat und Anlagen dur Femwirklecknic, BB22444, BLATT 1, October 1982

7. Brignell J. E. The Sensor Revolution Phys. Bull. 36, p342, 1985

8. Cooper A. R., Brignall J. E. A Magnetic Field Transducer With Frequency Modulated Output J. Phys. E:Sci.Instrum., Vol 17, 1984 9. Charlish G. Radio Links Could Cut Big-Site Expense Financial Times Monday December 2nd 1985

10. Tortoiseshell G. Safety of Fibreoptic Systems in Flammable Atmospheres SPIE Vol.552, Fibre Optics 85 (Sira) 1985

11. Tortoiseshell G. The Safety of Optical Systems in Flammable Atmospheres Fourth International Conference on Electrical Safety in Hazardous Areas Conf Pub No 296, London, November 1988, lEE

12. Reference Model of Open Systems Interconnection ISO/TC97/SC16, DIS 7498, ISO, (1983)

13. Atkinson J. K. Addressable Transducer Protocols Proc. CIAME Conference Capteurs 84 (Paris.CIAME), p307

14. EIA Standard RS485

15. American Standards Association American Standard Code for Information Interchange (ASCII)

16. BS6556: Part 3: 1985 Low Speed Digital Signals for Use in Coal Mines Specification for Message Protocols

17. BS5754; 1987 British Standards Specification for Electrical Analogue and State Signals for Use in Coal Mines

18. NCB Applications Data Protocol V7.3 Issue 2, Aug 1987

19. British Standards Institution 1986 Fieldbus Standard for Use in Industrial Control Systems. Functional Requirements. BSI AMT/7 SC65C/WG6

20. General Motors 1985 Manufacturing Automation Protocol Version 2.1

21. IBM 1986 Synchronous Data Link Control, General Information GA27-3093-2, File No GENL-09

22. Ministry of Defence 1980 Avionic Data Transmission Interface Systems US MIL-STD-1553/B, DEF STAN 00-18 23. The ISIbus Concept SI Senter for Industriforsknig, Oslo

24. Jones S. T. 1981 Internal Note No 81/208 NCB Communication Between Intelligent Subsystems and The MINOS Computer System. The HDLC Protocol.

25. The 1553 Bus Refresh Electronic Product Design Feb 1984

26. Burton P. R. Fieldbus Based On MIL-STD-1553B ERA Technology Electronics Systems Division Nov 1988

27. Michael J.F. Digonet, Shaw H. Analysis Of A Tunable Single Mode Optical Fibre Coupler JOQE v0i.QEI8, No 4, April 1982

28. Kowaski B. S., HiU K. 0. Low Loss Access Coupler For Multimode Optical Fibre Distribution Networks AO Vol 16 No 7, July 1977 pi 794

29. Lee N., Rhodes Interaction of Network Design and Fibre Optic Component Design in Local Area Networks JOSAC Vol SACl, No 3, April 1983 p489

30. Aucher F., Witle H. H. Optimised Layout for Databus System Based on a New Planar Access Coupler AO Vol 16 No 12, December 1977 p3140

31. Spillman W. B., Gravel R. L. Jr., Soref R. A. Failsafe Fibre Optics Data Bus Using Active Multimode Mirror Terminals AO Vol 17 No 23, December 1978 p3822

32. Hensel P. Local Area Networks and the Impact of Optical Fibres Electronics and Power Nov/Dec 1983 lEE

33. Culshaw B. Optical Sensor Multiplexing Systems Conf. Proc., Sensors and Systems, Vol 1, p47 May 18-20 1982 Pasadena, CA, USA

34. Lagakos H. et al Multimode Optical Fibre Displacement Sensor AO 1981, Vol 20, No 2 pi 67 35. Personic S. D. Photon Probe, An Optical Time Domain Reflectometer Bell Syst. Techn. Journal, March 1977, p355

36. Culshaw B., Giles I. P., Pond J. C., Sadler A. A. Fibredyne Data Collection System for Industrial Telemetry Application SPIE Vol 355, pl32 1982

37. Nosu K. Acousto-Optic Phase Modulator For Single Mode Fibre Electronics Letters. August 1983 ol 19 No 16

38. Culshaw B. Optical Sensor Multiplexing Systems Sensors and Systems 82 Pasadena

39. Fields J.N.,Smith C.K, et al Multimode Optical Fibre Loss-Modulation Acoustic Sensor Conf On Optical Fibre Communication 1979

40. Grossman M. Focus on Fibre Optic Connectors: Low Cost LinMng still a Challenge Electronic Design. November 12 1981

41. Kingsley S.A. Multimode Optical Fibre Phase Modulators and Discriminators: 2 Experiments Electronics Letters, Vol 14, No 11, May 1978

42. Fibre Optic Sensors and Transducers Electronic Product Design. June 1982

43. Shanmugan K.S Digital and Analogue Communication Systems Wiley 1979

44. Taube, Schilling Principles of Communication Systems McGraw Hill 1971

45. Ball P. R., Culshaw B., Kingsley S. A. Recovery of Phase Modulated Signals in Multimode Optical Fibres SPIE Vol 232 1980 International Optical Computing Conf.

46. Kingsley S.A., Davies D. E. N., Culshaw B., Howard D. Fibredyne Systems Conf. Proc. FOC 78 pi 52

47. Gallatree H.R Ultrasonic Applications of PVDF The Marconi Review. First Quarter 1982 p49 48. Marcus M.A. Ferroelectric Polymers and Their Applications Research Laboratories Eastman Kodak Co, 1981

49. Carome E.F, Koo K.P PVF2 Phase Shifters and Modulators for Fiber Optic Sensor Systems. Proceedings of IEEE Ultrasonic Symposium p710 1980

50. Hussey C.D Modes on Optical Fibres Lecture Notes on Optical Commmunication

51. Papoulis A. Probability, Random Variables and Stochastic Processes McGraw Hill 1984

52. Hodge S. E., Seed M. L. Statistics and Probability Blackie and Son Ltd 1972

53. Abramson N. The ALOHA System - Another Altemtive for Computer Communications Fall Joint Computer Conference 1970

54. Jennergen L. P. Discreet Events Simulations Models In PASCAL/MT+ On A Microcomputer Chartwell Bratt Ltd 1984

55. Fishman G. S. Concepts and Methods In Discreet Event Digital Simulation John Wiley and Sons

56. Knuth D. E. The Art of Computer Programming Volume 2/Seminumerical Algorithms Addison Wesley 1969

57. Kregszig E. Advanced Engineering Mathematics Wiley 1979

58. J.K Atkinson Communication Protocols in Instrumentation Internal Report

59. Intel PL/M51 Users Guide REV-001 November 1982

60. Howard D. Optical Fibre Acousto-optic Modulators The Radio and Electronic Engineer. Vol 49. No 9. p460 1979 61. Coll J. BBC Microcomputer User Guide British Broadcasting Corporation 1982.

62. Bray, Dickens, Holmes The Advanced User Guide For The BBC Micro Cambridge Microcomputer Centre 1983.

63. Quick P. Overlays Saving Bytes Acorn User Nov 1983

64. Davies D.E.N, Kingsley S. Method of Phase Modulating Signals in Optical Fibres: Application to Optical-Telemetry Systems Electronics letters. Vol. 10. No 2. January 1974

65. Davies D.E.N.. Kingsley S. Multimode Optical-Fibre Phase Modulators and Discriminators; 1-Theory. Electronics Letters. Vol. 14. No 11. May 1978

66. Culshaw B. Giles LP Long Distance Optical Fibre Telemetry Proceedings Communications 82, lEE Conf Pub, No 209

67. Culshaw B. Optical Fibre Sensing and Signal Processing Peter Peregrinus Ltd 1984

68. Medlock R.S Review of Modulating Techniques for Fibre Optic Sensors Int J Opt Sens, Vol 1, No 1, p 43-68, January 1986.