Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Discrete state space equation of rlc - getting a wrong graph

Status
Not open for further replies.

Thomas0320

Newbie
Newbie level 1
Joined
Mar 27, 2023
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
There's a RLC circuit in series.
I have used current and derivative of current as state variables, and I've written the MATLAB code of the discrete state space equations.
The problem I encountered is that the when I plot the derivative of current (the second state variable) on Matlab, it's equal to the current graph obtained from LTSpice.
Also when I plot the current on Matlab, it's same shape as the voltage but smaller by scale of 0.5 which is capacitance.
Can someone suggest me what could be the reason for this?
--- Updated ---

2.PNG1.PNG
The attached images are my matlab code and the simulation I had
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top