• Nenhum resultado encontrado

Braz. J. Phys. vol.32 número1

N/A
N/A
Protected

Academic year: 2018

Share "Braz. J. Phys. vol.32 número1"

Copied!
4
0
0

Texto

(1)

TCABR Data Aquisition System Update

A.N. Fagundes

, W.P. de Sa y

, and A.L.Dantas z

Instituteof Physis,UniversityofS~aoPaulo

R.Mat~ao,Trav R,187|CEP05508-900, S~aoPaulo,Brazil

Reeivedon3July,2001

Wedesribereent proposed updatesfor TCAqs[1 ℄, the TCABRdataaquisition system. Stable

and inregularuse,it shallbeenrihedinnewfutureforbetter performane. Reentaquisitions

widentheTCAqsapabilities inhardwareand software,inluding newVMEstationsandspeial

GPIBardsthatwillallowforthereationofloalinstrumentationnetwork.

I Introdution

TCAqs may be roughly divided in devies neessary

fordataaquisition;deviesontrolandoperationand

devies for data analysis. Aquisition and ontrol

de-viesstayinexperimentalroomandarebasedprimarily

uponVME[2℄instrumentationstandard.Personal

om-puters with hardware ation are also used. System is

shownin Fig. 1. Datainspetionandanalysisismade

in ontrolroombytheuseofPC-likeomputersusing

software,eitherfreelyavailableororiginallyinludedin

theomputerswhentheywerebought.

0000

0000

0000

0000

0000

0000

0000

0000

0000

0000

1111

1111

1111

1111

1111

1111

1111

1111

1111

1111

000

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

111

000

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

111

000

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

111

0000

0000

0000

0000

0000

0000

0000

0000

0000

0000

1111

1111

1111

1111

1111

1111

1111

1111

1111

1111

0000

0000

0000

0000

0000

0000

0000

0000

0000

0000

1111

1111

1111

1111

1111

1111

1111

1111

1111

1111

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

0000

0000

0000

0000

0000

0000

0000

0000

0000

0000

1111

1111

1111

1111

1111

1111

1111

1111

1111

1111

000

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

111

0000

0000

0000

0000

0000

0000

0000

0000

0000

0000

1111

1111

1111

1111

1111

1111

1111

1111

1111

1111

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

000

000

000

000

000

000

000

000

000

111

111

111

111

111

111

111

111

111

fishbone

losscone

tear

parm

berstein

lang

kink

saus

awes

shafran

alfven

Dat

WS

Dat

PC

PC

Master

Dat

PC

Dat

PC

Dat

PC

Dat

PC

PC

Fwall

Dat

WS

PC

Serv

VME

Aqs

VME

Aqs

PC

Acq

VME

Aqs

DAT Tape

000000

111111

Ethernet

Switch

Ethernet

Switch

Ethernet

Switch

Figure1. Computationaldeviesfordatafollowingand

sup-portofTCAqs. Computersinovalareloatedin

experimen-talroom, onnetedby optialbertoontrol room. The

upperline suggests that, in its nal version, TCAqs will

haveontrolledaessthrougharewall. Dataandpubli

servieswillbeavailableinaserverbeforetherewall.

The development of software has been done in a

slow pae, for it ats on elements onneted in a

lo-al network, inluding the omputer in experimental

roomthathousesthetriggerboardthatrestheentire

TCABRplasmashot. Thisposessafetyissues,thathas

been solved in the safest way: The loal network has

onlyoneuser,thetehniianinhargeofTCABRdaily

tasks,whenthemahine isin sientioperation.

II Present apabilities.

TCAqsisbasedupontheVME[2℄withoneratewhih

has21slotsavailable. Table1desribesavailable

mod-ules.

TCAqs ontrol ation is limited to prodution of

lightpulsesforringtheinterveningproessesthat

on-stitutesthetokamakationandproperreording

inter-val. Severalsideations,likesoundandlightwarnings

thatpreedestokamakshotsaredonemanuallybythe

operator, inluding theneessary ationof powerline

reservationthatfeedsmaintransformerfortoroidal

ur-rent. As for data aquisition, 18 ADCs modules are

available,ofwhihabout10areinusepermanent,

gen-eratingaround1:3MB ofdata(ompressed)per shot,

originatedbyaround40souresofdiagnostis. Table2

summarizesobserveddiagnostis. Theoperational

rou-tine forprogrammingthe TCAqsinvolvesdiret

writ-ing of onguration les, that are onveyedto proper

hardwarehousingomputer.

TCABR inherited CAMAC systems, omprising

rates and ADCs from TBR [5℄, the former tokamak

atthePhysisInstitute. Theseresouresarenotinfull

useforthelakofhardwareandsoftwaresuport.

fagundesif.usp.br

y

piresif.usp.br

(2)

Qt Unit Fun STD Chan Mem Res Sp.Rate

(kb) (bits) (ksp/s)

1 Crate vme

2 Crate vme Upg

1 68060 Cont vme

2 68040 Cont vme Upg

3 Pulse gen trig vme 16

1 Pulse gen trig vme 16 Upg

18 ADC wfr vme 8 512 12 1300

9 ADC wfr vme 8 512 12 3000 Upg

4 Crate am Upg

2 ADC wfr am 2 64 10 2000 Upg

6 ADC wfr am 8 4 8 4000 Upg

2 ADC wfr am 4 8 10 2000 Upg

2 ADC wfr am 32 1 10 5 Upg

Table1. TCAqshardwarefordataaquisition. \Upg"standsforupgrading, meaningthat itistobeavailable ina

shortperiodoftime.

Diagnosti Soure Num.Points Timeinterval

(1000) (ms)

VertialCurrent 2 50 100

PlasmaCurrent 1 50 100

LoopVoltage 1 50 100

OHTurrent 1 50 100

Sineoil 1 50 100

HorizontalPosition 1 50 100

X-Ray 3 50 100

SoftX-Ray 2 50 100

B

T

1 50 100

B

Z

1 50 100

H

12 50 100

MirnovCoil 1 50 100

FluxCoil 1 50 100

Diamagnetioil 1 50 100

Bolometer 1 50 100

LangmuirProbes 4 50 100

Interferometer 6 60 100

CommandVoltage 1 50 100

GasPuÆngVoltage 1 50 100

ECE 1 50 100

Table2. Normallyreordedsignalsin TCABRinjuneof2001

III Upgrading

The TCAqswill experimentasigniantexpansionin

the near future. Two more VME stations, with

Mo-torola68040CPUbasedontrollersareexpetedto

ar-rive in few weeks, together with 9 moreADCs of the

erator. Oneof themwillsupplyregistrationmeansfor

about 100 Mirnov and the other is to be installed in

ontrol room for software development, removing the

present day safety risks of tampering with the rate

usedforringthemahine.

(3)

boards will allow for the reation of a

instrumenta-tion network in experimental room, overlooked by a

omputer and a smooth link with TCAqs. Among

other andidate devies that may be present, like

os-illosopes, voltages meters. et. all CAMAC

instru-mentationresoureswillrenderavailable.

IV Data ompression

Daily use has determined that signals are to be

sam-pled with intervals of 4s in a extension of 50000

points,overing200msoftime. 12-bitresolutionADCs

produe numbersin theintervalfrom 0to 4096(2 12

).

Eah point demands twobytes for expression.

There-fore,eahsoureofdiagnostisgenerates100kbofdata

pershot. A single ADC astheones presentlyused in

TCAqs, may produe 0:8Mb of useful data (4Mb if

used with full memoryapaity). 5Mb ofdata are

tobekeptasthetotalinformationaquiredintheshot.

Obviouslythisnumberisexpetedtogrowasdierents

souresofsignalsareaggregatedintothedata

aquisi-tionsystem.

Forsakeofreduingtransmissionerrors,inrease

ef-ienyin storageand providefasteraesstime,data

has to be ompressed in order to obtain more easily

manageablevolumes. Unfortunately,dataompression

is notawell dened issue withpresribed reipesand

isstrongly dependent upon thekindofinformation at

hand. The theme is studied in several books, two of

whiharewrittenbyK.Saywood[10℄andM.Nelsonand

J.P.Gailly [8℄. In Data Compression, twomain

dire-tions are generally pursued: lossy methods and

loss-less methods. The former produing usually the best

results in ompression, at the sarie of information

onretrieval. Lossymethodswerenotonsidered. From

availablemethodsonlylosslessoneswerehosenforthe

TCAqs. Thatmeansthatinformationrestorestoits

en-tiretyafter deompressionwithnodierenesbetween

thereonstrutedlesandtheoriginal.

ThebookbyM.NelsonandJ.P.Gaillydesribes

sev-eral ompressionmethods making omparisonsamong

dierent methods a easy task. But in our study also

otherpromisingpublished methodsweretried.

The methods hosen were: Humann,

Adpta-tive Humann (AdHu), Arithmeti (Arith),

Statis-tial Modelling (ArithN), Lempel-Ziv-Welh method

(lzw15M)andDynami MarkovChain(dm)(as

pub-lished in[9℄. Atest set ofdatawasprepared,madeof

27lesasobtainedfromTCAqsAnalog-to-Digital

on-verterdevies, plusa le ontaining expressed with

100000 gures. Test set had size 5:34Mb,

ompara-ble the present TCAqs load. To ompare results we

adopted the Compression Index dened aording to

[7℄,as

CI =

1

Compressed size

100 (1)

The worse ompression method would produe a le

ompressed with size equal to the original size and a

CI =0%.Onotherhand,anidealompressionsheme

wouldhaveale withompressedsizeofzerosizeand

CI =100%. Resultsaresummarizedin table3.

All methods onsideredredue originalles to less

the half of the size and would be of signiative

im-provementin datamanagement. Thebest method

ap-pliableorrespondsto statisalmodelling, in whih a

ompressedsizeof1;02 Mbwasobtained,orresponding

to 81% ofdata ompressionin 103seonds. Time has

to beonsidered, asideCI. So,the ditionary method

baseduponLempel-Ziv-Welh(usuallyknownasLZW)

washosen. Aleof1:2Mbfortheoriginal5:34Mbwas

produed in 47swith a CI =77%. This means that

les produed by data aquisition devies had around

one-fth of their original size on the average,without

nolossesinontents.

Althoughwith good perspetives,weworkedupon

theodefornetuningitforourspeiuse. The

orig-inalodebyMr.M.Nelsonwasdonewithawidehorizon

in mindaiming theompressionof writtentext, being

appliable to a universe of 256 haraters, for

opera-tional systems of 16 and 32 bits. In TCAqs ase, we

dealwith dierentOSsbut allof thembasedupon32

bitandonly12possibledierentbitsmayour. With

this boundary onditions, the ode for LZW method

was modied to aept only 32 bits OSs, The nal

produtisashorterode,runningfasterandshallpose

no problems as long as ADCs with resolution less or

equal 16 (meaning systems able to resolve 1 part in

2 16

=64;536)areused. Thedrawbakisthat wehave

auniquewayofompression,insteadofaknown

stan-dard, making harderinformation exhange among

re-searhenters. An attenuantfator is that ode

om-pilesinopensoftwareode,withwidelyavailableGCC

ompiler and will be freely available | as also is the

ase with data aquired | from TCABR laboratory

omputers.

Method R.File CI Time

(b) (%) (s)

AdHu 1885495 65 18

Arith 1914252 64 25

ArithN 1017800 81 103

lzw15M 1206563 77 16

dm 1345600 75 121

Human 1948709 64 47

Table 3. Results of ompression aordding dierent

tehniques. The same set of data was applied to

ev-ery method, involvina a seleted olletion of atual

datafromTCABR29souresofdiagnostispluswith

100kgures,summingup5.34Mb. "R.File"standsfor

ResultingFile and\CI" standsfor Compression Index

(4)

Read board address

Request permission

for

reading and writing

Read byte

Write byte

Returns

for new action

11110000 (=0xf0)

10011011(=0x9b)

External actions

Figure 2. Board PDL-IO-16C has a simple programming

yle. We requestpermission from operational system for

reading/writing onthe boardaddress. Abyteis formedof

bits, eah one assuming only \1" or \0" values that will

lose or keep open orresponding relay in assoiate relay

board. Intheexample,therst,2 nd

,4 th

,5 th

and8 th

relays

would be atuated whenwe write 0x9bonboard address.

Reading ationis done by negating byteread: theanswer

of0xf0impliesthattherstfourrelays(fromrighttoleft)

areatuated.

V Use of relay board

Development of open software ontrolled hardware is

in progress. Initially, it is foreseen the operation of a

boardabletoonveyaword(twobytes)totheexternal

world. This board links to another one, through

op-tial deoupling, whixh has eight independent relays.

The internal board is identied PLD-IO-16C; the

ex-ternal board, PD-INTF8, both made by the brazilian

ompany PRODELS[6℄. The internal board has two

input andoutput independent ports, with8bits eah.

In order to aess the ports, two bytes are neessary,

although only one is in use. The board base address

maybeonguredthroughadipswithnamedSW1in

forbothreadingandwritingbytheuseofaontrolbit.

Theboard hasasimpleprogrammingyle, asshown

in Fig. 2. All software was developed in Clanguage,

with GCC ompiler, using funtions ioperm, inb and

outbunderlinuxoperationalsystem.

Thiswillmakepossibletoputunderautomati

on-trolsomeofthe ationsneessaryto retheTCABR,

inludingpowerlinereserveandwarninglights,asmay

help in operatingtransientation in the side ontrols

andsafetysystems,likedetetingunexpetedlive

pres-ene in forbidden areasorunmet onditions for

toko-makshot.

VI Conlusions

Stableanddependable, havingalready reordedafew

thousandsshots,theTCAqsisabouttohavea

signi-antinreaseof potentiality, beoming morepowerfull

andversatile. Addinginomplexity,thenewhardware

willinreaseeitherdiretly theapaityofobservation

and registry of physial phenomena; asindiretly,

al-lowingforthe reationof adediatedinstrumentation

network aroundtheTCABR. Softwareforbetter

om-pressionandalsoforhardwareationunderopensoure

software has been developed and is still in progress,

pursuingahigher levelof automatism in asafer

envi-ronmentforoperatingTCABR.

Referenes

[1℄ A.N.Fagundes,W.P.deS,P.M.S.A.Coelho,Fusion

En-gineering andDesign,48,213(2000).

[2℄ http://www.vita.om

[3℄ http://www.miroware.om

[4℄ http://www.tx.se

[5℄ A.Fagundes,Rev.Fis.Apl.Instrum.8,42(1993).

[6℄ www.prodels.om.br

[7℄ K.Loudon, Mastering Algorithms with C, O'Reilly &

assoiates, In.1999

[8℄ M.Nelson,J.L.GaillyTheDataCompressionBook.2 nd

Ed.M&TBooks,1996

[9℄ T.L.Yu,Dr.Dobbsjournal (243)1996.

[10℄ K.SayoodIntrodution to DataCompression, 2 nd

Ed.

Imagem

Figure 1. Computational devies for data following and sup-
Table 1. TCAqs hardware for data aquisition. \Upg"stands for upgrading, meaning that it is to be available in a
Table 3. Results of ompression aordding dierent
Figure 2. Board PDL-IO-16C has a simple programming

Referências

Documentos relacionados

sequently , a haoti eld line may reah the vessel wall. after a nite number of turns around

used in designing Damavand plasma position ontrol system.. This model is used for

on nitrogen gas, normally used as optial alibration method for eletron density measurements.. in Thomson sattering was realized, and the intensity of both detetors was

The results of experiments on Alfv en wave urrent drive and plasma heating in the TCABR tokamak.. are analyzed with the help of a numerial ode for simulation of the diusion of

spheromak is studied using the priniple of minimum rate of energy dissipation..

ratio (S/N) during beam emission spetrosopy of the Li beam injeted into the plasma, speially if.. density utuation measurements

The analysis of the energy and partile balane in the system plasma-relativisti runaway.. beam in TCABR, whih takes into aount only the ollisional mehanism of the heat

The inrease of toroidal magneti eld leads to gradients in the mean plasma radial.. proles and the onset of