You are on page 1of 15

Digital Control of Power Electronic And Drives Systems Unit I

Contents: Review of numerical methods, Application of numerical methods to solve


transients in D.C, Switched R, L, RL, R-C and R-L-C circuits. Extension to AC circuits.

1.1 Review of Numerical Methods

Numerical methods for ordinary differential equations are methods used to find
numerical approximations to the solutions of ordinary differential equations (ODEs).
Many differential equations cannot be solved using symbolic computation
("analysis"). For practical purposes, however – such as in engineering – a numeric
approximation to the solution is often sufficient. The algorithms studied here can be
used to compute such an approximation.

A first-order differential equation is an Initial value problem of the form,

where f is a function that maps [t0,∞) × Rd to Rd, and the initial condition y0 ∈ Rd
is a given vector. First-order means that only the first derivative of y appears in the
equation, and higher derivatives are absent. Without loss of generality to higher-
order systems, we restrict ourselves to first-order differential equations, because a
higher-order ODE can be converted into a larger system of first-order equations by
introducing extra variables. For example, the second-order equation y'' = −y can
be rewritten as two first-order equations: y' = z and z' = −y.

1.1.1 Euler method

From any point on a curve, you can find an approximation of a nearby point on the
curve by moving a short distance along a line tangent to the curve. Starting with
the differential equation (1), we replace the derivative y' by the finite difference
approximation

which when re-arranged yields the following formula

and using (1) gives:

This formula is usually applied in the following way. We choose a step size h, and
we construct the sequence t0, t1 = t0 + h, t2 = t0 + 2h, … We denote by yn a
numerical estimate of the exact solution y(tn). Motivated by (3), we compute these
estimates by the following recursive scheme

This is the Euler method.

www.ravivarmans.com Page 1 of 15
Digital Control of Power Electronic And Drives Systems Unit I

1.1.2 Heun’s method

In mathematics and computational science, Heun's method may refer to the


improved or modified Euler's method, or a similar two-stage Runge–Kutta method.
It is named after Karl Heun and is a numerical procedure for solving ordinary
differential equations (ODEs) with a given initial value. The procedure for calculating
the numerical solution to the initial value problem via the improved Euler's method
is:

by way of Heun's method, is to first calculate the intermediate yi 1 value and then
the final approximation yi 1 at the next integration point.

where h is the step size and ti 1  ti  h .

1.1.3 Runge-Kutta Method (First order ODE)

Let an initial value problem be specified as follows:

Here y is an unknown function (scalar or vector) of time t, which we would like to


approximate; we are told that ẏ, the rate at which y changes, is a function of t and
of y itself. At the initial time t0 the corresponding y value is y0. The function f and
the data t0, y0 are given.
Now pick a step-size h > 0 and define

for n = 0, 1, 2, 3, ..., using

1
Finally calculate, k  k1  2k2  2k3  k4 
6
Which gives approximate value of y as
y1 = y0 + k

Here yn+1 is the RK4 approximation of y(tn+1), and the next value (yn+1) is
determined by the present value (yn) plus the weighted average of four increments,
www.ravivarmans.com Page 2 of 15
Digital Control of Power Electronic And Drives Systems Unit I

where each increment is the product of the size of the interval, h, and an estimated
slope specified by function f on the right-hand side of the differential equation.

 k1 is the increment based on the slope at the beginning of the interval, using y
