Docsity

Numerical Oscillations in Power Systems: Elimination Techniques, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE524
Transients in Power Systems
Session 41; Page 1/18
Spring 2008
Numerical Oscillations in EMTP-Like Programs
1 Causes of Numerical Oscillations
The Electromagnetic transients program and its variants all use the the “trapezoidal rule” numer-
ical integration method. The trapezoidal rule is a second order numerical integration technique
that is simple to implement, astable (numerically stable in “stiff” systems), and fast. However, it
is also susceptible to numerical oscillations when differentiating step changes in voltage or current.
The program user should be aware of the potential for these oscillations when simulating circuits
and systems using EMTP.
The most common events leading to numerical oscillations are a step change in current through
and inductor or a step change in voltage across a capacitor. The cause if this problem can be seen
by looking at the differential equations for the inductor and the capacitor.
Inductor V oltage v =Ldi
dt (1)
Capacitor Current i =Cdv
dt (2)
One can think of the numerical oscillations as resulting from forcing an infinite di/dt across and
inductor or an infinite dv/dt on a capacitor. One possible solution is to produce a more accurate
circuit model by including parasitic capacitances internal resistances in a capacitor.
1.1 Mathematical Representation
The problem can be represented by modeling the equation
x=dy
dt (3)
using the trapezoidal rule. We can integrate both sides of the equation, resulting in the following:
y(t)=t
t−∆txdt +y(t−∆t)(4)
Next we rewrite the equation using the trapezoidal rule. Remember, we are finding an approxi-
mation of the area of the trapezoid bounded by x,tand t−∆t.
y(t)=y(t−∆t)+∆t
2(x(t)+x(t−∆t)) (5)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Numerical Oscillations in Power Systems: Elimination Techniques and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Transients in Power Systems Spring 2008

Numerical Oscillations in EMTP-Like Programs

1 Causes of Numerical Oscillations

The Electromagnetic transients program and its variants all use the the “trapezoidal rule” numer- ical integration method. The trapezoidal rule is a second order numerical integration technique that is simple to implement, astable (numerically stable in “stiff” systems), and fast. However, it is also susceptible to numerical oscillations when differentiating step changes in voltage or current. The program user should be aware of the potential for these oscillations when simulating circuits and systems using EMTP. The most common events leading to numerical oscillations are a step change in current through and inductor or a step change in voltage across a capacitor. The cause if this problem can be seen by looking at the differential equations for the inductor and the capacitor.

Inductor V oltage v = L

di dt

Capacitor Current i = C

dv dt

One can think of the numerical oscillations as resulting from forcing an infinite di/dt across and inductor or an infinite dv/dt on a capacitor. One possible solution is to produce a more accurate circuit model by including parasitic capacitances internal resistances in a capacitor.

1.1 Mathematical Representation

The problem can be represented by modeling the equation

x =

dy dt

using the trapezoidal rule. We can integrate both sides of the equation, resulting in the following:

y(t) =

∫ (^) t

t−∆t

xdt + y(t − ∆t) (4)

Next we rewrite the equation using the trapezoidal rule. Remember, we are finding an approxi- mation of the area of the trapezoid bounded by x, t and t − ∆t.

y(t) = y(t − ∆t) +

∆t 2

(x(t) + x(t − ∆t)) (5)

Transients in Power Systems Spring 2008

Now we can solve this equation for x(t), which could be either the current through a capacitor or the voltage across an inductor.

x(t) = −x(t − ∆t) +

∆t

(y(t) − y(t − ∆t)) (6)

Start out with x(t − ∆t) = 0. We will now have y undergo a step change from y(t − ∆t) = 0 to y(t) = 1.0. The function will stay at 1.0 for the rest of the time period of interest. We would expect y(t) and x(t) to behave as shown in Figure 1. Note that we would expect x(t) to be an impulse (Dirac Delta Function) at at t = t and zero everywhere else.

t- ∆t

t+ ∆t

t- t t+ ∆t

t

y(t)

Time

Time

x(t)

t

Figure 1: Plots showing y(t) and expected x(t) for example case.

Plug the know values into the equation for x(t), resulting in:

x(t) =

∆t

Now step ahead and find x(t + ∆t):

x(t + ∆t) = −

∆t

∆t

∆t

If we continue ahead another time step, we find that

x(t + 2∆t) =

∆t

Transients in Power Systems Spring 2008

x(t + 3∆t) = 0. 0 (13)

Figure 3 shows y(t) and x(t). Notice that we see more of an impulse response. This behavior suggests that reducing the time step may in some cases reduce the problems with numerical oscillations. However, oscillations caused by switch operations will not be reduced by making a smaller time step since the ideal switch will always change in one time step.

t- ∆t

t+ ∆t

t- t t+ ∆t

t

y(t)

Time

Time

x(t) t

