Often when I'm designing interactive installations of some kind, I run into this problem, which I still haven't found a solution for, while I'm sure it's pretty simple.
Imagine the user having a control, for example the slider in the attached patch (could be a accelerometer that is shaken, for example). Whenever the user puts energy into this system, I want the signal to cumulatively build up. The problem is that, when one moves the slider back, one always gets a decrease in energy (which is logical). Every movement should make the system build up energy cumulatively, and only doing nothing should enable it to slowly go back to zero "energy".