# Calculate Impedance of circuit using laplace transform.

19 views (last 30 days)
Mert sargin on 17 Jul 2022
Answered: Paul on 17 Jul 2022 Hi, I am trying to plot the behaviour of this circuits Impedance in Matlab. But the result physically doesnt make sense. Why would the impedance behave like a probability density function? Vier=Aufheiz4var(21,30,19.66,25);
fplot(Vier,[0 5000])
function A=Aufheiz4var(r1,r2,c1,c2)
syms R1 C1 R2 C2
syms s
R1=r1;
R2=r2;
C1=c1;
C2=c2;
Z2=R2/(R2*C2*s+1)
Z1=R1+Z2
Zges=1/(s*C1+1/Z1)
A=ilaplace(Zges)
end
##### 2 CommentsShowHide 1 older comment
Mert sargin on 17 Jul 2022
Edited: Mert sargin on 17 Jul 2022
Hi Paul, thank you very much for the answer, that clears my confusion. I am a bit rusty in this topic, how would I modify my function to have different inputs? I would like to see my circuits behaviour on a specific voltage over a period of time.
Edit: I figured it out. Thank you !

Paul on 17 Jul 2022
Assuming that the input voltage has a Laplace transform, you can multiply Zges with the Laplace transform of the input and take the ilaplace of the product (this all assumes the system is at rest at for t < 0 and the "switch closes" at t= 0 to apply the input).
For example, for a step input voltage
Zges = Aufheiz4var(21,30,19.66,25);
syms t
U = laplace(heaviside(t));
Vier = ilaplace(Zges*U);
fplot(Vier,[0 5000]) The potential drawback of this approach is that ilaplace() might not return a useful closed form expression for moderately complex input voltages, in which case you can resort to numerical, rather than symbolic, solutions.
function Zges = Aufheiz4var(r1,r2,c1,c2)
syms R1 C1 R2 C2
syms s
R1=r1;
R2=r2;
C1=c1;
C2=c2;
Z2=R2/(R2*C2*s+1);
Z1=R1+Z2;
Zges=1/(s*C1+1/Z1);
%A=ilaplace(Zges)
end