Configurable MU for CommonMath
@lukelowry is already working on this.
Since Jul 22, 2026.
- Dominant language
- C++
- Stars
- 27
- Forks
- 11
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 23
Description
Summary
The $\mu$ parameter, which represents the sharpness of the piecewise approximants, needs to be configurable per-component/caller instead of a static value.
Rationale
There is an edge case I had not considered before:
A smoothed band pass window in state space, $f(x; w, \mu)=\sigma(x;\mu)-\sigma(x-w;\mu)$ , has a width $w$. When the width shrinks to scales below $w<\dfrac{5}{\mu}$, the smooth approximation begin to fail as a piecewise indicator.
While validating individual governor models I observed the effects of this when the limits $[V^{\min}, V^{\max}]$ become very tight $w=V^{\max}-V^{\min}$.
Description
In the motivating example above, I need to be able to set $\mu$ and pass it as an argument to functions such as antiwindup or inside in CommonMath. A global $\mu$ is not preferred because one model could have subsystems with varying constraints on $\mu$!
Additional information
I temporary solution could be to raise $\mu$ to a larger value, but since that impacts the whole system it hurts performance especially on large cases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.