Skip to content

TWANG006/pvt-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pvt-scheduler

High-performance optical fabrication simulation based on the Position-Velocity-Time (PVT) motion control model.

Introduction

This repository provides a PVT-based, fast velocity scheduler and simulator for the control of stages in optical fabrication. The core modules are listed as follows. PVT describes the motion as 3rd order polynomials as $$a_{i}t_{i-1}^3+b_{i}t_{i-1}^2+c_{i}t_{i-1}+d_{i}=p_{i-1}$$ $$a_{i}t_{i}^3+b_{i}t_{i}^2+c_{i}t_{i}+d_{i}=p_{i}~~~~~~~~~~~~~$$ $$3a_{i}t_{i-1}^2+2b_{i}t_{i-1}+c_{i}=v_{i-1}~~~~~~~~~~$$ $$3a_{i}t_{i}^2+2b_{i}t_{i}+c_{i}=v_{i}~~~~~~~~~~~~~~~~~~~~$$ where $a_{i}$, $b_{i}$, $c_{i}$, $d_{i}$ are the polynomial coefficients, $p_{i}$, $v_{i}$ are positions and velocities at the $i$-th point. In optical fabrication, we always know the Time and Positions and need to calculate the Velocities. This is solved under the PVT framework in this repository.

Examples

Position mode (dwell time-based simulation)

Position-mode result

PVT mode (PVT-based simulation)

PVT-mode result

MATLAB module

MATLAB module is provided as a fast simulator when the problem size is small. It is easy to use and the simulation animation can be saved as a video. But this takes unreasonablly long time as the problem size grows.

C++ module

C++ module is necessary if the number of dwell points is large and the demanded simulation grid is dense. It relies on paralle computing and high-performance math libraries.

  • pvtengine: the implementation of the PVT-based scheduler and simulator algorithms
    • Scheduler: given $p_{i}$ and $t_{i}$, calculate $v_{i}$ and $a_{i}$, $b_{i}$, $c_{i}$, $d_{i}$ via optimization.
    • Sampler: re-sample the scheduled PVTs to prepare for more precise material removal estimation.
    • Simulator: given a Tool Influence Function (TIF) and the scheduled PVT, simulate the material removal process.
  • unittest: test the engine using Google test.
  • pvtapp: a UI application provided to show the animation of the simulation in real time.

Dependencies

  1. Intel Math Kernel Library (MKL): using BLAS and LAPACK rountines optimized on Intel processors. Eigen below is also using MKL.
  2. Eigen: for convenient matrix and vector manipulations.
  3. qpOASES: for the QP solver used in the velocity optimization. A Visual Studio 2022, dynamically linked version is also available at TWANG006/qpOASES.
  4. OSQP-CPP: an alternative QP solver to qpOASES that is a wrapper of the OSQP. The speed is faster than qpOASES. But both qpOASES and OSQP are less accurate and slower than MATLAB's QP solver. So if you have MATLAB, you can make a shared MATLAB session by matlab.engine.shareEngine('engine_name') then use it in the given C++ PVT engine.
  5. ABSL: required by OSQP-CPP.
  6. HDF5: for I/O.
  7. QT6: for GUI, which is optional.
  8. QCustomPlot: for plotting and anmiation.

Compilation

  1. Windows + Visual Studio 2022: this is the default configuration that can be directly used, if the following 3rd-party libraries are downloaded and the system environmental variables are set.
  • $(EIGEN_DIR): e.g. D:\Codes\Source\3rds\eigen-3.4.0\, this can be downloaded from Eigen
  • $(MATLAB_ROOT): e.g. C:\Program Files\MATLAB\R2018a\
  • The following libraries can be directly download here, which have been compiled using Visual Studio 2022.
    • $(HDF5_DIR_64): e.g. D:\Codes\Source\3rds\HDF5\1.12.2\
    • $(ABSL_ROOT): e.g. D:\Codes\Source\3rds\absl\
    • $(QPOASES_DIR): e.g. D:\Codes\Source\3rds\qpOASES\
    • $(OSQP_CPP_ROOT): e.g. D:\Codes\Source\3rds\osqp-cpp\
    • $(OSQP_ROOT): e.g. D:\Codes\Source\3rds\osqp\
  1. Mac OS: TODO with CMake
  2. Linux: TODO with CMake

Collaborators

huanglei0114
Lei HUANG
TWANG006
Tianyi Wang
XLKE666
Xiaolong Ke
GHVipender
GHVipender

References

[1] Tianyi Wang, Xiaolong Ke, Lei Huang, Vipender Negi, Heejoo Choi, Weslin Pullen, Daewook Kim, Yi Zhu, Mourad Idir, "Computer-controlled finishing with a novel position-velocity-time modulated velocity scheduler", (2022), Journal of Manufacturing Processes, peer review.

[2] Zhou, L., Xie, X., Dai, Y., Jiao, C., & Li, S. (2009). Realization of velocity mode in flat optics machining using ion beam. J. Mech. Eng, 45(7), 152-156.

Releases

No releases published

Packages

No packages published

Languages