Practical Stuff Part-3

 

About HART — Part 3

 

Part 3:  Ponderous Stuff

Equation Describes CPFSK

    The HART signal is described mathematically as

where V = signal voltage, t = time, Vo = amplitude, Theta_sub_0 is an arbitrary starting phase, and Theta(t) is given by

wpeC.gif (2098 bytes)

where Bn(t) is a pulse that exists from 0 < t < T and has a value of   1 or -1, according to whether the nth bit is a 0 or 1.  T is one bit time.   If phase is plotted versus time it is a steadily increasing value that increases with two possible slopes.

Generating HART Signal With MATLAB

    The following “M” file listing is a program for generating HART modulation with MATLAB [3.1].  This is useful for testing or simulation.  The program uses random input bits and generates square, trapezoidal, and sinusoidal outputs.  The output ranges from -1 to +1.  Figure 3.1 is an example of the output.  The curves have been separated for clarity.  The bottom curve is the modulating signal.

%   hartgen.m
%   Generates HART signals.
%   Stephen D. Anderson --- November 29, 1999.
%   Arrays are identified by a capital letter.
    clear;
%   comment out the following statement to get a different set of
%   random bits each time program is run.
    rand('seed',0);
%   Generate a random bit stream.
    numb_bits = 200;
    Bits = round(rand(numb_bits,1));
%   Convert bits to levels of +/- 1.
    Xmit = 2*Bits - 1;
%   Generate bit boundary times.
    H_time = (0:(length(Xmit)-1))*(1/1200);
%   Set sample rate to 50 kHz.
    sample_time = 1/50e3;
%   Sample the transmit bits.
    i=1;
    for j=1:length(H_time);
        while ((i-1)*sample_time <= H_time(j));
            Sample(i) = Xmit(j);
            i = i + 1;
        end;
    end;
%   Generate the accumulated phase at each sample.
    Accum_phase = zeros(1:length(Sample));
    Phase = 2*pi*Sample*500*sample_time;
    accum = 0;
    for i=1:length(Phase);
        accum = accum + Phase(i);
        Accum_phase(i) = accum;
    end;
%   Generate a time record.
    Time = sample_time*(0:length(Phase)-1);
%   Generate the sinusoidal wave.
    Sinout = cos(2*pi*1700*Time + Accum_phase);
%   Generate the square wave.
    Squareout = sign(sign(Sinout)+0.1);
