Data Acquisition Systems (and a little bit about trigger & electronics) CERN Summerstudent Programme 2009 Niko Neufeld, CERN-PH

Embed Size (px)

Text of Data Acquisition Systems (and a little bit about trigger & electronics) CERN Summerstudent Programme...

  • Data Acquisition Systems(and a little bit about trigger & electronics) CERN Summerstudent Programme 2009 Niko Neufeld, CERN-PH

  • *IntroductionData Acquisition is a specialized engineering discipline thriving mostly in the eco-system of large science experiments, particularly in HEPIt consists mainly of electronics, computer science, networking and (we hope) a little bit of physicsSome material and lots of inspiration for this lecture was taken from lectures by my predecessors Many thanks to S. Suman for his help with the drawings!N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *OutlineIntroductionData acquisitionThe first data acquisition campaignA simple DAQ systemOne sensorMore and more sensorsRead-out with busesCrates & Mechanics The VME Bus

    A DAQ for a large experimentSizing it upTriggerFront-end ElectronicsReadout with networksEvent building in switched networksProblems in switched networksA lightning tour of ALICE, ATLAS, CMS and LHCb DAQs

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *DisclaimerTrigger and DAQ are two vast subjects covering a lot of physics and electronicsBased entirely on personal bias I have selected a few topicsWhile most of it will be only an overview at a few places we will go into some technical detailSome things will be only touched upon or left out altogether information on those you will find in the references at the endElectronics (lectures by Ph. Farthouat)High Level Trigger (lectures by G. Dissertori)DAQ of experiments outside HEP/LHCManagement of large networks and farmsHigh-speed mass storageExperiment Control (= Run Control + Detector Control / DCS)N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Tycho Brahe and the Orbit of MarsFirst measurement campaignSystematic data acquisitionControlled conditions (same time of the day and month)Careful observation of boundary conditions (weather, light conditions etc) - important for data quality / systematic uncertainties

    I've studied all available charts of the planets and stars and none of them match the others. There are just as many measurements and methods as there are astronomers and all of them disagree. What's needed is a long term project with the aim of mapping the heavens conducted from a single location over a period of several years. Tycho Brahe, 1563 (age 17). N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *The First Systematic Data AcquisitionData acquired over 18 years, normally e every monthEach measurement lasted at least 1 hr with the naked eyeRed line (only in the animated version) shows comparison with modern theoryN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Tychos DAQ in Todays TerminologyBandwith (bw) = Amount of data transferred / per unit of timeTransferred = written to his logbookunit of time = duration of measurement bwTycho = ~ 100 Bytes / h (compare with LHCb 40.000.000.000 Bytes / s)Trigger = in general something which tells you when is the right moment to take your dataIn Tychos case the position of the sun, respectively the moon was the triggerthe trigger rate ~ 3.85 x 10-6 Hz (compare with LHCb 1.0 x 106 Hz)

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Some More Thoughts on TychoTycho did not do the correct analysis of the Mars data, this was done by Johannes Kepler (1571-1630), eventually paving the way for Newtons lawsMorale: the size & speed of a DAQ system are not correlated with the importance of the discovery!N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • A Very Simple Data Acquisition System

  • *Measuring TemperatureSuppose you are given a Pt100 thermo-resistorWe read the temperature as a voltage with a digital voltmeterN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Reading Out AutomaticallyNote how small the sensor has become.In DAQ we normally need not worry about the details of the things we readoutUSB/RS232#include struct usb_bus *bus; struct usb_device *dev; usb_dev_handle *vmh = 0; usb_find_busses(); usb_find_devices(); for (bus = usb_busses; bus; bus = bus->next) for (dev = bus->devices; dev; dev = dev->next) if (dev->descriptor.idVendor == HOBBICO) vmh = usb_open(dev);usb_bulk_read(vmh ,3,&u,sizeof(float),500);

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Read-out 16 SensorsBuy 4 x 4-port USB hub (very cheap) (+ 3 more voltmeters)Adapt our little DAQ programNo fundamental (architectural) change to our DAQ

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Read-out 160 SensorsFor a moment we (might) consider to buy 52 USB hubs, 160 Voltmetersbut hopefully we abandon the idea very quickly, before we start cabling this!Expensive, cumbersome, fragile our data acquisition system is not scalableN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • Read-out with Buses

  • *A Better DAQ for Many (temperature) SensorsBuy or build a compact multi-port volt-meter module, e.g. 16 inputsPut many of these multi-port modules together in a common chassis or crateThe modules needMechanical supportPowerA standardized way to access their data (our measurement values)All this is provided by standards for (readout) electronics such as VME (IEEE 1014)

    Backplane Connectors(for power and data)VME Board Plugs into Backplane7U VME Crate(a.k.a. Subrack)197UN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    V.P.

  • *DAQ for 160 Sensors Using VME Readout boards in a VME-cratemechanical standard forelectrical standard for power on the backplanesignal and protocol standard for communication on a bus

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *A Word on Mechanics and PizzasThe width and height of racks and crates are measured in US units: inches (in, '') and U 1 in = 25.4 mm1 U = 1.75 in = 44.45 mmThe width of a "standard" rack is 19 in. The height of a crate (also sub-rack) is measured in UsRack-mountable things, in particular computers, which are 1 U high are often called pizza-boxesAt least in Europe, the depth is measured in mmGory details can be found in IEEE 1101.x (VME mechanics standard)49 U1 UN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Communication in a Crate: BusesA bus connects two or more devices and allows the to communicateThe bus is shared between all devices on the bus arbitration is requiredDevices can be masters or slaves (some can be both) Devices can be uniquely identified ("addressed") on the bus

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *BusesFamous examples: PCI, USB, VME, SCSIolder standards: CAMAC, ISAupcoming: ATCAmany more: FireWire, I2C, Profibus, etcBuses can belocal: PCIexternal peripherals: USBin crates: VME, compactPCI, ATCAlong distance: CAN, ProfibusN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *The VME BusIn a VME crate we can find three main types of modulesThe controller which monitors and arbitrates the busMasters read data from and write data to slavesSlaves send data to and receive data from mastersAddressing of modulesIn VME each module occupies a part of a (flat) range of addresses (24 bit to 32 bit)Address range of modules is hardwired (conflicts!)

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    0x000-0x1ff0x200-0x2ff0x300-0x3ff0x400-0x4ff0x500-0x5ff0x600-0x6ff

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    V.P.

  • *VME protocol 1) ArbitrationArbitration: Master asserts*) BR#, Controller answers by asserting BG# If there are several masters requesting at the same time the one physically closest to the controller winsThe winning master drives BBSY* high to indicate that the bus is now in use

    Pictures from http://www.interfacebus.com*) assert means driving the line to logical 0 (VME control lines are inverted or active-low)N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *VME protocol 2) Write transferThe Master writes data and address to the data / respectively data busIt asserts DS* and AS* to signal that the data and address are validThe slave reads and acknowledges by asserting DTACKThe master releases DS*, AS* and BSBSY*, the cycle is completeNote: there is no clock! The slave can respond whenever it wants. VME is an asynchronous busN. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *Speed ConsiderationsTheoretically ~ 16 MB/s can be achievedassuming the databus to be full 32-bit widethe master never has to relinquish bus master shipBetter performance by using block-transfers

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

    N. Neufeld CERN/PH, DAQ Summer Student Lectures 2009

  • *VME protocol 3)