(Euler's method);
 k2 is the increment based on the slope at the midpoint of the interval, using y
and k1;
 k3 is again the increment based on the slope at the midpoint, but now using y
and k2;
 k4 is the increment based on the slope at the end of the interval, using y and k3.

The RK4 method is a fourth-order method, meaning that the local truncation error
is on the order of O(h5), while the total accumulated error is on the order of O(h4).
In many practical applications the function f is independent of y (so called
autonomous system, or time-invariant system), and their increments are not
computed at all and not passed to function f, with only the final formula for tn+1
used.

1.1.4 Runge-Kutta Method (Second order ODE)


Let the second order differential equation be

The problem reduces to solving the simultaneous equations

Starting at (x0, y0, z0) and taking the step-sizes for x, y, z to be h, k, l respectively,
and the Runge-Kutta method gives

www.ravivarmans.com Page 3 of 15
Digital Control of Power Electronic And Drives Systems Unit I

Example
Find the first three approximations y1, y2, y3 using Euler’s method for the initial
value problem. y′ = 1+y, y(0) = 1, starting at x0 = 0 with h = 0.1.
Solution:
ƒ(x, y) = 1 + y
We have the starting values x0 = 0 and y0 = 1. Next we determine the values of x
at which the Euler approximations will take place: x1 = x0 + h = 0.1,
x2 = x0 + 2h = 0.2, and x3 = x0 +3h = 0.3. Then we find
First: y1 = y0 + h ƒ(x0, y0)
= y0 + h (1 + y0) = 1 + (0.1) (1 + 1) = 1.2
Second: y2 = y1 + h ƒ(x1, y1)
= y1 + h (1 + y1) = 1.2 + (0.1) (1 + 1.2) = 1.42
Third: y3 = y2 +h ƒ(x2, y2)
= y2 + h (1 + y2) = 1.42 + (0.1) (1 + 1.42) = 1.662

The step-by-step process used in Example can be continued easily. Using equally
spaced values for the independent variable in the table for the numerical solution,
and generating n of them, set
x1 = x0 + h x2 = x1 + h ... xn = xn-1 + h.
Then calculate the approximations to the solution,
y1 = y0 + h ƒ(x0, y0)
y2 = y1 + h ƒ(x1, y1)
.
.
.
yn = yn-1 + h ƒ(xn-1, yn-1).
The number of steps n can be as large as we like.

Example
Function: y′=f(x,y) = y′=f(t,y) = 3x+y
Step size, h = 0.1
Initial condition, y(1) = 1
Calculate y(1.3) using Heun’s (improved Euler) method.
Solution:
The improved Euler method states that yn+1 = yn + (h/2) [f(xn,yn) + f(xn+1,ỹn+1)],
where ỹn+1 = yn + h⋅ f(xn,yn) and xn+1 = xn + h.
We have that h = 0.1, x0=1, y0=1, f(x,y)=3x+y
Step 1.
x1 = x0 + h = 1+0.1 = 1.1
ỹ1 = y0 + h⋅f(x0,y0) = 1 + h⋅f(1,1) = (1)+(0.1)⋅(4) = 1.4

www.ravivarmans.com Page 4 of 15
Digital Control of Power Electronic And Drives Systems Unit I

y1 = y0 + (h/2) [f(x0,y0) + f(x1,ỹ1)] = 1 + (h/2) [f(1,1) + f(1.1,1.4)]=


= 1 + (0.1/2) [4+(4.7)] = 1.435
Step 2.
x2 = x1 + h = 1.1 + 0.1 = 1.2
ỹ2 = y1 + h⋅f(x1,y1)=1.435 + h⋅f(1.1,1.435) = (1.435) + (0.1)⋅(4.735)=1.9085
y2 = y1 + (h/2) [f(x1,y1)+f(x2,ỹ2)] = 1.435 + (h/2) [f(1.1,1.435)+f(1.2,1.9085)]
= 1.435 + (0.1/2) [4.735+(5.5085)] = 1.947175
Step 3.
x3 = x2 + h = 1.2 + 1.1 = 1.3
ỹ3 = y2 + h⋅f(x2,y2) = 1.947175 + h⋅f(1.2,1.947175)
= (1.947175) + (0.1)⋅(5.547175)=2.5018925
y3 = y2 + (h/2) [f(x2,y2)+f(x3,ỹ3)]
= 1.947175 + (h/2) [f(65,1.947175) + f(1310,2.5018925)]
= 1.947175 + (0.1/2) [5.547175+(6.4018925)] = 2.544628375
Answer: y(1.3) = 2.544628375

Example
Using Runge-Kutta method solve y’’ = xy’2 – y2 for x = 0.2 correct to 4 decimal
places. Initial conditions are x = 0, y = 1, y’ = 0.
Solution
Given equation of second order is

www.ravivarmans.com Page 5 of 15
Digital Control of Power Electronic And Drives Systems Unit I

k4  hf1  x0  h, y0  k3 , z0  l3   0.2  0.1958  0.0392

l4  hf 2  x0  h, y0  k3 , z0  l3   0.2  0.9527   0.1905


1
k  k1  2k2  2k3  k4   0.0199
6
1
l   l1  2l2  2l3  l4   0.19
6
Hence at x = 0.2
y  y0  k  1  0.0199  0.9801
y  z  z0  l  0  0.1970  0.1970

1.2 Application of Numerical Methods to Solve Transients in DC Circuits

1.2.1 RL Circuit
Consider a first-order circuit containing only one inductor. The diagram in Figure
represents an electrical circuit whose total resistance is a constant R ohm and whose
self-inductance, shown as a coil, is L henry, also a constant. There is a switch whose
terminals can be closed to connect a constant electrical source of V volt.

By solving this equation, we can predict how the current will flow after the switch
is closed.

www.ravivarmans.com Page 6 of 15
Digital Control of Power Electronic And Drives Systems Unit I

The equation is a first-order linear differential equation for i as a function of t.


Consider a coil which has an inductance of 4H and a resistance of 24Ω is connected
together to form a RL series circuit. If they are connected to a 20V DC supply.
di  t  1 R
 V t   i t 
dt L L
di  t 
f  x, y   ; y  i t 
dt
20 24
f  x, y    y  5  6y
4 4
Assume zero initial conditions, i.e. y0 = 0 and step value = 0.1
By applying Euler’s method, the values of current are calculated and tabulated.

n x(n) y(n) f(x(n),y(n)) y(n+1)=y(n) + h*f(x(n),y(n))


0 0.0 0.0000000 5 0.5000000
1 0.1 0.5000000 2 0.7000000
2 0.2 0.7000000 0.8 0.7800000
3 0.3 0.7800000 0.32 0.8120000
4 0.4 0.8120000 0.128 0.8248000
5 0.5 0.8248000 0.0512 0.8299200
6 0.6 0.8299200 0.02048 0.8319680
7 0.7 0.8319680 0.008192 0.8327872
8 0.8 0.8327872 0.0032768 0.8331149
9 0.9 0.8331149 0.0013107 0.8332460
10 1.0 0.8332460 0.0005243 0.8332984
11 1.1 0.8332984 0.0002097 0.8333194
12 1.2 0.8333194 8.389E-05 0.8333277
13 1.3 0.8333277 3.355E-05 0.8333311
14 1.4 0.8333311 1.342E-05 0.8333324
15 1.5 0.8333324 5.369E-06 0.8333330
16 1.6 0.8333330 2.147E-06 0.8333332
17 1.7 0.8333332 8.59E-07 0.8333333
18 1.8 0.8333333 3.436E-07 0.8333333
19 1.9 0.8333333 1.374E-07 0.8333333
20 2.0 0.8333333 5.498E-08 0.8333333

The analytical solution of the inductor current in series RL circuit is

V  t 
R
20   t 
24
i  t    1  e   1  e 4   0.83333 1  e 6t 
L
R  24  

www.ravivarmans.com Page 7 of 15
Digital Control of Power Electronic And Drives Systems Unit I

The transient curves of the ODE solution and analytical solution is given below.

1.2.2 RC Circuit
Let us consider a simple series RC - circuit shown in figure is connected through a
switch ‘S’ to a constant voltage source V.

The switch ‘S’ is closed at time, t = 0. It is assumed that the capacitor is initially
not charged, vc(0) = 0 and the current flowing through the circuit at any instant of
time ‘t ’ after closing the switch is i(t).
The KVL equation around the loop can be written as

Assume C = 1F, R = 5Ω and the input voltage, V = 10V


d vc  t  V  vc  t  dvc  t 
 f  x, y   ; y  vc  t 
dt RC dt
10  y
f  x, y  
5
Assume zero initial conditions, i.e. y0 = 0 and step value = 2
By applying RK4 method, the values of vc(t) are calculated and tabulated.

www.ravivarmans.com Page 8 of 15
Digital Control of Power Electronic And Drives Systems Unit I

y(n+1) =
y(n)+(h/6)*(k1
n x(n) y(n) k1 k2 k3 k4
+ 2*k2 + 2*k3
+ k4)
0 0 0 2 1.6 1.68 1.328 3.296
1 2 3.296 1.3408 1.07264 1.126272 0.890291 5.5056384
2 4 5.505638 0.898872 0.719098 0.755053 0.596851 6.986979983
3 6 6.98698 0.602604 0.482083 0.506187 0.400129 7.980071381
4 8 7.980071 0.403986 0.323189 0.339348 0.268247 8.645839854
5 10 8.64584 0.270832 0.216666 0.227499 0.179832 9.092171038
6 12 9.092171 0.181566 0.145253 0.152515 0.12056 9.391391464
7 14 9.391391 0.121722 0.097377 0.102246 0.080823 9.591988837
8 16 9.591989 0.081602 0.065282 0.068546 0.054184 9.726469317
9 18 9.726469 0.054706 0.043765 0.045953 0.036325 9.81662503
10 20 9.816625 0.036675 0.02934 0.030807 0.024352 9.87706542
11 22 9.877065 0.024587 0.01967 0.020653 0.016326 9.917584658
12 24 9.917585 0.016483 0.013186 0.013846 0.010945 9.944748754
13 26 9.944749 0.01105 0.00884 0.009282 0.007337 9.962959565
14 28 9.96296 0.007408 0.005926 0.006223 0.004919 9.975168092
15 30 9.975168 0.004966 0.003973 0.004172 0.003298 9.983352689
16 32 9.983353 0.003329 0.002664 0.002797 0.002211 9.988839643
17 34 9.98884 0.002232 0.001786 0.001875 0.001482 9.992518097
18 36 9.992518 0.001496 0.001197 0.001257 0.000994 9.994984132
19 38 9.994984 0.001003 0.000803 0.000843 0.000666 9.996637362
20 40 9.996637 0.000673 0.000538 0.000565 0.000447 9.997745688

The analytical solution of the capacitor voltage in series RC circuit is


 1
t    t 
1

  10  1  e   10 1  e 

vc  t   V  1  e RC 5 0.2 t

   

www.ravivarmans.com Page 9 of 15
Digital Control of Power Electronic And Drives Systems Unit I

1.2.3 RLC Circuit


An RLC circuit (or LCR circuit) is an electrical circuit consisting of a resistor, an
inductor, and a capacitor, connected in series or in parallel. The circuit forms a
harmonic oscillator for current and will resonate in a similar way as an LC circuit
will. The main difference that the presence of the resistor makes is that any
oscillation induced in the circuit will die away over time if it is not kept going by a
source. This effect of the resistor is called damping. The presence of the resistance
also reduces the peak resonant frequency.
Consider a series RLC circuit as shown in figure, and it is excited with a dc voltage
source Vs. Applying KVL around the closed path for t >0 ,

The current through the capacitor can be written as

Substituting the current, i(t) expression in loop equation and rearranging the terms,

The above equation is a 2nd-order linear differential equation and the parameters
associated with the differential equation are constant with time.
In the case of the series RLC circuit, the damping factor is given by,
R C
 
2 L
The value of damping factor determines the type of transient that the circuit will
exhibit.
If,
ζ > 1, the system is called over damped.
ζ = 1, the system is called critically damped.
ζ < 1, the system is called under damped.
By using RK4 method, the values of capacitor voltage vc(t) are calculated.
dy
Let, y  vc  t  ;  z  f1  t , y , z 
dt
www.ravivarmans.com Page 10 of 15
Digital Control of Power Electronic And Drives Systems Unit I

dz dy
LC  RC  y  VS
dt dt
dz 1 R V
 y  z  S  f 2  t , y, z 
dt LC L LC
Assume zero initial conditions, x0 = 0, y0 = 0 and z0 = 0. Step value = 5
We compute k1, k2, k3, k4 for f1(t, y, z) and l1, l2, l3, l4 for f2(t, y, z).
Assume Vs = 10V, R = 10Ω, L = 50H, C = 0.4F
R C
Damping factor,    0.4 . The given system is underdamped.
2 L
n t k1 k2 k3 k4 k l1 l2 l3 l4 l y y' = z
0 0 0.0000 6.2500 3.1250 5.4688 4.0365 2.5000 1.2500 1.0938 0.6250 1.3021 0.0000 0.0000
1 5 6.5104 6.9824 4.7119 4.8889 5.7980 0.1888 -0.7194 -0.3243 -0.6649 -0.4272 4.0365 1.3021
2 10 4.3742 2.2906 1.9654 1.1841 2.3450 -0.8335 -0.9635 -0.6380 -0.6868 -0.7872 9.8345 0.8748
3 15 0.4381 -1.1431 -0.4894 -1.0824 -0.6516 -0.6325 -0.3710 -0.3041 -0.2060 -0.3648 12.1795 0.0876
4 20 -1.3859 -1.6479 -1.0838 -1.1821 -1.3385 -0.1048 0.1208 0.0408 0.1254 0.0573 11.5279 -0.2772
5 25 -1.0994 -0.6681 -0.5402 -0.3784 -0.6491 0.1725 0.2237 0.1442 0.1634 0.1786 10.1894 -0.2199
6 30 -0.2063 0.1841 0.0534 0.1998 0.0781 0.1562 0.1039 0.0812 0.0616 0.0980 9.5403 -0.0413
7 35 0.2837 0.3803 0.2434 0.2796 0.3018 0.0387 -0.0161 -0.0008 -0.0214 -0.0028 9.6184 0.0567
8 40 0.2699 0.1848 0.1430 0.1111 0.1728 -0.0340 -0.0507 -0.0317 -0.0380 -0.0395 9.9202 0.0540
9 45 0.0723 -0.0219 0.0026 -0.0327 0.0002 -0.0377 -0.0279 -0.0210 -0.0173 -0.0255 10.0930 0.0145
10 50 -0.0551 -0.0857 -0.0532 -0.0647 -0.0663 -0.0123 0.0007 -0.0019 0.0030 -0.0019 10.0931 -0.0110
11 55 -0.0648 -0.0492 -0.0367 -0.0309 -0.0446 0.0062 0.0112 0.0068 0.0086 0.0085 10.0269 -0.0130
12 60 -0.0224 -0.0001 -0.0043 0.0041 -0.0045 0.0089 0.0072 0.0053 0.0047 0.0064 9.9823 -0.0045
13 65 0.0098 0.0188 0.0113 0.0146 0.0141 0.0036 0.0006 0.0010 -0.0002 0.0011 9.9778 0.0020
14 70 0.0152 0.0127 0.0092 0.0082 0.0112 -0.0010 -0.0024 -0.0014 -0.0019 -0.0018 9.9919 0.0030
15 75 0.0064 0.0013 0.0019 -0.0001 0.0021 -0.0021 -0.0018 -0.0013 -0.0012 -0.0016 10.0031 0.0013
16 80 -0.0015 -0.0040 -0.0023 -0.0032 -0.0029 -0.0010 -0.0003 -0.0003 -0.0001 -0.0004 10.0052 -0.0003

www.ravivarmans.com Page 11 of 15
Digital Control of Power Electronic And Drives Systems Unit I

Assume Vs = 10V, R = 22.4Ω, L = 50H, C = 0.4F


R C
Damping factor,    1 . The given system is critically damped one.
2 L

n t k1 k2 k3 k4 k l1 l2 l3 l4 l y y' = z
0 0 0.0000 6.2500 -0.750 10.273 3.5456 2.5000 -0.300 2.0548 -1.915 0.6824 0.0000 0.0000
1 5 3.4120 3.6245 2.3202 4.0173 3.2198 0.0850 -0.436 0.1211 -0.766 -0.218 3.5456 0.6824
2 10 2.3183 1.7434 1.6628 1.5472 1.7796 -0.229 -0.262 -0.154 -0.300 -0.227 6.7654 0.4637
3 15 1.1825 0.7674 0.8628 0.5889 0.8386 -0.166 -0.127 -0.118 -0.115 -0.129 8.5451 0.2365
4 20 0.5366 0.3208 0.3948 0.2221 0.3650 -0.086 -0.056 -0.062 -0.044 -0.061 9.3837 0.1073
5 25 0.2285 0.1296 0.1690 0.0831 0.1515 -0.039 -0.023 -0.029 -0.016 -0.027 9.7487 0.0457
6 30 0.0935 0.0512 0.0694 0.0309 0.0609 -0.016 -0.009 -0.012 -0.006 -0.011 9.9002 0.0187
7 35 0.0372 0.0198 0.0277 0.0114 0.0240 -0.007 -0.003 -0.005 -0.002 -0.004 9.9611 0.0074
8 40 0.0145 0.0076 0.0108 0.0042 0.0093 -0.002 -0.001 -0.002 -0.000 -0.001 9.9851 0.0029
9 45 0.0056 0.0029 0.0042 0.0015 0.0035 -0.001 -0.000 -0.000 -0.000 -0.000 9.9943 0.0011
10 50 0.0021 0.0011 0.0016 0.0006 0.0013 -0.000 -0.000 -0.000 -0.000 -0.000 9.9979 0.0004
11 55 0.0008 0.0004 0.0006 0.0002 0.0005 -0.000 -0.000 -0.000 0.0000 -0.000 9.9992 0.0002
12 60 0.0003 0.0001 0.0002 0.0001 0.0002 -0.000 0.0000 0.0000 0.0000 0.0000 9.9997 0.0001
13 65 0.0001 0.0001 0.0001 0.0000 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 9.9999 0.0000
14 70 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 10.000 0.0000
15 75 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 10.000 0.0000
16 80 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 10.000 0.0000

www.ravivarmans.com Page 12 of 15
Digital Control of Power Electronic And Drives Systems Unit I

Assume Vs = 10V, R = 50Ω, L = 50H, C = 0.4F


R C
Damping factor,    2.2 . The given system is over damped one.
2 L

n t k1 k2 k3 k4 k l1 l2 l3 l4 l y y' = z
0 0 0.0000 1.5625 -0.3906 3.8574 1.0335 1.2500 -0.3125 1.5430 -2.5586 0.1921 0.0000 0.0000
1 2.5 0.4801 1.2810 0.2424 2.4760 1.0005 0.6407 -0.1902 0.7983 -1.3854 0.0786 1.0335 0.1921
2 5 0.6766 1.0755 0.5240 1.6879 0.9273 0.3191 -0.1221 0.4045 -0.7576 0.0211 2.0340 0.2706
3 7.5 0.7293 0.9175 0.6252 1.2224 0.8395 0.1506 -0.0832 0.1973 -0.4207 -0.0070 2.9613 0.2917
4 10 0.7117 0.7907 0.6364 0.9345 0.7501 0.0632 -0.0603 0.0891 -0.2391 -0.0197 3.8008 0.2847
5 13 0.6624 0.6858 0.6048 0.7460 0.6650 0.0187 -0.0461 0.0334 -0.1405 -0.0245 4.5509 0.2650
6 15 0.6012 0.5972 0.5552 0.6150 0.5868 -0.0031 -0.0368 0.0055 -0.0863 -0.0253 5.2158 0.2405
7 18 0.5378 0.5214 0.4999 0.5182 0.5164 -0.0132 -0.0303 -0.0078 -0.0561 -0.0243 5.8026 0.2151
8 20 0.4772 0.4558 0.4452 0.4431 0.4538 -0.0171 -0.0256 -0.0136 -0.0387 -0.0224 6.3191 0.1909
9 23 0.4213 0.3989 0.3940 0.3825 0.3983 -0.0179 -0.0219 -0.0155 -0.0283 -0.0202 6.7728 0.1685
10 25 0.3709 0.3493 0.3473 0.3321 0.3494 -0.0173 -0.0189 -0.0155 -0.0219 -0.0180 7.1711 0.1484
.
.
.
30 75 0.0267 0.0249 0.0250 0.0234 0.0250 -0.0014 -0.0013 -0.0013 -0.0012 -0.0013 9.7979 0.0107
31 78 0.0234 0.0218 0.0219 0.0205 0.0219 -0.0012 -0.0012 -0.0012 -0.0011 -0.0012 9.8229 0.0093
32 80 0.0205 0.0191 0.0192 0.0179 0.0192 -0.0011 -0.0010 -0.0010 -0.0009 -0.0010 9.8448 0.0082
33 83 0.0180 0.0168 0.0168 0.0157 0.0168 -0.0009 -0.0009 -0.0009 -0.0008 -0.0009 9.8640 0.0072
34 85 0.0157 0.0147 0.0148 0.0138 0.0147 -0.0008 -0.0008 -0.0008 -0.0007 -0.0008 9.8808 0.0063
35 88 0.0138 0.0129 0.0129 0.0121 0.0129 -0.0007 -0.0007 -0.0007 -0.0006 -0.0007 9.8955 0.0055
36 90 0.0121 0.0113 0.0113 0.0106 0.0113 -0.0006 -0.0006 -0.0006 -0.0006 -0.0006 9.9084 0.0048
37 93 0.0106 0.0099 0.0099 0.0093 0.0099 -0.0006 -0.0005 -0.0005 -0.0005 -0.0005 9.9198 0.0042
38 95 0.0093 0.0087 0.0087 0.0081 0.0087 -0.0005 -0.0005 -0.0005 -0.0004 -0.0005 9.9297 0.0037
39 98 0.0081 0.0076 0.0076 0.0071 0.0076 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 9.9384 0.0033
40 100 0.0071 0.0067 0.0067 0.0062 0.0067 -0.0004 -0.0004 -0.0004 -0.0003 -0.0004 9.9460 0.0029

www.ravivarmans.com Page 13 of 15
Digital Control of Power Electronic And Drives Systems Unit I

1.3 Extension to AC Circuits (RL Circuit)


Consider a first-order circuit containing only one inductor. The diagram in Figure
represents an electrical circuit whose total resistance is a constant R ohm and whose
self-inductance, shown as a coil, is L henry, also a constant. There is a switch whose
terminals can be closed to connect a constant electrical source of V volt.

By solving this equation, we can predict how the current will flow after the switch
is closed.

The equation is a first-order linear differential equation for i as a function of t.


Consider a coil which has an inductance of 4H and a resistance of 24Ω is
connected together to form a RL series circuit.
If they are connected to ac supply of 50 sin 100t
di  t  1 R
 V t   i t 
dt L L
di  t 
f  x, y   ; y  i t 
dt
50sin100t 24
f t, y    y  12.5 sin 100t   6 y
4 4
Assume zero initial conditions, i.e. y0 = 0 and step value = 0.06
By applying Euler’s method, the values of current are calculated and tabulated.

www.ravivarmans.com Page 14 of 15
Digital Control of Power Electronic And Drives Systems Unit I

n x(n) y(n) f(x(n),y(n)) y(n+1)=y(n) + h*f(x(n),y(n))


0 0 0 0 0
1 0.06 0 -3.49269 -0.20956
2 0.12 -0.20956 -5.44979 -0.53655
3 0.18 -0.53655 -6.16805 -0.90663
4 0.24 -0.90663 -5.87994 -1.25943
5 0.3 -1.25943 -4.79383 -1.54706
6 0.36 -1.54706 -3.11489 -1.73395
7 0.42 -1.73395 -1.05281 -1.79712
8 0.48 -1.79712 1.179536 -1.72635
9 0.54 -1.72635 3.373223 -1.52395
10 0.6 -1.52395 5.333593 -1.20394
11 0.66 -1.20394 6.891743 -0.79043
12 0.72 -0.79043 7.915397 -0.31551
13 0.78 -0.31551 8.317793 0.183557
14 0.84 0.183557 8.063536 0.667369
15 0.9 0.667369 7.170742 1.097614
16 0.96 1.097614 5.709163 1.440164
17 1.02 1.440164 3.794353 1.667825
18 1.08 1.667825 1.578282 1.762522
19 1.14 1.762522 -0.76288 1.716749
20 1.2 1.716749 -3.04286 1.534178
.
.
.
30 1.8 -1.75983 0.544567 -1.72716
.
.
.
40 2.4 1.635261 2.006496 1.755651

www.ravivarmans.com Page 15 of 15

You might also like