electromagnet testing through hardware programming marco enriquez fermi national particle...

20
Electromagnet Testing Electromagnet Testing Through Through Hardware Programming Hardware Programming Marco Enriquez Marco Enriquez Fermi National Fermi National Particle Accelerator Particle Accelerator Tufts University, ECE Tufts University, ECE Department Department

Upload: peyton-peard

Post on 28-Mar-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Electromagnet Testing Through Electromagnet Testing Through Hardware ProgrammingHardware Programming

Marco EnriquezMarco Enriquez

Fermi National Particle AcceleratorFermi National Particle Accelerator

Tufts University, ECE DepartmentTufts University, ECE Department

Page 2: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Presentation OutlinePresentation Outline

The Fermi National Accelerator LaboratoryThe Fermi National Accelerator Laboratory The Tevatron and Fermilab’s Accelerators The Tevatron and Fermilab’s Accelerators

ElectromagnetsElectromagnets Electromagnet TestingElectromagnet Testing

Single Stretched-Wire (SSW) SystemSingle Stretched-Wire (SSW) System The Extensible Measurement System (EMS)The Extensible Measurement System (EMS)

Contributing to the EMSContributing to the EMS Project Code HierarchyProject Code Hierarchy

The Final ProductThe Final Product ConclusionConclusion

Page 3: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Introduction: FermilabIntroduction: Fermilab

The Fermi National The Fermi National Accelerator Laboratory Accelerator Laboratory (Fermilab) is one of (Fermilab) is one of the world’s leading the world’s leading research facilities for research facilities for Particle Physics and Particle Physics and Astrophysics. Astrophysics.

Fermilab contains the Fermilab contains the most powerful particle most powerful particle accelerator in the world, accelerator in the world, The Tevatron. The Tevatron.

Page 4: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

The Tevatron: Particle AccelerationThe Tevatron: Particle Acceleration

The Tevatron is a circular The Tevatron is a circular particle accelerator with a 4 mile particle accelerator with a 4 mile circumference. It accelerates circumference. It accelerates particles up to 0.98 TeV at particles up to 0.98 TeV at 99.99% the speed of light.99.99% the speed of light.

Particle Acceleration:Particle Acceleration: The protons and anti-protons The protons and anti-protons

are passed through a series of are passed through a series of primary accelerators to primary accelerators to increase their speed and increase their speed and energy.energy.

Protons and Anti-protons are Protons and Anti-protons are then injected into the final then injected into the final accelerator (Tevatron), in accelerator (Tevatron), in opposing paths. opposing paths.

When the proton and anti-When the proton and anti-protons gather ~1 TeV in the protons gather ~1 TeV in the Tevatron, they are collided with Tevatron, they are collided with one another at one of the two one another at one of the two detector halls at Fermilab.detector halls at Fermilab.

Page 5: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

The Tevatron: ElectromagnetsThe Tevatron: Electromagnets Important Questions:Important Questions:

How are the particles contained How are the particles contained in the accelerator?in the accelerator?

How are the particles’ path How are the particles’ path altered?altered?

Electromagnets:Electromagnets:

Page 6: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

The Tevatron: ElectromagnetsThe Tevatron: Electromagnets Important Questions:Important Questions:

How are the particles contained How are the particles contained in the accelerator?in the accelerator?

How are the particles’ path How are the particles’ path altered?altered?

Electromagnets:Electromagnets: Fermilab’s accelerators mainly Fermilab’s accelerators mainly

rely on two different types rely on two different types electromagnets: Dipole and electromagnets: Dipole and Quadrupole magnets.Quadrupole magnets.

Dipole Magnets bend the Dipole Magnets bend the particle beam’s pathparticle beam’s path

Quadrupole Magnets focus or Quadrupole Magnets focus or defocus the particle beam, defocus the particle beam, which confines the particlewhich confines the particle

These two types of magnets are These two types of magnets are connected by straight vacuum connected by straight vacuum chambers, and this entire chambers, and this entire system is configured to have a system is configured to have a circular shapecircular shape

Page 7: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Electromagnet TestingElectromagnet Testing For the accelerator to work For the accelerator to work

properly, the electromagnets properly, the electromagnets need to be thoroughly testedneed to be thoroughly tested

Important Tests:Important Tests: Magnetic Field ShapeMagnetic Field Shape

Electromagnets need to have a Electromagnets need to have a proper field shape in order to proper field shape in order to accomplish its taskaccomplish its task

