Soft Clamping Functions
📐 Definition
Section titled “📐 Definition”For bounds , slope parameter , and center , define
Domain and Codomain
Section titled “Domain and Codomain”For real inputs, , with as and as .
⚙️ Key Properties
Section titled “⚙️ Key Properties”Monotone and ; derivative
peaks at . Limits: , .
🎯 Special Cases and Limits
Section titled “🎯 Special Cases and Limits”- approaches a hard clamp centered at .
- , , reduces to the logistic sigmoid .
🔗 Related Functions
Section titled “🔗 Related Functions”Hyperbolic tangent provides a symmetric clamp to ; smooth saturation functions generalize bounded responses with alternative profiles.
Usage in Oakfield
Section titled “Usage in Oakfield”Oakfield uses soft clamping primarily in the thermostat/regulation path:
- Thermostat operator supports smooth min/max limiting of its regulated parameters via a softplus-style clamp (controlled by
softplus_k), avoiding hard discontinuities when enforcing bounds. - Other parts of the engine also provide hard clamps (e.g. continuity clamp ranges), but the explicit “soft clamp” behavior is concentrated in the thermostat’s smooth clamp logic.
Historical Foundations
Section titled “Historical Foundations”📜 Logistic Transitions
Section titled “📜 Logistic Transitions”Logistic-style transitions provide smooth approximations to step functions and clamps, enabling bounded mappings with controllable transition sharpness.
🌍 Modern Perspective
Section titled “🌍 Modern Perspective”Soft clamps are standard tools when boundedness is required but differentiability must be preserved for gradient-based methods.
📚 References
Section titled “📚 References”- Boyd & Vandenberghe, Convex Optimization
- NIST Digital Library of Mathematical Functions (DLMF), §4