closeAditya Thapa / work
Automation & safety systems · SLAC

Keeping people
out of harm’s way.

I engineer, test, and maintain Personnel Protection Systems—the controls that prevent accelerator operation unless people are outside restricted areas and every required safety condition has been verified.

Accelerator equipment at SLAC
Before the safety systems

What the machine is here to do.

Scroll through a short introduction to SLAC, the X-ray laser, and the people who use it.

The LCLS undulator hall at SLAC
01The laboratory

SLAC and LCLS

SLAC is a U.S. Department of Energy national laboratory operated by Stanford University. One of its major user facilities is the Linac Coherent Light Source—LCLS—the world’s first hard X-ray free-electron laser.

A national laboratory · a global user facility
01 / 06
The TMO experimental hutch at LCLS
02The source

Begin with electrons

A laser strikes a photocathode and releases a compact bunch of electrons. Radio-frequency accelerator structures then bring that bunch to high energy and shape it for the process ahead.

Light → electrons → acceleration
02 / 06
The long line of undulators used to generate X-rays at LCLS
03The FEL process

Make the electrons radiate together

The bunch passes through a long sequence of alternating magnets called undulators. The magnetic field makes the electrons weave from side to side and emit X-rays. Interaction between the electrons and their own radiation organizes the bunch into microscopic structures, amplifying coherent X-ray light.

Undulators · microbunching · coherent light
03 / 06
Scientific equipment in the RIX experimental hutch at LCLS
04The light

Soft and hard X-rays

LCLS produces extraordinarily bright, ultrashort pulses across soft and hard X-ray regimes. Soft X-rays are especially useful for electronic structure and chemical behavior; more penetrating hard X-rays can resolve atomic structure and dynamics inside materials and biological samples.

Femtosecond—and shorter—views of matter
04 / 06
A scientist working inside the TMO hutch at LCLS
05The users

Scientists bring the questions

Researchers from universities, laboratories, and industry around the world propose experiments and come to SLAC for beamtime. Their fields include chemistry, biology, materials science, atomic and molecular physics, quantum science, and matter under extreme conditions.

An international research community
05 / 06
Researchers working at the MFX instrument at LCLS
06The experiments

Watch matter change

The pulses can freeze motion fast enough to assemble molecular movies: chemical bonds forming, proteins changing shape, charge moving through quantum materials, catalysts working, and matter responding to the temperatures and pressures found inside planets and stars.

Structure is only part of the story—the change matters too
06 / 06

Facility context and photography: SLAC National Accelerator Laboratory. Photos by Alberto Gamazo and Jacqueline Ramseyer Orrell.

01 / The system

Safety is a chain of evidence.

Before an accelerator beam can enter an experimental area, the control system must know that doors and gates are secured, people are outside restricted areas, warning systems are working, keys and emergency controls are in the correct state, and beam-blocking equipment is ready.

These safeguards are called Personnel Protection Systems. They resemble industrial emergency-shutdown systems, but extend across large scientific facilities and thousands of interconnected devices. If one required condition is lost, the system must prevent or stop beam delivery.

02 / Full lifecycle

The change is not finished when the code works.

01

Understand

Translate the intended safety behavior into requirements that can be traced through software, hardware, wiring, and field equipment.

02

Design

Develop redundant PLC logic, electrical interfaces, signal maps, access-control sequences, and fail-safe behavior.

03

Prove

Exercise normal and failure conditions on representative hardware, automate repeatable tests, and investigate every mismatch.

04

Deploy

Coordinate installation, commissioning, acceptance testing, release records, and as-built verification across disciplines.

05

Preserve

Leave the drawings, specifications, software versions, procedures, and evidence aligned for the next engineer.

03 / Representative work

Three views of the work.

Recommissioning

Bringing an experimental area’s safety system back into operation

I worked across safety PLCs, access-control sequences, doors, locks, emergency exits, keys, warning devices, radiation monitors, beam-blocking equipment, and operator displays. Functional testing exposed places where specifications, diagrams, and software used different names—or described paths that did not match the installed system. I traced the actual behavior and helped bring the controlled documentation back into agreement with it.

Decommissioning

Removing a safety-critical beam stopper from the whole system

Retiring the physical device was only one part of the job. I audited and modified redundant safety PLCs and a supervisory controller; removed obsolete commands, alarms, and modes; coordinated cable and monitoring changes; updated drawings and specifications; released versioned software; and developed focused validation followed by full acceptance testing.

Test engineering

Building hardware-in-the-loop systems for safety PLCs

I help design benches that combine safety controllers, industrial I/O, networks, access-control PLCs, and simulated field devices. They let us reproduce doors opening, locks failing, keys being removed, channels disagreeing, communications disappearing, and other failure conditions—then verify that the system reports them correctly and moves to a safe state.

04 / Troubleshooting

Reconstruct the entire chain of cause and effect.

When an automated PLC test reports the wrong signals, the failure may live in the expected test behavior, a name or address in an engineering document, PLC memory, an I/O module, network communication, an operator command, or a condition that remains latched until reset.

The useful question is rarely just “what broke?” It is: what was the system supposed to do, what did the software command, what did the hardware receive, and what did the operator interface report?

Make the smallest well-understood change. Test both normal and failure behavior. Leave enough evidence for another engineer to reconstruct the work.
05 / Working vocabulary

Across code, current, and controlled documents.

  • Siemens, Pilz & Allen-Bradley PLCs
  • Redundant and fail-safe control
  • Personnel protection systems
  • EPICS controls & operator interfaces
  • Beckhoff I/O & PROFINET
  • Hardware-in-the-loop testing
  • Python test automation
  • Electrical drawings & signal tracing
  • Functional testing & commissioning
  • Requirements & configuration control
06 / An adjacent experiment

Searching engineering knowledge with local AI.

I built a retrieval-augmented generation prototype for searching technical document collections. It combined local Llama models, Hugging Face embeddings, PDF ingestion, semantic retrieval, and experiments with chunking and vector storage. The aim was not an oracle; it was faster discovery grounded in traceable source passages, with security and deployment constraints considered from the beginning.