%   Generate the trapezoidal wave by convolving the square wave
%   with a pulse.
    pulse_length = 160e-6;      %  Use 80 usec ramp.
    pulse_length = round(pulse_length/sample_time); % need integer.
    Pulse = ones(1:pulse_length);
    Trapout = (conv(Pulse',Squareout))/pulse_length;
    Trapout = Trapout(1:length(Time));
%   Write to file.
    fid = fopen('out.dat','w');
    fprintf(fid, '%10.8f  %10.8f  %10.8f  %10.8f  %10.8f\n',...
    [Time; Sample; Squareout; Sinout; Trapout]);
    fclose(fid);

wpe42.gif (7529 bytes)

Figure 3.1 — Example of HART Signal Generation

 

OSI Model

    Although HART can be adequately understood without resort to the OSI Model, some of the OSI terminology exists in HART Standards.  Therefore, a brief description of the relationship is given here.  A mapping of HART hardware to the Model is also attempted.

    The Open Systems Interconnection (OSI) Model [3.7] is a standard model for communication systems.  The intent of the OSI Model is to provide requirements for being “open.”  The model consists of 7 layers, which are either physical or abstract entities within the communicating system (device).  The layers, listed in order from highest to lowest are:

7.  Application
6.  Presentation
5.  Session
4.  Transport
3.  Network
2.  Data Link
1.  Physical

A given layer of one system (device) communicates with its counterpart in the other system (device).  A given layer generally knows (or can find out) the capabilities of the next lower layer; and may request services of this lower layer.  The Physical Layer, which is the lowest layer, connects to a medium, which serves all of the communicating systems.  Sending a message consists of a series of requests by each layer to the next lower layer, with appropriate protocol and addressing information being added at each level.  A request to a lower level or receipt of information from a lower level is called a PDU (Protocol Data Unit).  The next lower level that received the request or provided the information calls it an SDU (Service Data Unit).   Sometimes the terms PDU and SDU are preceded by an indicator of the layer.   For example, a DLPDU would be a PDU sent or received by the Data Link Layer.

    As defined by the OSI Model, conventional HART uses “connectionless” communication.  That is, connections are not established and removed (as with public telephone network) in order for communication to occur.

    In virtually all implementations of HART, the functions of layers 3 through 6 either don’t exist or are performed as a single activity by one computer or embedded microcontroller.  Consequently, conventional HART is usually said to implement only layers 1 (Physical), 2 (Data Link), and 7 (Application).

    In addition to interfacing (voltages, impedances, etc.) to the network cable, the HART Physical Layer performs 4 basic functions:

    1.  Modulating an outgoing message.

    2.  Demodulating an incoming message.

    3.  Turning on carrier for an outgoing message.

    4.  Detecting carrier for an incoming message.

    In the jargon of OSI a message transmission occurs like this:   the Application Layer gives a PDU (request) to the Data Link Layer.  This request contains the destination address and the data (including command number) to be sent.  To the Data Link Layer, this information is an SDU.  The Data Link Layer then creates its own PDU by adding a preamble, delimiter, source address, and error check bits and arranging them all in the proper order.  The Data Link Layer then performs three functions to send its message:

    1.    It makes a PDU to the Physical Layer to turn on carrier.

    2.    It makes a 2nd PDU, which is the data to be transmitted.

    3.    It makes a PDU  to turn off carrier.

A similar series of events takes place in a receiving device.  One of the first steps is the Data Link Layer making a PDU to the Physical Layer to listen for carrier.

    HART hardware can be roughly related to the OSI layers 1, 2, and 7 as in figure 3.2.

Figure 3.2 — HART Transmitter Showing Approximate OSI Boundaries

There isn’t necessarily any correspondence between a given OSI layer and some identifiable hardware or software.  For example, the UART is responsible for creating the bit stream — a physical layer function.  But, at the same time, it adds parity bits for error control — a Data Link Layer function.

     The OSI Standard:  In our opinion the OSI standard is unnecessarily complex and obscure.  Communication systems can be made “open” by publishing a Plain English description of how they work.  We guess that virtually every open system that references the OSI Standard also has such a description.
      The OSI Standard can be roughly summarized as stating that a given layer requests services of the layer below it and doesn’t know or care how the lower layer accomplishes this.  But, in fact, communication systems tend to be driven from the bottom up instead of the top down; because they are usually built around the properties and limitations of the physical layer.  As evidence of this, consider the Internet and how slow it is.  Here, the application is clearly being controlled by the physical layer.

HART Network Circuit Models

    HART networks can be modeled as lumped circuits.  Using these models it is possible to predict the amount of attenuation and distortion that will occur in transmitting from one of the networked devices to another.  A progression of models is presented here, with some comparisons of different models and comparisons between simulated models and measurements.

    Every device connected to a HART network may be considered a lumped RLC (resistor, inductor, capacitor) circuit, with varying impedance over the HART signal band of 950 Hz to 2500 Hz.  Most devices don’t present any appreciable inductance or else the inductance is large enough that it appears to be an open circuit compared to impedance in parallel with it.  Consequently, the inductance can be removed from the model and a given device can nearly always be considered an RC (resistor, capacitor) combination.

    Cable is characterized by its R, C, L, and G (conductance) per unit length.  But, at HART frequencies and under the circumstances used in HART, only the R and C have a significant effect.  Thus, the cable can be modeled as a chain of RC sections.  One of these sections for a multi-pair cable is shown in figure 3.3.   In the figure R is the resistance of a conductor.  CXY is the capacitance from conductor X to conductor Y.  There will be a C for every combination of two conductors.  HART frequencies are low enough that skin effect may be neglected.   Thus R and C are often available as cable specifications or are based on DC or low-frequency (about 1 kHz) measurements.  R can also be determined from conductor diameter (gauge).  Increasing the number of sections increases the model accuracy.

Figure 3.3 — Cable Section Model

    A typical situation is a group of point-to-point networks, each using a pair of a multi-pair cable.  A case that has been studied quite a bit is a 4-pair #24 gauge cable with overall shield.  This cable is characterized by 3 different capacitance values per unit length, as listed in table 3.1.

Conductor Combination Capacitance per 1000 ft.
Conductor in one pair to conductor in same pair 9.90 nF
Conductor in one pair to conductor in another pair 1.97 nF
Any conductor to shield 27.04 nF

Table 3.1 — Cable Capacitances

A model of 4 point-to-point networks using this cable is given in figure 3.4, for the case where one of the Field Instruments is talking to its respective Master.  Each cable section is modeled as in figure 3.3.  Each of the Masters at the Controller end is modeled as a single resistor, Rm.  Each of the pairs at the Controller end has a common connection with the shield.  At the Field Instrument end the Field Instruments are all high-impedance devices and are modeled as open circuits.  The one talking Field Instrument is modeled as a current source.

Figure 3.4 — 4-Pair Circuit Model

SPICE simulations were used to find the voltage magnitude and phase at both ends of the driven pair.  The SPICE simulations used 5 sections of cable of length 1000 ft. per section.  The resistance of a cable conductor per 1000 ft. section is 26 ohm.   Rm was set to 100 ohm, 200 ohm, 500 ohm, and 1000 ohm.  If = current = 0.6 mA.

    The SPICE simulation results are not too remarkable except as a reference for a much simpler analytical approach.  Suppose that the model above is replaced by that of figure 3.5.  The simple model ignores cable resistance.  It also combines all of the various cable capacitances into one.  This single capacitance, the mutual capacitance, is what we would measure between the two conductors of any pair.  For the 4-pair cable used in the simulation the mutual capacitance is 48.6 pf/ft.

Figure 3.5 — Simple Model

The simple model is seen to be just a single-pole lowpass filter.   The output voltage is easily determined.  A comparison between the simple model voltage and the SPICE model voltage is given in table 3.2.  There is relatively good agreement, which suggests that the simple model is probably sufficient for most analyses of HART signaling.

Rm (ohm) Frequency (Hz) SPICE magnitude Simple magnitude SPICE phase Simple phase
100 900 0.0588 volt 0.0594 -13 degree -8
100 3193 0.0493 0.0539 -40 -26
200 900 0.1137 0.116 -20 -15
200 3193 0.0779 0.0859 -55 -44
500 900 0.2400 0.247 -38 -35
500 3193 0.1076 0.114 -75 -68
1000 900 0.3429 0.353 -56 -54
1000 3193 0.1179 0.121 -85 -78

Table 3.2 — Comparison Between SPICE Model and Simple Model

    In the above models, when the Master is transmitting to the Field Instrument, Rm is short-circuited by an ideal voltage source and the current source at the Field Instrument end is removed.  This results in even less attenuation and phase shift.  Thus, the situation analyzed is a worst-case.

    When a resistor-zener IS barrier is used, this places a resistance between Rm and the cable.  When the Field Instrument is talking, Rm just appears to be larger.  And the actual Rm forms a voltage divider with the barrier resistance.   When the Master is talking, the barrier resistance forms a single-pole lowpass filter with the cable capacitance. 

    Measurements were also made on a 1000 ft. section of the 4-pair cable.  A comparison of measured and calculated output voltage for the 4-pair cable with Field Instrument transmitting to Master is given in table 3.3.  The simple model was used for the calculations.  The current source was simulated by using a signal generator in series with 20 kohm.  The table shows very good agreement.

Rm (ohm) Frequency (Hz) Calc. magnitude Meas. magnitude Calc. phase Meas. phase
250 500 12.3 mV 12.3 -2 degree -2
250 1000 12.3 12.3 -4 -4
250 2000 12.2 12.3 -9 -8
250 5000 11.5 11.7 -21 -18
500 1000 24.0 23.9 -9 -7
500 2000 23.3 23.3 -17 -15
500 5000 19.3 20.1 -37 -32
1000 1000 45.4 44.9 -17 -14
1000 2000 40.5 41.1 -31 -27
1000 5000 26.0 28.7 -57 -50

Table 3.3 — Comparison of Measured and Calculated Output Voltage

    These results were used to set an upper limit for the product of Rm and C in an early draft of the HART Physical Layer specification.  The limit is 65 microsecond.  Later, however, there arose a need to use relatively low resistance values.  The simple model ignores the fact that, as Rm becomes small, the effect of cable resistance and other series resistances becomes greater and can eventually dominate the circuit behavior.  There is also a need to allow parallel resistance to be distributed among networked devices.  A reference voltage for deciding the presence or absence of carrier was also established and required more careful determination of various sources of attenuation.  Consequently, the simple model became inadequate and has been replaced by those of figure 3.6.

Figure 3.6 — Newer Network Circuit Models

The elements of figure 3.6 are as follows:

        Rp = combined parallel resistance of all devices.
        Rs = combined series resistance.
        Rsm = secondary master resistance.
        C = lumped parallel capacitance of devices and cable.
        If = Current source to model high-Z signaling device.
        Vin = Voltage source to model low-Z signaling device.

These models are still relatively simple and their elements have been arranged to produce a worst-case Vout. 

    The newer models of figure 3.6 have been used to generate a chart of acceptable capacitance versus Rp and Rs.  This chart (figure 17 of the Physical Layer Specification)  replaces the 65 microsecond rule for determining acceptable combinations of resistance and capacitance.  The chart shows that capacitance is maximized for Rp of about 240 to 250 ohm.  The chart applies to networks that have either process receivers or process transmitters or both.

HART Signal Power Spectral Density

    The power spectral density (psd) of a signal is often of interest, since it defines which frequency components are most important.   The psd tells us what we need in the way of frequency response of the communication channel, and whether there are any discrete spectral lines that might be used for synchronization.  It is also used to compare different modulation methods.  An expression for the psd of continuous phase FSK under conditions used in HART is [3.3]

wpe35.gif (2067 bytes)

where w1 = the lower shift frequency, w2 = upper shift frequency, A = amplitude, T = bit time,

wpe3A.gif (1895 bytes),    wpe3B.gif (1902 bytes) ,

wpe40.gif (1397 bytes),

  wpe3F.gif (1402 bytes) ,

wpe38.gif (1119 bytes),     and    wpe39.gif (1110 bytes).

The resulting power spectrum (in dB) is indicated in figure 3.7.     The amplitude has been deliberately adjusted so that the peaks of the main lobe are at about 0 dB.  The measured power spectrum is shown in figure 3.8, for comparison.

Figure 3.7 — HART Power Spectrum

                     

Figure 3.8 — Measured HART Power Spectrum

The spectra show that there are no spectral lines.  (This is also evident from the equation, which would otherwise contain one or more delta functions.)  The power spectrum is symmetrical around 1700 Hz and has a peaks at about 1.1 kHz and 2.3 kHz — close to, but not at the shift frequencies.  The main lobe extends from about 1 kHz to 2.4 kHz.   The secondary lobes at 800 Hz and 2.6 kHz are about 20 dB below (100 times less power) than the main lobe peaks.  Since the main lobe contains nearly all of the signal power, the psd is sometimes said to extend from 1 kHz to 2.4 kHz.  Or, if we add a little margin to this as is done in some HART documents, it extends from about 900 Hz to 2.5 kHz.

    Note that these are spectra for random bits.  Any non-random features of HART data will alter the spectrum.  Since, HART data is transmitted as characters containing start and stop bits, this is one non-random feature.   The frequency of occurrence of a start (or stop) bit is 109 Hz.  Therefore, evidence of the 109 Hz should show up in the spectrum.  A simulation in which bits are random except that every 10th bit is set to zero and every 11th bit is set to 1 results in the power spectrum of figure 3.9.

Figure 3.9 — HART PSD With and Without StartStop Bits

The figure contains two plots.  One is the normal (completely random) spectrum.  The plots are artificially separated by 5 dB so that they are more easily observed.  The spectrum with start and stop bits shows a repeated pattern at intervals of 109 Hz.  From a circuit design or communications perspective the differences are insignificant.

    Another alteration of the spectrum is expected if we use a trapezoidally shaped transmit waveform instead of sinusoidal.  A trapezoid shape is often easier to generate that a sine wave and is commonly used.  The simulated spectra for sinusoidally (normal) and trapezoidally shaped HART signals are given in figure 3.10.

Figure 3.10 — HART PSD With Sinusoidal and Trapezoidal Shaping

The risetime for the trapezoidal shape used is a constant 177 microsecond from full negative amplitude to full positive amplitude.  The trapezoidal shaping tends to emphasize the low-frequency end of the power spectrum slightly.  In the region of the main lobe (1 kHz to 2.4 kHz), however, there isn’t much difference between the sinusoidal and trapezoidal spectra.

Cable Effects     

    HART frequency components exist primarily in a band from 900 Hz to 2500 Hz.  The wavelength corresponding to 2500 Hz is about 75 miles (120 km).   Even if we assume that distributed cable effects start to occur at 1/20 of a wavelength, this is still 3.8 miles.  Except in some special situations, this is far longer than the distance between most measurement/control points and the process control room.  Consequently, HART networks don’t act like transmission lines and can be modeled as collections of lumped elements.  From the user’s viewpoint, building a network of HART devices is virtually the same as building a network of analog-only devices.  There are no terminators or special cable.  The one possible problem is cable capacitance.

    The cable capacitance (device capacitance also contributes) forms a single-pole filter with the network resistance.    For long cable lengths (high capacitance) the filter cut-off can be close to 2500 Hz.  The result is that the signal can become distorted.  Since the network resistance is usually the current sense resistance, a lower current sense resistance helps to broadband the filter response.  However, there is a lower limit to this resistance.  HART specifications attempt to control the resistance and capacitance to limit distortion.   Practical cable lengths range up to about 4000 ft. (1200 meter).  Figure 3.11 below shows acceptable cable lengths for a variety of conditions, including different amounts of cable capacitance per unit length and varying numbers of Field Instruments.  Field Instruments are assumed to have 5000 pf of capacitance each.   (Note that this figure ignores series resistance, and that a newer, more accurate chart of acceptable capacitance versus series resistance and parallel resistance is now specified in HART documents.  See section entitled   HART Network Circuit Models  .)

Figure 3.11 —  HART Cable Length

    Instead of trying to insure that the -3 dB network corner frequency stays above 2.5 kHz by limiting cable lengths, another approach would have been to let it go below 2.5 kHz and correct for the pole using equalization.   However, since the pole frequency varies, adaptive equalization is needed.   Adaptive equalization is a relatively complex procedure and usually requires a long training period.  This training period is incompatible with the burst-type operation that HART uses.  A compromise equalizer is also possible.  This is a fixed equalizer that attempts to provide correction at a frequency midway between the extremes of possible pole frequencies.  This doesn’t need adaptation.  But it does complicate the modem.  Currently, we are not aware of any HART modems that try to extend cable lengths by using equalization.  The accepted method is either to use a repeater or else to use an alternate network, such as one of those described in the section entitled  HART Bridges and Alternative Networks.

    Another type of problem related to cable is crosstalk.   Crosstalk arises when a given multi-pair home-run cable contains several HART current loops (several networks).   The capacitance from one twisted-pair to another, along with the imbalance (single-ended connections) in HART networks causes unusually large crosstalk.   Balancing has never been an option in HART because of a desire to continue existing wiring practice.  The mechanism of crosstalk is illustrated in figure 3.12.  The figure shows two current loops and a signal path from a Field Instrument (F1) back to the wrong Master (Master 2).

Figure 3.12 — Crosstalk Path in Multi-Pair Cable

    In the early days of HART, crosstalk would sometimes program an unintended Field Instrument on an adjacent current loop.  This was corrected primarily through creation of more complex addressing in which a 38-bit address was added to the existing 4-bit address.  After this change, crosstalk was unlikely to mis-configure a Field Instrument.  But it could still cause bit errors when appearing as noise in the desired signal.  It was also a nuisance for a receiving device forced to listen to a message coming from another network.   These crosstalk effects have so far been mitigated through each of the following:

        1.    The choice of modulation and bit rate are such that the highest frequency
               component that needs to be transmitted is about 2500 Hz.  Higher frequency
               components are removed by requiring transmitted signals to have a slow risetime.

        2.    Transmit signal levels have been adjusted in various devices to make it difficult for
               one signal to overpower another.

        3.    An amplitude-based carrier detect is prescribed.  The signal must be above a
               minimum level before the associated message is considered valid by the
               receiver.

        4.    If there is a common ground among two or more networks, it must be located
                at the Controller (Master).  It is not permitted in the field area.

        5.    Various investigations of crosstalk have shown that the worst type is Master-to-Master.
                It occurs when one Master is talking on its respective network and another Master
                is trying to listen on an adjacent network.  The listening Master receives not only the
                desired transmission from a Field Instrument, but also some of the transmission from
                the talking Master.  Therefore, whenever possible, Masters connected to adjacent
                pairs should stagger their transactions so that messages don’t overlap.  The nature of
                HART is such that this is usually the case anyway.
    Studies of HART crosstalk have usually been done by dividing the cable into many small sections and using SPICE simulation on the resulting lumped circuits.   Agreement with measurement is usually good.

    Non-HART devices can also interfere with HART through the same crosstalk mechanism described here.  End-users and installers of HART should be careful about how they allocate the pairs in a multi-pair cable.  Especially troublesome are pairs that are used for any kind of ON-OFF or binary signaling (switches or relays) or supplying power to heavy loads in the field area.  Communication methods such as Honeywell DE that involve very large signal excursions are also a possible source of trouble.  We suspect that, in many cases where interference exists, the interference source remains dormant (OFF or in some unchanging state) for a long enough time that a HART transaction can be completed.  Thus, acceptable operation is still possible.


HART Message Errors

   All data communication systems, including HART, are subject to bit errors caused by noise and signal distortion.  The rules for constructing HART networks attempt to minimize signal distortion.  And most receive circuits include a bandpass filter to limit noise power.  Still, these measures only reduce the likelihood of bit errors and don’t eliminate them.

    In HART, if one or more bits are wrong, then the whole message is considered bad.  The Master-Slave nature of the HART Protocol means that Masters and Slaves behave differently in response to a bad message.  Normally a Master sends a command to a Slave and expects a reply from the Slave.  If a Master receives a bad message or no message, it must usually re-transmit its command to the Slave.  If a Slave receives a bad message, it must not act on this message.  But, depending on circumstances, it may still send back a reply.  The criterion to reply to a bad message is usually that everything appeared correct up to and including the command byte.   The reply includes a status bit indicating that the message was bad.

    HART uses vertical and longitudinal parity to catch bad bits.   Longitudinal parity is the exclusive OR of the 8 bits in each transmitted byte.   Vertical parity is a checksum byte that becomes the last byte of the message.     This form of error detection was chosen for HART because it is easily implemented in a smart process transmitter without special hardware.  The longitudinal parity is just the odd parity that is available in most UART implementations, including UARTs built into popular microcontrollers.  In most device implementations, the longitudinal parity is generated and checked automatically as part of the UART operation.  The checksum byte is generated and checked in software by exclusive ORing full bytes as they are transmitted or received.

    An error detection scheme can be fooled into thinking that a message is good when it isn’t or bad when it isn’t.  A bad message that appears good is an undetected message error or UME.  A UME is the cardinal sin of data communication.   Most communication schemes try to make it a very rare occurrence.  Numbers like once in 20 years are not uncommon.  A UME usually results from a few combinations of bit errors that are transparent to the detection scheme.  For example, suppose we look at just the longitudinal parity alone.  This is a relatively unsophisticated error detection scheme.  Any even number of bit errors in a given byte will fool the parity checker.

    For purposes of examining error detection, the full HART message may be thought of as a matrix of bits.  The matrix consists of 9 columns and N rows, where N is dependent on the size of the message.  Each row corresponds to one byte or character, including the longitudinal (UART) parity bit.  The Nth row is the checksum byte and its longitudinal parity bit.  This is illustrated in figure 3.13

Row 1 D D D D D D D D P
Row 2 D D D D D D D D P
        .          
        .          
Row N-1 D D D D D D D D P
Row N C C C C C C C C P

D = message bit, P = long. parity bit, C = checksum bit.

Figure 3.13 — HART Message as Bit Matrix

Each bit P in figure 3.13 is the exclusive OR of the 8 bits in its row.  And each bit C is the exclusive OR of all of the bits D in the column above it.  We see that, for this scheme to be fooled, we must have at least 4 bit errors and they must be located at the vertices of a rectangle.  An example is that of figure 3.14.

Row 1 D D D D D D D D P
Row 2 D E D D D D E D P
        .          
        .          
Row N-1 D E D D D D E D P
Row N C C C C C C C C P

E = bit that is in error.

Figure 3.14 — Bit Matrix That Will Cause UME

It is apparent that this is a much more sophisticated detection scheme than either longitudinal parity or vertical parity alone, because there must be more bad bits and they must be strategically located.

    A measure of how well the error detection scheme works is the frequency of UMEs or the probability of a UME.  The probability of UME depends on the probability of 4 bit errors and the probability that they are arranged to form a rectangle.  Clearly, there could also be 2 rectangles formed from 8 bad bits, or 3 rectangles, etc.  But, given that the probability of a bad bit is small, these multiple rectangle situations are improbable compared to a single rectangle and need not be included.  Then the probability of UME is approximately given by

where P1 is the probability that any two bits in any row will be in error, P2 is the probability that one of the corresponding column bits will be in error, P3 is the probability that the remaining row/column bit will be in error.  Let Pb be the probability of a bit error and N the number of rows (= number of message bytes).   Then

Then Pume becomes

As an example, suppose a message of 30 bytes, and Pb = 0.001.  Then Pume = 65e-9.  A 30 byte message takes 0.275 second.  So there can be only 3.6 of them per second.  Then the number of UME per year, with continuous signaling, is 7.5.   Most applications don’t require continuous communication.  Therefore, the UME rate is much less.  A Pb of 0.001 or less has generally been considered satisfactory.

    Another dimension to this problem is that there is actually more error detection occurring than is implied by just the parity and checksum.  Most HART software checks delimiters, addresses, status, commands, sizes of data fields, units, limits on process variable numbers, etc.  This adds another layer of relatively exhaustive error checking.  If we are even moderately satisfied with a UME rate based on parity and checksum alone, we should be entirely satisfied by the additional error checking.

    The bit error rate is a function of (energy per bit)/(noise density) = (Eb/No).  The relationship given in Proakis [3.4], is

This applies to orthogonal FSK, in which one shift frequency is an integer multiple of the other.  The FSK used in HART is not quite orthogonal (ratio of frequencies is 2200/1200 = 1.833), but is close enough that a more complex relationship is probably not warranted. 

    The above equation for Pb is based on a “bandwidth” that is the reciprocal of the bit rate.  It is generally found, however, that a bandwidth of at least twice the bit rate is desired for FSK.   Shanmuggam [3.5] uses this wider bandwidth and comes up with what is probably a better expression for Pb.  It is

where A = peak signal, T = bit time.  To get Pb = 0.001 requires (Eb/No) = 24.9.  Let S be the signal power.  Then Eb = ST = S/1200/second.  Then

The ratio of RMS signal voltage to voltage noise density is

The minimum received signal is generally thought to be about 130 mV p-p or 46 mV rms.  Then, for ideal reception, we can have Vn as high as 266 microvolt/(root Hz).  In a 9500 Hz bandwidth (HART Extended Band), the noise must be limited to about 26.1 mV RMS.  For Pb = 0.0001, the acceptable noise drops to 22.3 mV RMS.

    Simple HART receivers often do not limit received noise to a bandwidth of 2x bit rate.  The receive filter is often a single-pole lowpass with corner frequency in the range of 5 to 10 kHz.  A more general expression for Pb, that includes noise bandwidth, is

For a 10 kHz single-pole lowpass, B = 1.57(10 kHz) = 15.7 kHz.  And BT = 13.1.  To get Pb = 0.001 now requires (Eb/No) = 163 and

Using Vs = 46 mV RMS results in Vn = 104 microvolt/root Hz.  In the HART Extended Band the noise must be limited to 10.1 mV.

    Noise can come from “silent” HART devices and from external sources.  HART specifications require that devices produce no more than 2.2 mV RMS of noise in a 9500 Hz band.  For 17 devices, all producing this much noise, the noise would be 9.1 mV RMS.  Since this is below the 10.1 mV limit found above, this noise level is acceptable. 

    Information collected by Rosemount [3.6] suggests that induced (from DCS) noise densities can reach 174 microvolt/root Hz.   For the simple receiver using a 10 kHz receive filter, this corresponds to Pb of 0.314.  This would cause a large UME rate and wouldn’t work very well.  It suggests that such a large noise level is probably not often encountered or that it is not often encountered along with a minimum HART signal level.

    Another factor related to Pb that is not considered is that HART modems sometimes have a degree of built-in noise rejection in the form of logic circuits that will reject unusually short or unusually long intervals between zero crossings of the received signal.  That is, the demodulator is somewhat of a correlation receiver.  In effect, this reduces the noise bandwidth and improves Pb.

    If noise from silent devices is correlated (i.e., interference at one or more frequencies rather than random noise) then it is possible that combined devices could produce 2.2 mV RMS x 17 = 37.4 mV RMS.  However, this would require the interference sources to have the same frequency and phase.  This is very unlikely.

    Note that the UME number found earlier doesn’t say anything about the frequency of detected message errors.  If there are too many, software may flag this situation and declare that a device has malfunctioned.  Therefore, a “practical” error criterion is desired and has been proposed [3.7]:  If there are X consecutive message errors, this is considered a system failure (even though there is no UME).  And such failures must be limited in how often they occur.   For a given rate of occurrence, the required Pb will be derived. 

    Again, let the message length be N and assume that messages occur continuously.  The probability that a message is in error is given by the well known expression

where Nb = number of bits = 11*N.  Pb in terms of Pm is then

where Y = 1/Nb.

    The frequency criterion may be stated that there must be, on average, only one failure per time T; or that the probability of a failure is 1 if there are fT messages, where f is the frequency of messages.  The time of one message is Nb*(1 second)/1200.  Then f = 1200/(Nb second).  The probability that there are exactly X consecutive messages in error out of a total of fT depends on the number of ways that the X erroneous message can occur.  If fT is far larger than X, then the approximate number of ways is just fT.  That is, any message could be the start of the string of message errors.  There could also be X+1 consecutive errors and X+2, and so on.  But if the probability of a message being in error is small, then only the case of exactly X messages need be included.  The probability of X consecutive errors becomes

 

Setting Px = 1 gives

Substituting this into the above equation for Pb gives

    As an example, suppose that a Slave Device is in burst mode and repeatedly sending a single process variable.  Suppose that the Master receiving the information has been programmed to flag an operator  if there are 4 consecutive message errors.  Assume that 20 bytes per message are sent; and that the operator is to be flagged no more than once a week.  Then we have X = 4 and Nb = 11*20 = 220.  Continuous transmission implies that there are about 5 messages per second.  However, the protocol requires a delay between messages, so that a practical value is probably 3 per second.  Then f = 3/second, T = 1 week, and fT = 1.81e6 = messages/week.  Y = 1/Nb = 1/220 = 4.55e-3.  Then Pb = 0.00013.  We found earlier that we only needed Pb = 0.001 to get 7.5 UME per year.   This new condition will occur once a week, even at Pb = 0.00013.  Thus, the new error criterion is much more stringent than that for UME.

Experimental HART Error Rates

    In many communication systems there are multiple sources of crosstalk because multiple pairs of the same cable are all being used simultaneously.   A somewhat more realistic situation for HART is probably one in which there is only about one source of crosstalk.  This situation was examined experimentally.  The bit error rate for a typical HART modem was measured as a function of combined noise and crosstalk.  Instead of generating actual crosstalk on a multi-pair cable, the crosstalk, signal, and noise were combined in an opamp summer.   And, instead of an actual HART signal for the crosstalk, a sine wave at a frequency of 2.2 kHz was used.   The random noise is band-limited white noise limited to a 50 kHz band.  The result is plotted in figure 3.15.  To generate the “Signal-to-RMS …” axis, the noise and crosstalk are summed together in RMS fashion.  There are 11 curves ranging from all crosstalk (no noise) to no crosstalk.  S/C means signal-to-crosstalk.

Figure 3.15 — Plot of BER v. (Noise + Crosstalk)

    The figure shows some curious results.  One is that at higher levels of crosstalk (low S/C) the BER curves are almost vertical.  That is, the BER varies over many decades while the crosstalk power varies only about one dB or less.  This is almost a threshold effect.  Below the threshold there are no errors.  Above it there are many.  Another feature of the graph is that there are roughly 5 curves that are above the “no crosstalk” curve.  This means that some combinations of noise and crosstalk are worse (cause more errors) then either noise or crosstalk alone, even though the amount of interfering (noise + crosstalk) power remains constant.

 

How Fast?

    One interesting question is how fast could the HART Physical Layer be, given the existing constraints of signal size, bandwidth, and noise?   The Shannon-Hartley Theorem [3.4, 3.5] gives the channel capacity as

where C is the capacity in bits/second, B is bandwidth, and S/N is the signal-to-noise ratio.  There are no communication systems that actually operate at capacity.  The capacity limit is only useful in the sense that, as long as we don’t exceed it, the error rate can be made arbitrarily small.

    To calculate the capacity, assume that the maximum noise produced by a given device is 2.2 mV RMS in a 10 kHz band; and that this is measured across a 500 test load.  If there are 17 such devices, all producing the same amount of noise, then the total is 9.1 mV RMS.   The noise density is then 91 microvolt/root Hz.   Assume that the bandwidth is 3 kHz, then N = 5.0 mV RMS.  The minimum signal is probably 260 mV p-p at a test load of 500 ohm.  Then S = 92 mV RMS, S/N = 18, and C =  13 kbits/second.  If the bandwidth is taken to be 4 kHz, which seems reasonable under some circumstances, then C becomes 16 kbits/second.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s