Figure 3: Plots of y(t) and x(t) with slower rise time

1.2 Examples

1.2.1 Inductor Current

The first example is a single phase system with a 10 kV (peak) voltage source supplying a 25 Ohm resistor through an inductance of 20 mH. A switch connected between the L and the R opens at 1 msec. into the simulation, resulting in the voltage oscillations shown in Figure 4. The first plot shows the node voltage on the switch pole. The second plot zooms in on the voltage, showing the numerical oscillations. The third plot shows the switch current. Notice that it goes to zero and stays at zero. The EMTP data file is provided below.

Transients in Power Systems Spring 2008

−2 0 0.005 0.01 0.015 0.02 0.025 0.

0

2 x 10

4

V_bus1 (V)

5 5.5 6 6.5 7 7. x 10−

−

0

2 x 10

4

V_bus1 (V)

0 0.005 0.01 0.015 0.02 0.025 0. 0

200

400

time (sec)

I_L (A)

Figure 4: Example with switch in series with inductor

BEGIN NEW DATA CASE C EMTP Datacase showing numerical oscillations resulting from opening C a switch in series with an inductor. C ........................... Miscellaneous data .............................. C DeltaT<---TMax<---XOpt<---COpt<-Epsiln<-TolMat<-TStart 5.E-5 0. C --IOut<--IPlot<-IDoubl<-KSSOut<-MaxOut<---IPun<-MemSav<---ICat<-NEnerg<-IPrSup 11 1 1 C ........................... Circuit data ................................... C Bus1->Bus2->Bus3->Bus4-><----R<----L<----C GEN1 BUS1 20. 1 BUS2 25. BLANK ends circuit data C C ........................... Switch data .................................... C Bus-->Bus--><---Tclose<----Topen<-------Ie O BUS1 BUS2 -1. 1.E- BLANK ends switch data C C ...........................Source data ...................................... C Bus--><I<Amplitude<Frequency<--T0|Phi0<---0=Phi0 <----Tstart<----Tstop 14GEN1 10.000E3 60. 0. -1. 111. BLANK ends source data C C ........................... Output Request Data ............................ C Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus--> BUS1 BUS2 GEN BLANK ends output requests BLANK ends plot request BLANK ends all cases

Transients in Power Systems Spring 2008

VA1 VA2 12.33167. VA1 1.1 1 VA2 1.1 1 BLANK ends circuit data C C ........................... Switch data .................................... C Close switches after 1 cycle C Bus-->Bus--><---Tclose<----Topen<-------Ie O VA VA1 16.667E-3 999. 1 BLANK ends switch data C C ...........................Source data ...................................... C 132 kV l-l source C Bus--><I<Amplitude<Frequency<--T0|Phi0<---0=Phi0 <----Tstart<----Tstop 14VA 107.7807E3 60. 0. -1. 999. BLANK ends source data C C ........................... Output Request Data ............................ C Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus--> VA1 VA BLANK ends output requests BLANK ends plot request BLANK ends all cases

2 Options to Eliminate Numerical Oscillations

2.1 Adding Circuit Elements

The numerical oscillations can be viewed as arising due to inadequate detail in the system model. For example, oscillations arising from a switch opening in series with an inductor would actually have an arc impedance. However, arc impedance modeling is fairly complex. Another option is include parasitic capacitance as shown in Figure 6. Instead of numerical oscillations the circuit will possible see LC oscillations that would occur in practice. Similarly, the change in voltage across a capacitor is missing the effective series resistance of the capacitor and other loss terms as shown below when damping is added. The inductor current example shown earlier was modified to include a parasitic capacitance of 100 nF connected from the inductor side of the switch to ground. In addition, the series resistance of the inductor was added. The datafile is shown below. When the circuit was simulated with EMTP as shown in Figure 7, oscillations still occur, except this time they are now due to the LC resonance. The first plot shows the voltage oscillations. The second plot zooms in to show that these oscillations are now sinusoidal. The third plot shows the inductor current, which now has a small sinusoidal oscillation as well. Since the circuit has a very small resistance, these oscillations die slowly.

Transients in Power Systems Spring 2008

i(t)

i(t)

Figure 6: Switch in series with an inductor with and without parasitic capacitance.

−2 0 0.005 0.01 0.015 0.02 0.025 0.

0

2 x 10

4

V_bus1 (V)

5 5.5 6 6.5 7 7. x 10−

−

−

0

V_bus1 (V)

0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.

0

20

40

Time (sec)

I_L (A)

Figure 7: Simulation with parasitic capacitance added

Transients in Power Systems Spring 2008

i(t)

i(t)

Figure 8: Snubber Options

circuit provides a bypass path for the switch, the numerical oscillations are avoided, and a more accurate model of the power electronic circuit is used. However, some circuit topologies done need snubbers (diode rectifiers for example). In addi- tion, switches with large safe operating areas (SOA) such as IGBT’s and MOSFET’s don’t need snubbers. In this cases the program user can add numerical snubbers. These numerical snubbers can also be added for conventional switches as well, although they have less of a basis in reality. If a capacitor alone is used, a capacitance value of roughly 1-2 nF will suffice. If a RC snubber is used as shown in Figure 8, the time constant for the RC snubber must still be greater than the simulation time step to avoid problems. The resistance value should be chosen so the RC time constant is a minimum of 2-3 times the simulation time step ∆t. Performance of the RC snubber will vary with the circuit, and the user may need to vary R and C values for best performance. The inductor current example from earlier was simulated with a RC snubber across the switch, as shown in Figure 9. The first plot shows the resulting voltage. Notice that there are no oscillations. The second plot zooms in on the voltage waveform. Note that the voltage sees a decaying exponential from overdamped RLC response. The third plot shows the snubber current. Notice also that the time step used in the datafile below is smaller to capture the LC resonance.

BEGIN NEW DATA CASE C EMTP Datacase showing numerical oscillations resulting from opening C a switch in series with an inductor. C C Add a snubber across the switch C C C ........................... Miscellaneous data .............................. C DeltaT<---TMax<---XOpt<---COpt<-Epsiln<-TolMat<-TStart 4.E-6 0. C --IOut<--IPlot<-IDoubl<-KSSOut<-MaxOut<---IPun<-MemSav<---ICat<-NEnerg<-IPrSup 11 1 1

Transients in Power Systems Spring 2008

−1 0 0.005 0.01 0.015 0.02 0.025 0.

0

1 x 10 4

V_bus1 (V)

4.8 4.85 4.9 4.95 5 5.05 5.1 5. x 10−

−

−

0

V_bus1 (V)

4.8 4.85 4.9 4.95 5 5.05 5.1 5. x 10−

0

1

2

Time (sec)

I_snubber (A)

Figure 9: Inductor current example with snubber added

C C ........................... Circuit data ................................... C Bus1->Bus2->Bus3->Bus4-><----R<----L<----C GEN1 BUS1 20. 1 BUS2 25. C Snubber circuit (RC = 3*DELTAT) GEN1 BUS1 1500. 0.10 1 BLANK ends circuit data C C ........................... Switch data .................................... C Bus-->Bus--><---Tclose<----Topen<-------Ie O BUS1 BUS2 -1. 1.E- BLANK ends switch data C C ...........................Source data ...................................... C Bus--><I<Amplitude<Frequency<--T0|Phi0<---0=Phi0 <----Tstart<----Tstop 14GEN1 10.000E3 60. 0. -1. 111. BLANK ends source data C C ........................... Output Request Data ............................ C Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus--> BUS1 BUS2 GEN BLANK ends output requests BLANK ends plot request BEGIN NEW DATA CASE BLANK ends all cases

2.3 Reducing the Time-step

In some cases, reducing the simulation time step can also eliminate numerical oscillations. How- ever, this is not a general purpose solution. It depends on the presence of resistances in the circuit, preferably in parallel with inductances or in series with the capacitances. In many cases the required time step is also far too small for practical simulation. Also, since the amplitude of the oscillation varies with 1/∆t, the smaller time step may also make the oscillations larger.

Transients in Power Systems Spring 2008

A similar development can be performed for the capacitor. In this case the resistance is connected in series with the capacitor as shown in Figure 11. The step change in voltage is first dropped across the resistor and the voltage on the capacitor changes through a series RC circuit response. Similar to the RL case, an RC time constant of 6.667∆t results in a good trade-off between accuracy and damping performance. This results in choosing R = 6 .667∆ C t. However, this makes the Resistor large enough to have a significant impact on the circuit. Choose a smaller number, in the 0.1 to 0.2 range is a compromise.

R d

Figure 11: Capacitor with Damping Resistor

ATPDraw implements this option as well. The capacitor dialog box has an entry for Ks, where:

Rd =

Ks∆t 2 C

ATPDraw recommends a value of about Ks = 0 .15, the ratio suggested above would ahve Ks = 13 .3333. Again, it is a trade off between damping and impact on the circuit. It would be smarter to configure the circuit to prevent this circumstance by always having an impedance between an ideal source and a capacitor if you have a switch between them as well. Both the inductor and capacitor switching examples from earlier were repeated with a damping resistor added. Figure 12 shows the results for the inductive switching case. The first plot shows the resulting voltage. The second plot zooms in on transient. Notice that a few oscillations occur and are damped.

