TGATS tiling and data acquisition software
October 7, 2005
Wojtek Skulski
Laboratory for Laser Energetics
University of Rochester
Rochester New York 14623-1299
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
1
Acknowledgements
•
Programming:
Dave Hassett and Mark Wilson (LLE).
Megan Alexander, Eryk Druszkiewicz, Daniel Miner, Saba Zuberi (students).
Cuno Pfister and Wolfgang Weck (Oberon Microsystems).
Robert Campbell (BAE Systems).
Gérard Meunier (BlackBox community).
•
Hardware, optics, electronics:
Joachim Bunkenburg, Larry Iwan, Terry Kessler, Charles Kellogg, Conor Kelly,
John Price, Dave Canning, Matthew Swain (LLE).
Jan Toke (Chemistry), Frank Wolfs (Physics).
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
2
Available presentations
This presentation is the third one in a series. I will highlight a difference
between engineering and scientific programming, using LLE tiling and
TGATS software as examples.
Other available presentations:
Scientific programming without a sting (BlackBox for Scientists and Engineers).
An overview and benefits of BlackBox programming.
http://www.pas.rochester.edu/~skulski/Presentations/BB_Class.ppt
Spatially Synchronous Phase Detection Unboxed.
The details of the SSPD, as implemented at LLE.
\\Hopi\Omega-EP\OMEGA-EP Presentations\General\SSPD_Unboxed.ppt
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
3
A bit of history: how the HW/SW project started
February 2004
September 2004
April 2005
Manual control
Automatic control
One grating pair
Automatic control
Four grating pairs
(Mach-Zehnder)
Closed loop,
one TMA
Feb/2004
May/2004
Sept/2004
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
Apr/2005
October 7, 2005
4
Algorithm  implementation  application
Model (or LOTF meas.)
Algorithm
Science
Usually quite simple
E.g., SSPD is only 6 steps.
Implementation
Has to deal with practical issues
E.g., noise is big issue for phase
unwrapping in SSPD.
Application
Many months of work in the lab
Here you discover why you need rich
diagnostic tools and displays.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
5
Scientific versus engineering programming
Tiling
TGATS
Engineering project
Scientific project
Meetings and discussions
Meetings and discussions
Requirements document
Exploration
Developing SW
to meets requirements
Developing SW
continuously along the way
Working product
SW is constantly evolving
Deployment
and maintainance
Know-how
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
6
Research software is developed “on the go”
My research experience: every experiment is an exploration.
Software is often developed without rigid requirements.
As a consequence:
• Professional programmers seldom write research SW.
Physicists do.
• There is a well established method to deal with the situation.
• The same method worked at LLE (TGATS experiment).
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
7
Component Pascal is a tool for research SW
•
•
•
Component Pascal (CP) software is a proper tool for research SW.
•
Tiling of diffraction gratings  2 papers.
•
TGATS data acquisition  successful experiment.
•
Waveform digitizer GUI  physics outreach.
What makes CP and BlackBox development so effective?
•
Robustness and efficiency of the development environment.
•
Scientific and engineering toolboxes.
Scientist-friendly architecture.
•
Most of the effort is spent on algorithms. GUI is secondary.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
8
What makes CP and BlackBox
so effective?
Scientist-oriented tools and packages
Modular structure
Hardware interfacing
Debugging effort is dramatically reduced
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
9
The tool for tiling math: scientific computation library Chill
Over 5000 functions developed at BAE Systems for military airborne radar.
Fourier transforms.
Matrices and vectors.
Special functions.
High-precision math.
Digital filter design.
Random numbers.
Rational numbers.
Scientific plotting.
Etc.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
10
GUI on the fly
• Before BlackBox, SW effort was often dominated by GUI.
• “Empty GUI” was created first.
• The placeholders were later filled with code.
• Examples of this approach: LabView, VB, various C++ “GUI builders”.
• Under BlackBox, GUI can be generated automatically.
• GUI can also be composed by hand.
• Code is written first, and the GUI is then created automatically.
• Work can focus almost solely on the algorithm.
• This approach is very scientist-friendly.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
11
Robustness of old and new programming languages
Old languages are not safe: C, C++, Fortran, and original Pascal.
Internal errors are not prevented by design in the old languages.
Main offenders: pointer arithmetics, typecasts, and memory leaks.
New languages eliminated most if not all internal errors.
Internal errors are prevented by design in Component Pascal, Oberon,
Java, and C#.
Debugging is dramatically reduced.
Work can focus on research and algorithm development.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
12
Interfacing with hardware
• All HW interfacing is handled via DLLs.
• DLLs are called by BlackBox.
• Several HW projects completed with BlackBox at UofR.
• CAMAC, USB, video frame-grabber card, mechanical
actuators, distance-measuring interferometer (DMI),
waveform digitizers.
• This topic is covered in depth in my other presentations.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
13
Summary of BlackBox tools
1. Scientific libraries (math, vectors, etc.) Chill
2. Histogramming
Chill and/or Gr
3. Graphics display
Chill and/or Gr
4. Data management
POM
5. User-defined extensions
Data Logger
6. Interfacing with hardware
DLLs
7. Networking
TBD (tools built-in)
8. Database access
TBD (tools built-in)
TBD = “I have not used it yet”.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
14
Project #1: “Get tiled!”
Project started as engineering, later evolved to research.
Initially, the goal was closed-ended.
The structure of the program
reflects the structure of the problem.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
15
Software structure follows the problem
Next slide shows close correspondence between the TGA hardware
and the architecture of the software. The correspondence is not
exactly one-to-one, but it is close.
Actuator
subsystem
Far Field
calculations
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
Near Field
calculations
October 7, 2005
16
SW structure resembles the structure of HW
Part of the structure stems directly from the problem, part from
the programming considerations (e.g., the math tools).
TgcCmd
GUI
Display commands.
TgcUnits
TgcFarFields
Near Field processing.
Far Field processing.
Near Field
Far
Field
Actuators
Pico
Picomotor driver
TgcFilters
Time-domain
signal averaging
TgcGeometry
TgcTools
Actuator coordinates
Math tools specific
to this project.
Math
Subsystem Lib
Legend: server  client.
Math and graphics library
Public domain, with source.
MODULE
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
17
Implementation - related diagnostics
These displays help understand results of SSPD.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
18
Application – related diagnostics
These displays help understand the behavior of a TGA.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
19
Example of implementation issue: temporal noise
Temporal noise is significant in realistic conditions, even under the hood.
1.0
Piston history. G1G2 @ working, G3G4 @ working, mirror.
Drift due to
Piston (waves)
0.5
Piston = 0 steps
lateral piston
8 steps
0.0
Fit: P = 0.55393 - 0.000512 * iteration
Drift subtracted
-0.5
Blue: original piston. Green: piston minus drift
offline.
-1.0
0
200
400
600
800
Iteration
40
Piston noise. G1G2 and G3G4 @ working angle.
Frequency
Two TGAs +
retro-mirror.
8 steps
0 steps
30
20
10
0
0.0
0.2
0.4
0.6
0.8
1.0
Piston (waves)
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
20
Full compressor, first time ever !
After the algorithm and implementation are understood  success!
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
21
Main features of the tiling SW
•
Requirements / specs existed  SW customized for the task.
•
Recording of tip, tilt, piston originated as a debugging aid.
•
The recordings evolved into a powerful research tool.
•
Application needs diagnostics  many optional diagnostic displays.
•
Easy to add new features along the design lines (e.g., some new math).
•
Difficult to add new unplanned features (e.g., additional sensor recording).
•
Overall.
•
The OISG tiling SW is doing its job very well.
•
This SW is tailored to a specific task.
•
Like all BB software, it is very robust.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
22
From tiling to TGATS
•
Let’s do TGATS.
•
.. and we face a dilemma. The solution that was customized to one
task, is not easy to use in a vastly different situation.
•
Why is the situation different?
•
The list of sensors is open-ended. We know there will be more...
•
Four recordings  dozens of recordings.
•
Well-defined task  exploration.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
23
Project #2: TGATS
A research project.
An open-ended goal.
A closed-ended program is not the right solution.
Software structure is open-ended (a framework).
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
24
TGA Discrete Sensor Locations
In addition to tiling variables, we need to acquire several new ones.
This list is open-ended !
TAmb ( Ambient Temp)
TBK7 (Glass Temp)
TBeam (Beam Temp)
DMI 4 (Actuator 4)
Cap 4 (Actuator 4)
Cap 5 (Actuator 5)
DMI 6
(Actuator 6)
Cap 6
(Actuator 6)
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
Heide 1-1
(Actuator 5)
October 7, 2005
25
Structure of TGATS software (simplified)
GUI panels
Do not contain any code.
Data Logger
The entire
project #1
Experiment-specific, customized script.
Object management
Organizes histograms into a tree-like view on screen.
FF camera
Tiling software
NF camera
Heide interface
(M.Wilson)
Heide
probes
A/D and DMI interface
Utilities and calculations
Pascal domain
Low-level domain
DLLs provided by the vendors
or developed by D.Hassett.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
26
TGATS data acquisition framework
Ingredients of the TGATS data acquisition software.
•
Histogramming
 Gr Toolbox (WS).
•
Graphics display
 Gr Toolbox (WS).
•
Data management
 Persistent Object Manager (WS+DM).
•
Compiled DAQ script
 TGATS Data Logger (WS).
•
Tiling software, including image acquisition and processing (WS).
Hardware interface:
•
Zygo DMI interface DLL (source from Zygo, modified by DH & WS).
•
National Instruments interface DLLs (DH).
•
Piezo actuator control loop (DH).
•
Heidenhain readout over RS-232 (MW).
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
27
Data Logger and Object Management
Object management.
Data Logger: experiment-specific
script that is developed on-the-go.
Gr
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
28
TGATS SW summary
We evaluated and achieved qualification of a demanding system composed of
mechanical hardware, optics, electronics, and software.
• Complex software system was developed in short time by a small team.
• The experiment was almost continuously operated for several months with only
occasional downtime due to low-level DLLs. The downtime was seldom (if ever)
caused by high-level Pascal code, even though the SW was constantly evolving.
• The software has fulfilled its mission despite being a constantly evolving prototype.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
29
How TGATS software can be integrated with other systems
TGATS tiling and DAQ software
Tiling, math, data acquisition
Internet
communication
(TBD)
.
Local domain
Lab domain
Other computer A
Other computer B
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
30
Technology transfer
Minutes of CDR – OMEGA EP Tiled Grating Assembly Control Software
MATLAB® software is considered a useful tool for these analyses and many
scientists use it. […] The System Science Group should have the responsibility of
developing these algorithms, which, once developed, should be put under revision
control by the Software Development Group.
 System Science and Software Development now jointly work on the problem.
 I hope that the approach presented herein will help these groups.
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
October 7, 2005
31
Conclusions
Robust and useful SW developed by a small programming team.
Two complementary approaches were demonstrated.
Engineering approach.
Requirements documents.
SW meets requirements, but may be difficult to evolve.
Scientific approach.
Exploration & research, loose requirements, design-as-you-go.
Needs a general framework that is easy to evolve.
With proper tools, scientific approach can yield production-quality.
Component Pascal and BlackBox are such proper tools.
Simple
Algorithm
Implementation
TGATS Tiling and Data Acquisition Software. Wojtek Skulski Laboratory for Laser Energetics, University of Rochester.
Application
October 7, 2005
Demanding
32
Descargar

From picoseconds to galaxies