Magnetic CenterMagnetic Center Finding the magnetic center is Finding the magnetic center is

important for focusing magnets important for focusing magnets because they help engineers because they help engineers align magnets properly in the align magnets properly in the acceleratoraccelerator

Magnet Strength: Magnet Strength: Too much or too little strength Too much or too little strength

can lead to improper bending can lead to improper bending or focusingor focusing

To perform these tests, the To perform these tests, the Technical Division at Fermilab Technical Division at Fermilab created the Single Stretched-created the Single Stretched-Wire (SSW) systemWire (SSW) system

T ?

Page 8: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

The Single Stretched-Wire SystemThe Single Stretched-Wire System

The SSW System is a relatively simple and accurate method of performing various The SSW System is a relatively simple and accurate method of performing various measurements on an electromagnetmeasurements on an electromagnet

The SSW System is composed of:The SSW System is composed of: CuBe wire 100CuBe wire 100m thick that is stretched through the electromagnet.m thick that is stretched through the electromagnet. Precision motor stages, one at each end of the wire, to hold and control the CuBe wirePrecision motor stages, one at each end of the wire, to hold and control the CuBe wire Various machines, such as a digital integrator, connected to the motor stages to measure Various machines, such as a digital integrator, connected to the motor stages to measure

and calculate various electromagnetic properties, as current flows through the CuBe wireand calculate various electromagnetic properties, as current flows through the CuBe wire A universal Motion Controller, which controls the motor stages in the SSW SystemA universal Motion Controller, which controls the motor stages in the SSW System

Page 9: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

The Extensible Measurement SystemThe Extensible Measurement System

To standardize and unify measurement To standardize and unify measurement systems, like the SSW system, the Technical systems, like the SSW system, the Technical Division created the Extensible Measurement Division created the Extensible Measurement System (EMS) frameworkSystem (EMS) framework

EMS is a framework with a configurable sets of EMS is a framework with a configurable sets of components designed to acquire, process, components designed to acquire, process, visualize, store and retrieve data. visualize, store and retrieve data. The EMS is designed to be compatible with the The EMS is designed to be compatible with the

PC, Linux, and Unix platformsPC, Linux, and Unix platforms

The EMS retrieves data from the data The EMS retrieves data from the data acquisition machines, which controls acquisition machines, which controls measurement hardware attached to the motor measurement hardware attached to the motor stages. It then outputs various calculations and stages. It then outputs various calculations and pertinent data to the computer screenpertinent data to the computer screen

Calculations performed by the EMS:Calculations performed by the EMS: CurrentCurrent Magnetic FluxMagnetic Flux FFT FFT

The EMS system also very flexible: adding The EMS system also very flexible: adding extra programs and electromagnetic tests is an extra programs and electromagnetic tests is an easy processeasy process

Page 10: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Advantages of a computer program:Advantages of a computer program: Simplified Set-upSimplified Set-up

By creating a computer program, By creating a computer program, machine configurations and virtual machine configurations and virtual connections are automatedconnections are automated

Simplified motor movement, controlsSimplified motor movement, controls Instead of having to learn the Motion Instead of having to learn the Motion

Controller’s language set, the user Controller’s language set, the user can just use descriptive menus to can just use descriptive menus to initialize or move the step motorsinitialize or move the step motors

Information/help readily availableInformation/help readily available Instead of looking through the Instead of looking through the

manual, users rely on the program to manual, users rely on the program to give necessary command details and give necessary command details and informationinformation

Contributing to the EMSContributing to the EMS My project: create software for Linux My project: create software for Linux

that communicates with the Motion that communicates with the Motion ControllerController Allows users to send commands to Allows users to send commands to

the motion controller and retrieve the motion controller and retrieve status of the positioning systemstatus of the positioning system

This system will be used for testing This system will be used for testing and debugging of the motion and debugging of the motion positioning systempositioning system

The program currently being used is The program currently being used is only a prototypeonly a prototype

The lower levels of the system will The lower levels of the system will be later used in the final, production be later used in the final, production level softwarelevel software

Page 11: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Project SetupProject Setup The IEEE 488 (GPIB) port was The IEEE 488 (GPIB) port was

used to connect the Motion used to connect the Motion Controller and the Linux systemController and the Linux system

GPIB port advantages :GPIB port advantages : The GPIB port sends data in a The GPIB port sends data in a

