Model of two differential equations of RLC circuit (Simulink)
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tech
el 26 de Jun. de 2022
Comentada: Tech
el 28 de Jun. de 2022
Hello,
I have made an RLC circuit and I want to simulate this system. I know, that I can model the exact same circuit, but I want to get graphs from my two differential equations. I am kinda struggling with the model of those equations. I have already read a lot of articles, but i still can not figure out, how to apply the knowledge from those articles and from my self-studying.
I have those differential equations:
where U is voltage (I will probably use sinwave block); i1, i2, i3 are 3 currents.
Could somebody, please, give me a hint or any simillar example of Simulink model?
4 comentarios
Sam Chak
el 27 de Jun. de 2022
I'm not used to seeing dynamical equations in integral form. Can you put them in differential equations?
You have 3 states, so generally there should be 3 differential equations. However, the can be substituted and recovered from this info:
,
thus, making only two state equations are sufficient to solve the problem.
Generally, it is faster and efficient to type out the equations in MATLAB. But for newbies, it is more effective to learn what happen to the system and signals (because you virtually attach a Scope at each signal) using the graphical approach in Simulink.
Since this is a Linear RLC System, you can do a fast simulation using the State-Space Block in Simulink. Else, you have to use the Integrator blocks to obtain and .
Can you put up the basic blocks first?
Respuesta aceptada
Sam Chak
el 27 de Jun. de 2022
I have requested that the differential equations to be provided, but you seemed to overlook the message. So, I'm unsure if the following model is correct or not. Modify the model as you wish.
Subs Equation 3 into Equation 1
Subs Equation 3 into Equation 2
Rewrite them in state-space form
Re = 1;
Li = 1;
Ca = 1;
A = [0 0 1 0; 0 0 0 1; -2/(Li*Ca) 1/(Li*Ca) -Re/Li 0; 1/(Li*Ca) -1/(Li*Ca) 0 -Re/Li];
B = [0; 0; 1/Li; 0];
C = [1 0 0 0; 0 1 0 0; 1 -1 0 0];
D = [0; 0; 0];
sys = ss(A, B, C, D)
Assuming that the voltage input is a sine wave , then .
t = 0:0.01:20;
dU = cos((2*pi/5)*t);
x0 = [1 -0.5 0 0]; % initial values: i1(0) = 1, i2(0) = -0.5
lsim(sys, dU, t, x0)
grid on
If you implement this system in Simulink using the State-space block, then you should obtain similar results.
Más respuestas (1)
Torsten
el 27 de Jun. de 2022
Editada: Torsten
el 27 de Jun. de 2022
Solve the system of differential equations
dI1/dt = i1, I1(0) = 0
dI3/dt = i3, I3(0) = 0
L*di1/dt = U - R*i1 - 1/c * I1 - 1/c * I3, i1(0) = ?
L*di2/dt = -R*i2 + 1/c * I3, i2(0) = ?
L*di3/dt = (U - R*i1 - 1/c * I1 - 1/c * I3) - (-R*i2 + 1/c * I3), i3(0) = i1(0)-i2(0)
It is equivalent to yours.
Ver también
Categorías
Más información sobre Switches and Breakers en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!