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

조회 수: 17 (최근 30일)
Tech
Tech 2022년 6월 29일
댓글: Tech 2022년 6월 29일
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
Sam Chak
Sam Chak 2022년 6월 29일
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 2022년 6월 29일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Sam Chak
Sam Chak 2022년 6월 29일
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
Tech
Tech 2022년 6월 29일
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 2022년 6월 29일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by