I have a signal I'm getting from a sensor (shown below in the photo of an excel plot) and I need to process it to get it to look something like the red line I've overdrawn on it. Sort of a moving average type process that doesn't fall too quickly unless the overall signal is actually falling.

Anyone have any ideas as to what the best method(algo) would be to approach this problem?

Any suggestions on directions I could look towards would be helpful as well, it's been years since I took signal processing in school and I don't remember what methods are even out there that could be tried.

Thanks!

Jonathan

![Signal from sensor](https://i.stack.imgur.com/AzJtR.png)