inverse time relay

Hi Folks

I am wanting to implement in inverse time over current relay in a microcontroller for electrical system protection.

I know the formulas for calculate the appropriate time delay but I'm wondering about how to evaluate the function if the current is changing continuously. I assume I'd need to keep a running average of the time equation?

Anyone have any tips or algorithms that might be helpful?

Thanks

Reply to
EnigmaPaul
Loading thread data ...

dspguide.com has a nice chapter on running average (and other filters).

Bye Jack

--
Yoda of Borg am I! Assimilated shall you be! Futile resistance is, hmm?
Reply to
Jack

If this is what it sounds like (I've never heard of it before) you shouldn't need a precise running average, but instead can use a simple digital filter, equivalent to an RC circuit. The algorithm is something like

new_x = old_x * rc_constant + instantaneous_current

updated at some regular interval from a clock interrupt or the like.

Trip the relay if new_x goes above a certain threshold. Choose the rc_constant (a number slightly less than 1) so that the exponential decay time gives the interval that you want.

Reply to
Paul Rubin

Your "rc_constant" variable isn't really analogous to an RC time constant

-- it's the pole of the difference equation in the z domain, but unless you know what that means the information isn't of much use.

Something that'll work much better is

new_x = old_x + some_gain * (instantaneous_current - old_x);

As long as some_gain is less than about 1/10, the real, honest-to-gosh time constant of this will be close to

tc = sampling_interval / some_gain

-- closer the lower that some_gain is.

If you use exactly the difference equation I give, then 'new_x' will be equal to the average current -- the equation that Paul gives will have a gain that depends on the 'rc_constant', which means that as you change 'rc_constant' you'll need to change the threshold.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

Un bel giorno EnigmaPaul digitò:

It also depends on what you are protecting. If it is something that breaks for Joule effect, the best way would be to convert your I(t) curve into a I²t(t) curve, then integrate the I² value over time and trip when it reaches its limit, i.e. if calculated_I²t(t) > I²t(t) for any value of t, then trip.

There are also several sub-optimal algorithms. The easiest one is to consider the entire overcurrent event as if it had a constant value equal to the last value: you start a timer when the current goes past the "minimum" trip value, then you check if last_I(t) > I(t) for any value of t.

--
Fletto i muscoli e sono nel vuoto.
Reply to
dalai lamah

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.