Skip to content

Configurable MU for CommonMath #504

Description

@lukelowry

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions