Skip to content

Repository files navigation

Automated Fiber Coupling

Overview

This project implements an automated fiber-coupling system using five servo motors (two per mirror and one z-translation stage) and a PicoScope feedback signal. The system is capable of:

  • Recovering from fiber-coupling misalignments caused by drift.
  • Performing blind fiber coupling from an unknown starting position.
  • Optimizing optical power coupled into a single-mode fiber.
  • Operating through Bayesian Optimization combined with local iterative correction.

The optimization process uses Latin Hypercube Sampling (LHS) for initial exploration, a Gaussian Process (GP) model to learn the coupling landscape, and an Upper Confidence Bound (UCB) acquisition function to identify promising regions of the search space.


Hardware

  • SCServo motors with URT-1 controller board (serial communication)
  • PicoScope used as the optimization feedback signal
  • Two-mirror beam steering system
  • Fiber coupling setup

Installation

pip install -r requirements.txt

Repository Structure

controller/
│
├── Picoscope.py
├── ServoMotors.py
└── FiberCoupling.py

Contains the hardware interfaces and optimization loop:

  • PicoScope communication
  • Servo motor control
  • Fiber-coupling optimization routines
model/
│
├── Data acquisition
├── Latin Hypercube Sampling (LHS)
└── Gaussian Process implementation

Contains the sampling strategies and machine-learning models used during optimization.

Alternatively, optimization can be performed using M-LOOP:

m_loop/
└── run_experiment_fiber_coupling.py
view/

Graphical user interface providing:

  • Read/write servo positions
  • Real-time PicoScope voltage monitoring
  • Blind fiber coupling
  • Drift correction

Usage

Drift Correction Workflow

Initial Sampling
        ↓
Train Gaussian Process (GP)
        ↓
Bayesian Optimization (UCB)
        ↓
Identify High-Coupling Region
        ↓
Iterative Local Correction
        ↓
Final Validation

The drift-correction routine performs a complete optimization cycle.

Initially, a set of measurements is collected using Latin Hypercube Sampling and used to train a Gaussian Process model of the coupling landscape.

The Gaussian Process then performs a user-defined number of Bayesian Optimization iterations using an Upper Confidence Bound acquisition function to identify regions likely to contain improved coupling.

Once a promising region has been identified, a local iterative correction routine is executed. The algorithm first performs a sweep of the z-position and moves to the value producing the highest signal. It then performs a plus/minus search on the mirror actuators until no further improvement is observed.

Running Drift Correction

python run_fine_tune.py

Important parameters:

Parameter Description
global_samples Number of samples collected using Latin Hypercube Sampling
bo_iterations Number of Bayesian Optimization iterations
local_step Initial mirror step size during local correction
local_z_step Initial z-axis step size during local correction
local_rounds Number of local correction rounds
validation_measurements Number of measurements used to validate the final result

These values can be modified directly in:

run_fine_tune.py

Running Blind Fiber Coupling

Blind fiber coupling is intended for situations where no prior alignment information is available. Unlike drift correction, which starts from a previously aligned state, the algorithm must first locate promising coupling regions within the full actuator search space.

The procedure consists of three stages:

Broad Search
     ↓
Cluster Selection
     ↓
Medium Optimization
     ↓
Fine Optimization

1. Broad Search

A large Latin Hypercube Sampling (LHS) scan is performed over the entire servo workspace. The objective of this stage is not to find the optimum directly, but rather to identify regions that exhibit measurable coupling.

RANGE_BROAD = np.asarray([2000, 2000, 2000, 2000, 2000])
BROAD_GLOBAL_SAMPLES = 3000

2. Cluster Selection and Medium Optimization

The highest-voltage points obtained during the broad search are grouped into distinct clusters. This prevents the optimization from focusing on multiple points belonging to the same coupling region.

BROAD_TOP_N_FOR_CLUSTERING = 30
N_CLUSTERS = 5
CLUSTER_DISTANCE_STEPS = 1000

Each cluster is then independently optimized using the same Bayesian Optimization and local correction strategy employed during drift correction, but within a larger local search region.

MEDIUM_RANGE = np.asarray([500, 500, 500, 500, 500])

3. Fine Optimization

The best-performing medium-search result is selected and refined further within a smaller search region to maximize the final coupling efficiency.

FINE_RANGE = np.asarray([200, 200, 200, 200, 200])

The final output of this stage is the estimated optimal actuator configuration together with the corresponding measured coupling signal.

Configuration Parameters

The following parameters can be modified in configuration.py:

Parameter Description
STS_IDS IDs of the servo motors used by the system
PICOSCOPE_RANGE Voltage range configured for the PicoScope
M_LOOP_ITERATIONS Number of M-LOOP optimization iterations

Example:

STS_IDS = [1, 2, 3, 4, 5]
M_LOOP_ITERATIONS = 3000
PICOSCOPE_RANGE = "PS2000_10V"

Results

The system has been successfully used for automated fiber coupling and drift correction in a laboratory optical setup. Performance depends on the selected optimization parameters and initial alignment conditions.


Author

Santiago Sangro Cid


License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages