I'm working on an overcurrent protection circuit with a current shunt, amplifier, RC filter, and comparator that will be used for power connectors supplying a load. The challenge is that this OCP circuit must not trip under normal loading conditions which includes high transients.
I’m trying to figure out how to design the RC filter so the comparator will never trip under the permitted transients. I think I might have figured it out but I’m not completely confident my solution can be guaranteed to hold in all scenarios.
In short, the connector load only has to stay within its maximum sustained current/power limit (40A) measured with a 1 second moving average. It can draw much more than the sustained limit for shorter moving average intervals, up to an instantaneous maximum of 3x the sustained limit (120A).
For example, it can pull 40A (1x) with a 1 second moving average, 80A (2x) with a 10ms moving average, and 120A (3x) with a 100us moving average, according to the chart below. The load must stay within these limits concurrently for all moving average time intervals. (This is all dictated by an industry standard.)

Proposed circuit:

(Current sense amplifier output goes through RC filter and then comparator. Comparator threshold would be set to 1.5x sustained limit (60A equivalent signal level)
Of course, an RC filter is going to have a different response than a moving average filter. However, I think it should be possible to have an RC filter that is sufficiently slow that it will always be more lenient that the 1 second moving average constraint the load will stay within.

(1 second moving average vs 1M+650nF RC in LTSpice)
I think, in theory, as long as the filter attenuates more at all frequencies than the moving average limit of the load, the current sense signal will be attenuated enough so that the comparator doesn’t trip under allowed transients. However, the moving average filter frequency response is going to have dips of infinite attenuation at multiples of the averaging window period. Theoretically if the load transient current was a 1Hz sine wave, it would average out to be perfectly flat at zero, but the RC filtered output could be higher and cause a false overcurrent trip.
I think this might be manageable because I’m setting the comparator threshold at 1.5x the permitted sustained level. Since the load is limited to an instantaneous maximum of 3x nominal, as long as the filter is attenuating by 20log(2/0.5) = 12.48db (2 and 0.5 are 3x and 1.5x transient amplitudes relative to a DC value of 1) by the first moving average “dip” at 1Hz, it won’t matter what the load does since the signal will be attenuated below the comparator threshold.
Simulating in the time-domain, this seems correct. Even in a worst-case scenario of a 3x transient sine load around 1x nominal (technically impossible due to negative values, and would violate some of the limits at other averaging windows), it is still attenuated to below the 1.5x comparator threshold.

So I think this solution works? Does this seem correct?
The more I think about having a continuous spectrum of moving average intervals with different amplitude thresholds, and try to figure what that would look like in the frequency-domain, the more confused I get.

I’ve plotted the frequency response of a few of the moving average windows and then applied gain to reflect the higher levels permitted for the shorter averaging windows, but I have no idea what this means, if it means anything.
If these are the limits of the load, shouldn’t the amplitude actually be higher at higher frequencies? What about the moving average limits longer than 1 second, won’t those roll off even sooner and pose even stricter limits? How can you plot the frequency domain limit of something that must be concurrently compliant with an entire spectrum of moving average filters with varying time windows and thresholds?