Electrical Engineering Question
Description
Unformatted Attachment Preview
(a)
(b)
Differential Equation for the system:
??(??)
+C
??
????(??) 1
????
+?? ? ?? (??) dt= 0
2nd derivative,
1 ????(??)
??
????
+C
??2 ??(??) 1
???? 2
+?? ??(??) = 0
So, the differential equation is,
1 ????(??)
??
????
+C
??2 ??(??) 1
???? 2
+ ??(??) = 0
??
Boundary condition:
t0=0s;
v0=0mV=0V
t1=50 ms=0.05s;
v50=105.914mV= 0.105914m
(c)
Deriving the differential equation along with appropriate
coefficient values:
From (a) we get,
1 ????(??)
??
????
+C
??2 ??(??) 1
???? 2
+?? ??(??) = 0n(i)
We the central difference formula,
f(????+1 )?f(?????1 )
1st order, f?(???? ) =
2nd order, f??(???? )=
2?
f(????+1 )?2f(???? )+f(?????1 )
?2
Now applying the central difference formula in equation (i)
1 ????+1 ??????1
??
2?
????+1 ?2???? +?????1 1
+C
?2
+?? ???? =0
Solving the equation we get,
2???????2
?2 ?2????
?????1 ( 2???3 ) +???? ( ???2 ) + ????+1 (
??
??1???0
0.05?0
0.05
h= ??? = ??+1 = ??+1 = ??+1 = ??+1
Also,
R=10?
L=1mH=0.001H
C=1mF=0.001F
?2 +2?????
2???3
)=0
2????????(???)2
?????1 (
2??(???)3
(???)2 ?2????
) +???? ( ??(???)2 ) + ????+1 (
(???)2 +2???????
2??(???)3
)=0
Now we can write the equation along all with appropriate
coefficient values:
??.???? ??.???? ??
?(
)
??+?? ??+??
??.???? ??
??ÿ???è
)
??+??
??ÿ???ÿ?.??????Ê??????? (
??.???? ??
(
) +???? ( ??+??
) ???ÿ?.??????ÿ?.??????
??.???? ??
)
??+??
??.??????è
(
??.???? ??
)+ ????+?? ( ??+??
??.????
ÿ???ÿ?.??????
??+??
??.???? ??
??ÿ???è
)
??+??
) +??Ê)=0
So,
a=
2????????(???)2
b=
2??(???)3
(???)2 ?2????
??(???)2
(???)2 +2???????
c=
2??(???)3
d=0
(d)System equations in matrix forms including the boundary
conditions:
Answer to the Question No: 02
clc
close all
clear
t0= 0; %s
t1=0.05; %s
v0=0; %V
v50=0.105914; %V
R=10; %ohm
L=0.001; %H
C=0.001; %F
n=1000;
l=t1-t0;
dx=(t1-t0)/(n+1);
a= (C*2*R*(dx)-(dx)^2)/(2*R*dx^3);
b=((dx)^2-2*L*C)/(L*dx^2);
c=((dx)^2+2*dx*R*C)/(2*R*dx^3);
d=0;
A=zeros(n,n);
fori=1:n
A(i,i)=b;
end
fori=1:n-1
A(i,i+1)=c;
end
fori=2:n
A(i,i-1)=a;
end
B=ones(n,1)*d;
B(1)=d-a*v0;
B(n)=d-c*v50;
vu=inv(A)*B;
t= linspace(t0,t1,n+2);
V(1)=v0;
V(2:n+1)=vu;
V(n+2)=v50;
Is=4;
Answer to the Question No: 03
%exact solution
a1=1/(2*R*C);
w=1/(sqrt(L*C));
S1=-a1+(sqrt(a1^2-w^2));
S2=-a1-(sqrt(a1^2-w^2));
A=-Is/(C*(S1-S2));
vexact=A.*exp(S1.*t)-A.*exp(S2.*t)
pexact=(vexact.^2)./R;
Answer to the Question No: 04
(a)
%IC
fori=1:(n+1)
Ic(i)=C*((V(i+1)-V(i))/(t(i+1)-t(i))); %using Forward
difference 1st order formula.
end
Ic(n+2)=nan;
figure
plot(t,Ic)
xlabel(‘t’)
ylabel(‘Ic’)
(b)
%PR
fori=1:(n+2)
Pr(i)=(V(i)^2)/R;
end
figure
plot(t,Pr)
xlabel(‘t’)
ylabel(‘Pr’)
(c)
%PC
fori=1:(n+2)
Pc(i)=V(i)*Ic(i);
end
figure
plot(t,Pc)
xlabel(‘t’)
ylabel(‘Pc’)
Answer to the Question No: 05
(a)
For n=100
%5(a)
figure
plot(t,V);
xlabel(‘t’)
ylabel(‘V’)
Exact solution in same plot for n=100
figure
plot(t,V);hold on;
plot(t,vexact)
Vexact
V
%Error
ei=vexact-V;
En=sqrt(sum(ei)^2/n);
Workspace value: for 100
(b)
For n=100
%5(b)
figure
plot(t, Ic)
xlabel(‘t’)
ylabel(‘Ic’)
(C)
For n=100
%5(c)
figure
plot(t,Pr);
xlabel(‘t’)
ylabel(‘Pr’)
Exact solution in same plot for n=100
figure
plot(t,Pr);hold on;
plot(t,pexact);
Vexact
V
(d)
Repeating a,b,c for n=200,500,1000,5000
n
200
V vs t
Vand Vexact vs t
Vexact
V
500
1000
5000
n
200
500
1000
5000
En
n
200
500
1000
5000
Ic vs t
n
200
500
1000
5000
Pr vs t
Pr and pexact vs t
(d) We can see from above plots as the value of n increases, the error
decreases. In n=5000 the exact value (vexact) and V are in same
position. So, the accuracy improved as n increases.
Workspace values of 1st code
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."