simple fashion, as a stringsimple fashion, as a string Previous libraries have been Previous libraries have been

created for the GPIB Port at the created for the GPIB Port at the Technical DivisionTechnical Division

A complex hierarchy of computer A complex hierarchy of computer programs was used to implement programs was used to implement a program that properly a program that properly communicates with the Motion communicates with the Motion Controller using the GPIB portController using the GPIB port

Page 12: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Code Hierarchy: Entire StructureCode Hierarchy: Entire Structure

The Code’s Hierarchy includes:The Code’s Hierarchy includes: Fermilab’s web-server (@ FNAL)Fermilab’s web-server (@ FNAL)

A WebpageA Webpage This has a user interface which allows users to instruct This has a user interface which allows users to instruct

the motion controller from the any computer on the fnal the motion controller from the any computer on the fnal networknetwork

Two C++ programsTwo C++ programs They retrieve data from the webpage (by using CGI) and They retrieve data from the webpage (by using CGI) and

the appropriate standard C++ libraries, such as string the appropriate standard C++ libraries, such as string handling classes or I/O classeshandling classes or I/O classes

These programs also contain the motion controller’s These programs also contain the motion controller’s commands. They also are responsible for sending these commands. They also are responsible for sending these commands and retrieving the output to and from the commands and retrieving the output to and from the motion controller.motion controller.

Fundamental UtilitiesFundamental Utilities These are created C++ libraries used for specialized These are created C++ libraries used for specialized

functions such as sending messages via the GPIB port, functions such as sending messages via the GPIB port, string initialization, or send special return typesstring initialization, or send special return types

Page 13: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

GPIB Library:GPIB Library: Holds all functions that deal Holds all functions that deal

with the GPIB portwith the GPIB port

Includes functions that:Includes functions that: Creates a virtual deviceCreates a virtual device Open and Close a virtual Open and Close a virtual

devicedevice Sends commandsSends commands Retrieves commandsRetrieves commands Checks GPIB bus statusChecks GPIB bus status

Vmtf Library:Vmtf Library: Makes C++ programming Makes C++ programming

simpler bysimpler by Adding extra functions, mostly Adding extra functions, mostly

used with string initializationused with string initialization Defining special return types Defining special return types

(ERROR, OK) (ERROR, OK)

Also defines messaging for Also defines messaging for other devices and processor other devices and processor boardsboards

Code Hierarchy: Lowest LevelCode Hierarchy: Lowest Level

MotionController.cc

MotionController.h

GPIB Vmtf

MotionController

Fundamental Utilities

Page 14: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

MotionController.ccMotionController.cc Uses the GPIB library to set up a Uses the GPIB library to set up a

virtual connection with the virtual connection with the Motion Controller and Motion Controller and communicate with itcommunicate with it

Holds all the possible commands Holds all the possible commands that could be sent to the Motion that could be sent to the Motion Controller, as functionsController, as functions

Holds functions that output Holds functions that output command status and errors, if command status and errors, if they existthey exist

MotionController.hMotionController.h A header file that allows A header file that allows

another C++ program to use all another C++ program to use all the functions implemented in the functions implemented in MotionController.ccMotionController.cc

This header file also contains This header file also contains class definitions for the Motion class definitions for the Motion ControllerController

Code Hierarchy: Lowest LevelCode Hierarchy: Lowest Level

MotionController.cc

MotionController.h

MotionController

GPIB Vmtf

Fundamental Utilities

Page 15: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Code Hierarchy: Middle LevelCode Hierarchy: Middle Level

MotionController.h

MotionController

MotionController_

TestDriver.cc

CGI

MotionController_TestDriver

MotionController_TestDriver.ccMotionController_TestDriver.cc Uses the MotionController.cc Uses the MotionController.cc

functions via MotionController.hfunctions via MotionController.h

Responsible for Responsible for Retrieving unparsed information Retrieving unparsed information

from the websitefrom the website Parsing website dataParsing website data Sending the proper command to Sending the proper command to

the motion controllerthe motion controller Updating the webpage by changing Updating the webpage by changing

its “COMMAND STATUS” field its “COMMAND STATUS” field though html manipulationthough html manipulation

CGI CodeCGI Code This is not a program, but a This is not a program, but a

method of retrieving information method of retrieving information from websitesfrom websites

The CGI code is “embedded” in The CGI code is “embedded” in MotionController_TestDriver.ccMotionController_TestDriver.cc

