Simulink model of RLC circuit (2nd order differential equations)

17 visualizzazioni (ultimi 30 giorni)
Hello guys,
I have those differential equations, that describe currents in RLC circuit:
Then i created a model of those equations in Simulink:
I set values of R,L,C like this:
R = 1000
L = 1.0000e-06
C = 2.0000e-12
and my problem is that I am getting error message when I try to run the Simulink model.
Does anyone, please, know where the problem is?
  2 Commenti
Sam Chak
Sam Chak il 29 Giu 2022
Hi @Techie
Can we have a closure on this original question? The suggested solution using the State-space block can definitely solve the original question in Simulink because it is a Linear System.
It was later (48 hours after original question is posted), then you posted a reply stating that you wanted the model to be specifically constructed in fundamental math blocks. Thank you for your consideration on this matter.
In your new question, it seems that a singularity has occurred during the simulation in Simulink.
Tech
Tech il 29 Giu 2022
Hello,
I will close my previous question as anwered.
I want to you those math blocks, because i believe that if i will go that way i will be able to get graphs of current or voltage from one part of the RLC circuit (for example i could get graph of current on resistor or something like that).
Do you know how could i solve my problem with that error message in this simulation?
Thank you.

Accedi per commentare.

Risposta accettata

Sam Chak
Sam Chak il 29 Giu 2022
The first impression is that the singularity might be caused by the "Division by zero" issue.
Looking at your differential equations, four terms have divisions by .
Note that and are both very small numbers.
In fact, is even smaller than eps, the floating-point relative accuracy.
L = 1e-6;
C = 2e-12;
Test = L*C < eps % 1 is True, 0 is False
Test = logical
1
  4 Commenti
Tech
Tech il 29 Giu 2022
Hello @Sam Chak
Your point that there is division by zero make sense. Do you have any idea how can I fix this problem? Because values of C and L are normally simillarly small.
I start to thinking that I must be doing something wrong. What I want to do is to make a Simulink model of those differential equations and then be able to, for example get graph of voltage or current from one capacitor or resistor.
Do you have any more advices for me, please?
Tech
Tech il 29 Giu 2022
New Update of my situation.
I have found some mathematical mistakes I have made and i set values of L and C to bigger one and it is somehow working.
I will now mark this question as anwered and if i will have any more problems I will create a new article.
Thank you very much.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by