BEGIN NEW DATA CASE C EMTP Datacase showing numerical oscillations resulting from opening C a switch in series with an inductor. C C Now has a damping resistor in parallel with the inductor with C Rd = L/(0.15* DELTAT) C C ........................... Miscellaneous data .............................. C DeltaT<---TMax<---XOpt<---COpt<-Epsiln<-TolMat<-TStart 5.E-5 0. C --IOut<--IPlot<-IDoubl<-KSSOut<-MaxOut<---IPun<-MemSav<---ICat<-NEnerg<-IPrSup 11 1 1 C C ........................... Circuit data ................................... C Bus1->Bus2->Bus3->Bus4-><----R<----L<----C GEN1 BUS1 20. 1 GEN1 BUS1 2666.7 1 BUS2 25. BLANK ends circuit data

Transients in Power Systems Spring 2008

−1 0 0.005 0.01 0.015 0.02 0.025 0.

−0.

0

1 x 10

4

V_bus1 (V)

4.9 5 5.1 5.2 5.3 5.4 5. x 10−

−

−

−

0

time (sec)

V_bus1 (V)

Figure 12: Inductor switching case with damping resistor

C C ........................... Switch data .................................... C Bus-->Bus--><---Tclose<----Topen<-------Ie O BUS1 BUS2 -1. 1.E- BLANK ends switch data C C ...........................Source data ...................................... C Bus--><I<Amplitude<Frequency<--T0|Phi0<---0=Phi0 <----Tstart<----Tstop 14GEN1 10.000E3 60. 0. -1. 111. BLANK ends source data C C ........................... Output Request Data ............................ C Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus-->Bus--> BUS1 BUS2 GEN BLANK ends output requests BLANK ends plot request BEGIN NEW DATA CASE BLANK ends all cases

Figure 13 shows the results for the capacitor switching case. The first plot shows the resulting current. Notice that there is a significant initial overshoot overshoot as the damped numerical oscillation begins. However, it dies rapidly. The second plot zooms in on transient. Notice that essentially one oscillation occurs.

BEGIN NEW DATA CASE C EMTP Datafile showing numerical oscillations when changing the C voltage across a capacitor.

Transients in Power Systems Spring 2008

−500 0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.

0

500

1000

1500

2000

I_cap (A)

−20000.0166 0.0167 0.0167 0.0168 0.0168 0.0168 0.0169 0.017 0.

−

0

1000

2000

time (sec)

I_cap (A)

Figure 13: Capacitor switching case with damping resistor

The user invokes this by typing the keyword “CDA” immediately after the “BEGIN NEW DATACASE” statement. Where “CDA” stands for Critical Damping Adjustment. Remember, this is only available in the DCG EPRI version of EMTP. The case discussed earlier will now be re-done using the critical damping adjustment. Again, start with:

x =

dy dt

And then integrate both sides of the equation, resulting in the following:

y(t +

∆t 2

∫ (^) t+ ∆t 2 t

xdt + y(t) (19)

Next we rewrite the integral equation using the backward Euler, and a time step of 1/2 ∆t as is used for the CDA method.

y(t +

∆t 2

) = y(t) +

∆t 2

[ x(t +

∆t 2

] (20)

Solve this equation for x(t + ∆ 2 t ), which could be either the current through a capacitor or the voltage across an inductor.

Transients in Power Systems Spring 2008

x(t +

∆t 2

∆t

[ y(t +

∆t 2

) − y(t)

] (21)

Similarly, x(t + ∆t) can be written as:

x(t + ∆t) =

∆t

[ y(t + ∆t) − y(t +

∆t 2

] (22)

The trapezoidal rule integration resumes starting from this point and the intermediate step is not used. Start out with x(t) = 0. We will now have y undergo a step change from y(t) = 0 to y(t+ ∆ 2 t ) = 1 .0 and then y(t) stays at 1.0.

y(t) = 0. 0 x(t) = 0. 0

y(t +

∆t 2

x(t +

∆t 2

∆t 2

∆t 2 y(t + ∆t) = 1. 0

x(t + ∆t) =

∆t 2

The capacitor example from earlier was run using the DCG-EMTP using CDA, resulting in the smooth transition shown in Figure 14. The datafile is shown as well.

BEGIN NEW DATA CASE CDA C EMTP Datafile showing numerical oscillations when changing the C voltage across a capacitor. C C ........................... Miscellaneous data .............................. C DeltaT<---TMax<---XOpt<---COpt<-Epsiln<-TolMat<-TStart 1.0E-5 0. C --IOut<--IPlot<-IDoubl<-KSSOut<-MaxOut<---IPun<-MemSav<---ICat<-NEnerg<-IPrSup 111 1 1 C C ........................... Circuit data ................................... C Bus1->Bus2->Bus3->Bus4-><----R<----L<----C VA1 VA2 12.33167. VA1 1.1 1 VA2 1.1 1 BLANK ends circuit data C C ........................... Switch data .................................... C Close switches after 1 cycle C Bus-->Bus--><---Tclose<----Topen<-------Ie O