The CGI code accesses system The CGI code accesses system variables that become available variables that become available once information has been sent once information has been sent to the websiteto the website

Page 16: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

HTML CodeHTML Code Hypertext Markup Language: Hypertext Markup Language:

“The scripting language used to “The scripting language used to define the content and define the content and appearance of a webpage”appearance of a webpage”

This sends information to This sends information to MotionController_TestDriver.ccMotionController_TestDriver.cc

The CGI code gets the The CGI code gets the information the HTML sends, as information the HTML sends, as an unparsed stringan unparsed string

Code Hierarchy: Higher LevelCode Hierarchy: Higher Level

CGI

MotionController_TestDriver

Motion Controller Control Webpage

HTML

Motion Controller WebpageMotion Controller Webpage Contains 76 motion controller Contains 76 motion controller

commands used in the SSW commands used in the SSW systemsystem

Is made up of three components: Is made up of three components: Top.html – Gives users command Top.html – Gives users command

status informationstatus information Bottom.html – Allows users to Bottom.html – Allows users to

send commands to the motion send commands to the motion controllercontroller

Frames.html – Allows Top.html Frames.html – Allows Top.html and Bottom.html to appear in the and Bottom.html to appear in the same page simultaneouslysame page simultaneously

Page 17: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Code Hierarchy: Highest LevelCode Hierarchy: Highest Level

Motion Controller Control Webpage

USER

Web Server

Fermilab’s Web ServerFermilab’s Web Server Program that exists in the FNAL Program that exists in the FNAL

domaindomain

Fetches the html code from the Fetches the html code from the

network and sends it to a user's network and sends it to a user's computer computer

The user’s internet browser The user’s internet browser “creates” the webpage using the “creates” the webpage using the retrieved html coderetrieved html code

UserUser Must be privileged and in the fnal.gov Must be privileged and in the fnal.gov

domaindomain

Starts the process of sending motion Starts the process of sending motion controller commands by interacting with controller commands by interacting with the webpagethe webpage

Oblivious to the hierarchy of code Oblivious to the hierarchy of code beneath webpagebeneath webpage

Must still be knowledgeable of the Must still be knowledgeable of the Motion Controller and SSW for proper Motion Controller and SSW for proper operationoperation

Page 18: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

Final ProductFinal Product

Commands are sorted by category and parametersCommands are sorted by category and parameters Easy pull-down menu for each categoryEasy pull-down menu for each category A category “asks” for input parameters if neededA category “asks” for input parameters if needed Simple pull down menu to indicate port number and Simple pull down menu to indicate port number and motor numbermotor number

Command status is indicated at the top of the screenCommand status is indicated at the top of the screen Help buttons to invoke a pop-up help window, with Help buttons to invoke a pop-up help window, with detailed informationdetailed information

Page 19: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

ConclusionConclusion

A simple and functional program was developed as a A simple and functional program was developed as a result of the complex hierarchyresult of the complex hierarchy

This website makes motion controller communication This website makes motion controller communication easier, which in turn helps simplify electromagnet testingeasier, which in turn helps simplify electromagnet testing

Future Areas of Research/Improvement:Future Areas of Research/Improvement: Further code optimizationFurther code optimization Implement similar versions for the PC and UNIX platforms. Implement similar versions for the PC and UNIX platforms. Integration of the Linux, PC and UNIX implementationsIntegration of the Linux, PC and UNIX implementations

Page 20: Electromagnet Testing Through Hardware Programming Marco Enriquez Fermi National Particle Accelerator Fermi National Particle Accelerator Tufts University,

AcknowledgementsAcknowledgements Sincere Thanks:Sincere Thanks:

FermilabFermilab The SIST CommitteeThe SIST Committee Jerzy Nogiec and the TD Software Development GroupJerzy Nogiec and the TD Software Development Group Dr. DavenportDr. Davenport

Images From:Images From: Fermilab Visual Image ServicesFermilab Visual Image Services Joe DiMarco (wwwtsmtf.fnal.gov/~dimarco)Joe DiMarco (wwwtsmtf.fnal.gov/~dimarco) Technical Division at FermilabTechnical Division at Fermilab United States Particle Accelerator School (uspas.fnal.gov)United States Particle Accelerator School (uspas.fnal.gov) Stanford Linear AcceleratorStanford Linear Accelerator CERN AcceleratorCERN Accelerator The Particle Adventure (particleadventure.org)The Particle Adventure (particleadventure.org)