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
Didn't find your answer? Ask the community — no account required.
J
Jack
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?
P
Paul Rubin
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
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.
T
Tim Wescott
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.
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
http://www.wescottdesign.com
D
dalai lamah
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.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.