I need help solving RC circuit using Leplace inverse, then graph the output which is in the symsum form
1 次查看(过去 30 天)
显示 更早的评论
So I solved the following Ciruit using Leplace Transform, as I want to find the output on V3.
and this is what I got
then I used Symbolic Math Toolbox Laplace transforms .. with the following code
Ys2(s)=((2*s^2+7*s+3)/(2*s^3+11*s^2+15*s+4)*(2*s+2)/(2*s^2+7*s+3)*1/(s+1)*1/s)
yt = ilaplace(Ys2,s,t)
and this is the output
1/2 - symsum((exp(t*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2)/(6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 15), k, 1, 3) - (15*symsum(exp(t*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))/(6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 15), k, 1, 3))/2 - (11*symsum((exp(root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)*t)*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k))/(22*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k) + 6*root(z^3 + (11*z^2)/2 + (15*z)/2 + 2, z, k)^2 + 15), k, 1, 3))/2
Now I don't understand why I got my code in such a weirdo format? what did I do wrong?
And if nothing is wrong with this code, how to graph it?
I tried using syms, and declaring W and putting it equal to the output, but failed.
Any help is appreciated
0 个评论
采纳的回答
Star Strider
2021-11-23
Sometimes a bit fo force (such as using vpa) is necessary —
syms s t
Ys2(s)=((2*s^2+7*s+3)/(2*s^3+11*s^2+15*s+4)*(2*s+2)/(2*s^2+7*s+3)*1/(s+1)*1/s)
yt = ilaplace(Ys2,s,t)
yt = vpa(simplify(yt, 500),5)
ytfcn = matlabFunction(yt)
figure
fplot(ytfcn, [0, 50])
grid on
The matlabFunciton call is not absolutely necessary, however it may make life easier if the intent is to use ‘yt’ outside the Symbolic Math Toolbox.
.
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!