Giter Site home page Giter Site logo

twang006 / pvt-scheduler Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 376.44 MB

PVT-based velocity scheduler for optical finishing.

License: GNU General Public License v3.0

MATLAB 0.88% M 0.05% C 0.02% C++ 99.05%
ion-beam-figuring optical-fabrication correction-finishing ccos

pvt-scheduler's Introduction

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.

pvt-scheduler's People

Contributors

twang006 avatar xlke666 avatar github-actions[bot] avatar

Stargazers

 avatar Yufan Liu avatar  avatar

Watchers

Lei HUANG avatar  avatar

Forkers

yliu2-19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.