Python proof of concept for GBD-PCG.
Solves for x in Ax = b, using the Preconditioned Conjugate Gradient algorithm. It requires A to be a positive semi-definite matrix to guarantee good results.
Only python and numpy are required
You can look at test.py
for an example:
from PCG import PCG
options = {'preconditioner_type' : 'SS'}
pcg = PCG(A, b, nx, n_blocks, options = options)
x_pcg = pcg.solve()
This provides the following preconditoners
- Identity: "0"
- Jacobi (Diagonal): "J"
- Block Jacobi (Block-diagonal): "BJ"
- Symmetric Stair: "SS"
While (1) and (2) only require the matrix A, (3) and (4) additional require the block_size (nx) to be passed in.
To cite this work in your research, please use the following bibtex:
@misc{adabag2023mpcgpu,
title={MPCGPU: Real-Time Nonlinear Model Predictive Control through Preconditioned Conjugate Gradient on the GPU},
author={Emre Adabag and Miloni Atal and William Gerard and Brian Plancher},
year={2023},
eprint={2309.08079},
archivePrefix={arXiv},
primaryClass={cs.RO}
}