Use `pinv()` to compute base acceleration

Use `pinv()` to compute base acceleration instead of `inv()` in order to
avoid Singular matrix error.