Bài giảng Chuẩn truyền tin HART trong đo lường và điều khiển tự động mạng công nghiệp

Các liên kết PPI cho phép kéo dài đường truyền đến 3000m và MPI là 1500m, tối đa của

MPI lến đến 15 thiết bị. Tuy nhiên HART có nhược điểm là tốc độtruyền thấp, hiện nay

đến 4800 baud. Ngược lại, HART lại cho phép cảthiết bịtương tựvà sốcó thểlàm việc

trên cùng một mạng. Sau đây sẽtrình bày cụthểhơn những đặc điểm cơbản vềHART.

Tài liệu sau đây vừa trình bày những kiến thức vềHART, đồng thời cũng đưa ra những

mạch điện cụthểsửdụng cho các chuẩn đo lượng hiện đại hiện nay. Sinh viên có thểsử

dụng các phần kiến thức đó đểphục vụcho quá trình làm bài tập, đồán môn học, tốt

nghiệp và các công tác khác sau này

pdf142 trang | Chia sẻ: maiphuongdc | Lượt xem: 1931 | Lượt tải: 3download
Bạn đang xem trước 20 trang tài liệu Bài giảng Chuẩn truyền tin HART trong đo lường và điều khiển tự động mạng công nghiệp, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
ater may be necessary when the desired cable length exceeds limits set by the HART Standards or when there are more than 15 devices. It is a two-port device placed between two network segments. From a Protocol viewpoint it makes the two segments look like one network. Although the repeater might also be equipped to repeat the analog 4-20 mA signal, our discussion here is limited to a device that repeats only HART signals. To preserve the HART timing, a repeater must repeat in real time. That is, it cannot store messages for later forwarding. Delays must be limited to a few bit times if various timers are to work reliably. Another limitation is noise. A repeater cannot simply amplify and re-transmit the FSK signal, since this would also amplify and re-transmit noise on the network segment. This narrows the choice of repeater architecture to one in which the incoming signal is demodulated and then re-modulated. In addition, we must re-modulate with a "clean" signal. The output of a demodulator will contain jitter due to noise and to the demodulation process. This jittery signal should not be applied directly to the re-modulator, since this would result in a degraded signal to one or more receiving devices. Instead, the demodulator output should be detected in UART fashion (i.e., sample at mid-bit). Some logic is also needed to determine at start-up which bit is a Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 57 start bit and to count out each 11 bits that have passed and identify the next start bit. A block diagram of the repeater is shown in figure 2.14. Figure 2.14 -- Repeater Block Diagram Notice that, except for the line interface circuits and carrier detects, there is just a single signal path that is turned around as needed. The direction can be determined by a relatively simple state machine as illustrated in figure 2.15. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 58 CA = Carrier Detect on Network A CB = Carrier Detect on Network B Figure 2.15 -- Direction State Machine There are 3 states: idle, B>A (Network B to Network A), and A>B (Network A to Network B). Idle means that both ends are listening and the driver switch is not connected to either network. CA, CB = 1,0 means that there is carrier at network A and not at network B. And so on. If both carriers are present, the last state is retained. A problem with all interface or bridge devices is the time it takes to turn the line around (or to turn on a signal path). This is usually related to carrier detect and can often be done in less than one character time. However, the loss of a character increases the number of preamble characters that may be lost from 2 to 3 (see also Part 2: Startup Synchronization in HART). If only 5 preamble characters were sent, as is often the case, this leaves only 2 as valid preamble. Thus, the margin against missing the preamble is reduced. If another device, such as a 2nd repeater were to be included somewhere in the network, there would likely be frequent failures to recognize the start of a message. The change to a HART Slave to force it to require more than 5 preamble characters is usually minor. Therefore, the vendor of the Slave device may be willing to increase the preamble size for the device in the interest of satisfying a customer. At the Master end the software can be changed so that it always uses a preamble of greater than five characters, ignoring whatever number the HART Slave says it should use. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 59 HART Gateways and Alternative Networks Conventional HART, operating at 1200 bits/second and using a process loop as a network, has been the focus throughout most of this book. However, the desires of HART process equipment customers are seldom so limited. The need arises to connect HART devices in unconventional ways, which is the subject of this section. These unconventional methods can be divided roughly into two categories: those that still use HART protocol or some of it, and those that connect HART with networks using entirely different protocols. An interface between networks having different protocols is called a Gateway [2.8]. Examples would be HART to Devicenet [2.9], HART to Ethernet, HART to Modbus, etc. Some of these unconventional methods are presented here, in no particular order. PC as Gateway About the easiest way to form a Gateway is with a personal computer. This is sometimes done by systems integrators who need something up and running in the shortest possible time. As personal computers become less expensive and more reliable, this becomes more of an option. Small, inexpensive, single-board computers that implement DOS or Windows CE can also make this a reasonable approach. As an example, suppose you need an Ethernet-to-HART gateway. This is done as in figure 2.16. Figure 2.16 -- Using PC As Gateway You buy the 3 pieces of hardware and write the software. For applications that are more cost- sensitive or that require greater reliability, a dedicated piece of hardware may be needed. Some of these are examined as follows. DeviceNet to HART DeviceNet is becoming the de facto standard for high speed on-off sensing and control. HART and DeviceNet have little in common, as indicated in the following table. We wouldn't expect many similarities, since the two protocols are intended for different purposes. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 60 Network Type HART DeviceNet Modulation Method FSK Baseband with Bit Stuffing Data Rate 1200 BPS 125 kBPS and up Application Transmit text and floating pt. numbers Transmit discrete I/O (on- off, open-closed) Power and Signal on Same Pair? Yes (2-wire is possible) No (uses 4 wires) Number Addressees per network 15 or 275,000,000,000(*) 63 Equality of Devices Master and Slave Devices equal but prioritized Message Frame HART (UART-based) CAN Possible Message Length Long Short but can be continued Device Power Available Milliwatts to Watts Watts (*) HART allows only 15 devices on a conventional current loop-type of network. But there are 275e9 possible addresses. Table 2.3 -- HART and DeviceNet Comparison Suppose, however, that someone implementing DeviceNet needed to read the process variable of a HART flow meter? A dedicated gateway between the two networks might be a possible way. It might work like this: At the DeviceNet side, the gateway looks like a DeviceNet Server (produces response) with Cyclic I/O Messaging at perhaps about once per second. At the HART side it appears to the flowmeter as a HART Master. Once each second it queries the flowmeter to get the process variable at the HART side and then transmits this variable to all consumers at the DeviceNet side. At power up, the gateway device would go through the DeviceNet configuration, receive its assigned DeviceNet address, and become a publisher of information. Then it would determine the address of the HART flowmeter in preparation to read the process variable. A dedicated gateway would probably be designed to work with more than one HART Field Instrument and would publish the process variable corresponding to each Field Instrument. HART Over RS485/RS232 Conventional HART uses FSK modulation to translate the frequency spectrum to a region that is compatible with 4-20 mA. In some applications where there is no current loop, the modulator and demodulator are simply removed and HART is transmitted as a baseband signal. This is illustrated in figure 2.17 for RS232 and RS485 line drivers and receivers. RS232 is more suited to communication between just two devices, while RS485 allows the construction of a network of Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 61 several devices. RS232 is limited to a distance of 50 feet (15 meter), per the standard. RS485 allows up to several thousand feet (one or two km). Figure 2.17 -- Baseband HART Using RS232/RS485 In both of these arrangements the message generated by the HART device is the same series of 11-bit characters that would normally be sent to a HART modem. The bit rate can be 1200 bits/second as in conventional HART. Or it may be higher. Combined Baseband and Conventional HART A combination of baseband RS232/RS485 and conventional HART signaling is also possible. When RS485 is used, it is possible to build a super HART network as illustrated in figure 2.18. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 62 Figure 2.18 -- Super HART Network Using RS485 This super network can have 31 bridge devices (the limit for RS485) and 15 HART Field Instruments per bridge device, for a total of 465 Field Instruments. Except for line turn-around time in the Bridge, all HART timing is preserved. The considerations for the bridge device are similar to those for a repeater. Telecom HART Since the HART signal band is essentially the same as the band available to voice signals in telephone networks, a telephone network can be used to transmit HART. In the United States and Canada the HART FSK signal frequencies are OK as is. In Europe or other countries that use CCITT standards, HART can still be used except that the frequencies must be changed to 1300 Hz (logic 1) and 2100 Hz (logic 0). These frequencies are acceptable in the U.S. and Canada. And, fortunately, most HART and Bell-202 modems will accept these two frequencies. This leads to some simplification in an interface device. A typical HART-over-phone-lines application is shown in figure 2.19. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 63 Figure 2.19 -- Illustration of Using Telephone Network for HART The computer and office modem constitute the HART Master. The office modem is a standard Bell-202 or CCITT V.23 telecom modem. There is no point in trying to adapt a HART modem at the office end, since commercially available telecom modems already have the desired certification and are directly compatible with the telephone network. They just need to be set up to work with HART. This is explained in more detail in a HART Application Note. When used with the Public Switched Telephone Network (PSTN) the computer and office modem can "call up" any number of Field Instruments. The size of this network is virtually unlimited. And, of course, there can still be up to 15 HART Field Instruments served by each Telecom-HART Interface, so that there can be up to 15 Field Instruments at each phone number. The "Telecom-HART Interface" is a necessary part of the scheme, since a process instrument isn't directly compatible with the telephone network. Even when a leased line is purchased from the phone company, direct connection of a process instrument isn't advised because signal levels and impedances will not be correct. If the process instrument is a 2-wire device, there is also the question of how to power it. The Telecom-HART Interface provides the functions of figure 2.20. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 64 Figure 2.20 -- Block Diagram of Telecom/HART Interface The Interface consists of two signal paths (toward and away from the Process Instrument) and some logic (or microcontroller) to decide which path is active. Deciding which path should be active is more than just sensing carrier detect. Once a path is closed carrier appears at both ends. Therefore, some form of state machine is desired. One possibility is that both paths are normally turned OFF. When both carriers are absent, the device goes to this (both paths OFF) first state. If a telco carrier should become present and HART carrier is absent, the upper path is switched ON (second state). If a HART carrier appears and the telco carrier is absent, the lower path is switched ON (third state). If both carriers are present, the device simply maintains the last state (either second or third). At the start of a transaction the telco carrier will come ON and the upper path will become active. As soon as the path becomes active, both carrier detects will be on and the upper path will remain active. The Master will finish its transmission so that the telco carrier goes away. At this point, the carrier at the HART side might also go away if there is no immediate reply by a HART Slave. Then both paths would become inactive. When the Slave finally replies, there will be a HART carrier and no telco carrier so that the bottom path will become active. Another possibility is that after the telco carrier stops, the HART side carrier stays active because the HART Slave has already begun to reply. Then the bottom path will be made active at the same time that the upper path becomes inactive. At the telephone end, the interface device provides a data access arrangement (DAA), so that the device may be legally connected. Limiters in both paths control the amplitude of signals that are applied to the respective networks. An entire modem is added if the device is to be used in Europe. This modem accepts the HART signal frequencies of 1200 Hz and 2200 Hz and converts them to CCITT-compatible frequencies of 1300 Hz and 2100 Hz. A potential problem with trying to use conventional Master software in this telephone application is the delays in the telephone network. When the Master sends out its command, it arrives at the interface device some time later. The return trip is similarly delayed, so that Master software may time out, thinking that the Slave didn't reply. As much as half a second is possible, Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 65 though not typical. The Master software should be designed to take this into account. Clearly, burst-mode, Master arbitration, and other conventional HART activities dependent on timing are probably impossible in this application. In this application (and probably others), the possibility of inadvertently turning on burst mode in a device must be carefully considered. It is easy to turn burst mode on. But because the network doesn't support conventional HART timing, it may be impossible to turn burst mode off without a trip to the site of the bursting Field Instrument. If this is a great concern, then it may be necessary to incorporate a micro-controller into the Interface and screen (filter) the HART commands. But this greatly complicates the Interface and discards the convenience of a modulation method that is already compatible with phone lines. A more reasonable approach is probably to control the Master software so that it never issues commands that would activate burst mode. Fiber Optic HART By combining inexpensive and powerful laser diodes (emitter) with efficient photodiodes (detector), enough power (about 4 mA at 12 volt) is produced to operate a parked HART Field Instrument. The result is a point-to-point HART network with only optical fibers connecting the Field Instrument. The scheme is illustrated in figure 2.21. Figure 2.21 -- Fiber Optic HART Network Everything except the Optical Fiber and Field Instrument are located in the control area. A special interface built into the Field Instrument converts a conventional 2-wire HART Field Instrument to an optical Field Instrument. This equipment and the services to retrofit Field Instruments are available from NT International [2.10]. Single Modem/Multiple Point-to-Point A common situation is that of a HART user who has only point-to-point networks (one Field Instrument per network or per current loop) and wants to use one computer to talk to all of them. The solution that comes to mind most quickly is to use multiple modems. In fact, this is probably the only solution that is able to maintain the full protocol, including arbitration. But, if we know Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 66 that there will not be a need for the full protocol, another possibility is to switch a modem from one network (process loop) to the next. The problem with this is how to do the switching. Electromechanical relays probably aren't the answer. Semiconductor switches might create too much leakage current. Another problem with switching is the need for the Master device to maintain a table of network and device addresses. That is, the Master must remember not only the Field Instrument address, but the network of that particular Field Instrument. A possible solution that doesn't involve switching and maintains the reliability and integrity of each process loop is that of figure 2.22. Figure 2.22 -- Single Modem Coupled To Multiple Point-to-Point Networks Here, the individual networks are transformer-coupled to a single modem. The modem is specially designed to have an impedance of zero or nearly zero, whether transmitting or receiving. Zero impedance during receive serves two purposes: (1) It allows the modem to collect all of the signal from one of the Field Instruments instead of having the signal distributed (lost) to other networks. (2) It relaxes transformer requirements by increasing the associated L/R time constant. The coupler device is entirely passive and galvanically isolates the network from the modem. The schematic of a single coupler is shown in figure 2.23. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 67 Figure 2.23 -- Coupler The coupler is a 3-port device that can easily be designed for DIN-rail mounting. Its resistance from controller port to Field Instrument port is very low, so that very little voltage drop is introduced into the loop. There is also complete galvanic isolation of the current loop from the modem. Using the scheme of figure 2.22 one modem communicates with up to 15 networks (15 Field Instruments). When the modem transmits, the transmission is seen by all of the Field Instruments and only one replies. When the modem is receiving it must sense the current flow through its terminals. Some of the considerations in applying this method are: 1. The drive capability of the modem must be quite high, since it is sees the combined loads represented by up to 15 networks. 2. The modem must maintain a low impedance up to frequencies of about 5 kHz. This becomes difficult in a trans-impedance type of amplifier arrangement. A very wide-band amplifier may be needed. 3. The transformer is a critical component that must satisfy competing requirements of low resistance, high inductance, maintenance of inductance at DC of 20 mA, and small size and cost. Most off-the-shelf transformers are not satisfactory in this application. We have been able to get custom transformers from Midcom [reference] that fit this application. 4. Equalization is generally necessary in the modem to mitigate the combined effects of the transformer and networks (current loops). The equalization may need to vary to account for the possibility of from 1 to 15 current loops. Using practical values for other circuit elements, the Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 68 combination of these elements with the transformer creates a high-pass filter with corner frequency at or close to 1 kHz (low end of HART band). Wireless HART It seems lately that just about every form of communication is becoming wireless or has wireless as an option. And, undoubtedly, HART or HART-like information is now being transferred by wireless. But this is the result of gateways to HART and the use of non-HART protocols. A wireless version of HART Protocol does not exist and probably won't ever exist. The reason is that HART Field Instruments would have to be equipped with radio transmitters. (Or there might be one transmitter serving several Field Instruments.) This, in turn, implies a relatively large expenditure of power -- much more than is currently used in HART Field Instruments. And, since the power must be made available anyway, one might as well opt for an existing wireless protocol instead of creating a new one. In other words, once we depart significantly from the conditions that led to the creation of HART in the first place, then other solutions become more viable. This applies not only to wireless, but to any of the proposed alternate versions of HART described above. A market for transmission of process variables via wireless apparently exists. But, based on information from potential customers, the requirement is for distances on the order of 15 miles (24 km). This immediately excludes virtually all of the recently developed spread-spectrum unlicensed techniques, which are limited to about 1 or 2 miles of reliable transmission. Chuẩn truyền tin HART- Highway Addressable Remote Tranducer ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------- Bộ môn: Tự động hóa – Khoa Điện – Trường ĐHBK Đà Nẵng 69 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 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 W

Các file đính kèm theo tài liệu này:

  • pdfhart_3759.pdf
Tài liệu liên quan