Mathematical Modeling and Parameter Estimation of A RC Circuit
Mathematical Modeling and Parameter Estimation of A RC Circuit
Modelling and
Parameter Estimation of
a RC Circuit and
Control of the Capacitor
Voltage
Erandi M.A.U
200161V
Assignment tasks
Part a)
Ei(s)
Eo(s) = 1+sRC
Ei(s) 1
Eo(s) = 1 . RC
s+
RC
𝜏 = RC
Using the given Step response figure,
𝜏 is the time taken for the response to reach (1-e-1).
A = 5 * 63.2% = 3.16
According to the given figure when amplitude is 3.16 the time taken is 1second.
Then,
𝜏 = 1.
Part b)
From the previous part we got 𝜏 = 1 ,
Then RC= 1,
Ei(s)
Eo(s) = .1
s+1
Eo(s) 1
Gp(s) = = s+1
Ei(s)
When K=10,
Step response is not settled at 1 when K=10. That means a steady state error has in the model.To
minimize the error we can increase the K value and check the step response.When we increasing
the K value we got the best step response at K = 100.But still the steady state error remains.
K = 100,
Step response of the closed loop system with Proportional Integral Control
M(s) = Kp .s + KI
s2 + (Kp + 1)s + KI
The characteristic equation is,
s2 + (Kp + 1)s + KI
The Routh’s array is,
s2 1 KI
s Kp + 1 0
s0 KI 0
For stability,
Kp + 1 > 0 and KI > 0
Kp > -1 and KI > 0
Step response when Kp = 20 and Ki = 2,
The steady state error has now minimized but the step response is still not ideal.
Step response when Kp = 100 and Ki = 20, After increasing the Kp and Ki we got the ideal step
response.
c)
The system can be modelled as follows with Proportional integral Controler
𝑀(𝑠) = 𝐸𝑜(𝑠) = 𝐾𝑃 + KI
𝑅(𝑠) 𝑠2 + (𝐾𝑃 + 1)s + KI
(𝑠2 + (𝐾𝑃 + 1)s + KI)𝐸𝑜(𝑠) =( 𝐾𝑃 s +KI )𝑅(𝑠)
Taking Laplace transform,
K = 10;
M = tf(K,[1 1+K]);
step(M),grid on
K = 100;
M = tf(K,[1 1+K]);
step(M),grid on
part c)
%% PI control parameters
Kp = 100;
Ki = 50;
R = 100;
C = 0.01;
figure
plot(t,y_pI,'g',t,ref,'r--')
title('Voltage Profile')
ylabel('Voltage (V)')
xlabel('Time (s)')
%% supply voltage
ei = R*C*diff(PI_Y)./diff(t) + PI_Y(1:end-1);
figure
plot(t(1:end-1),ei)
xlabel('Time (s)')
ylabel('Supply Voltage (V)')
title('Supply Voltage vs Time')
%% power
i = C*diff(PI_Y)./diff(t);
p = PI_Y(1:end-1).*i;
figure
plot(t(1:end-1),p)
title('Power vs Time')
xlabel('Time (s)')
ylabel('Power (W)')