Finding the Analytical Equation q(t) for an RLC Circuit Using Given V(t) Data

조회 수: 17 (최근 30일)
Hello,
I have a numerical time series of voltage V(t) and aim to derive the analytical equation for the charge q(t)q(t)q(t) in an RLC circuit. The relationship between V(t), q(t), and the circuit parameters R, L, and C is governed by the following equation:
V(t) = R * dq/dt + L * d2q/dt2 + (1/C) * q(t)
I have attempted the following steps to estimate the parameters R, L, and C:
q(t); I calculated the charge q(t)as the cumulative integral of V(t), assuming a constant time step (delta_t):
q(t) = sum(V(t) * delta_t)
Computing Derivatives: I computed the first and second derivatives of q(t) numerically using finite differences:
  • The first derivative (dq/dt): dq/dt = (q(t+delta_t) - q(t)) / delta_t
  • The second derivative (d2q/dt2): d2q/dt2 = (dq/dt at t+delta_t - dq/dt at t) / delta_t
Creating the Matrix A:I created a matrix A and a vector V to represent the system of equations:
  • Matrix A has three columns:
  • The first column contains q(t),
  • The second column contains dq/dt,
  • The third column contains d2q/dt2.
  • Vector V contains the voltage values V(t).
Estimating Parameters:I solved for the parameters R, L, and C using the least-squares method: X = inv(A' * A) * A' * V.
Here, X contains the values [1/C, R, L].
Extracting Parameters:I extracted the parameter values from X as follows: C = 1 / X(1), R = X(2), L = X(3)
While I successfully estimated the parameters R, L, and C, I have not been able to derive the analytical equation for q(t). My goal is to find the closed-form expression for q(t) using these parameters and the RLC circuit equation.
  1. How can I derive an analytical expression for q(t)q(t)q(t) from the RLC circuit equation?
  2. Since V(t)V(t)V(t) is provided as numerical data, is there a way to approximate q(t)q(t)q(t) in a closed form?
  3. Are there any MATLAB tools or functions that can handle this type of numerical differential equation?
  댓글 수: 4
Trais
Trais 2024년 12월 10일
Yes, you are correct. I have calculated q(t) using the cumulative sum of V(t)×Δt, which is a numerical method to approximate the integral of V(t). However, my goal is to derive the analytical equation for q(t).
To find the analytical equation for q(t), I need to solve the differential equation for the RLC circuit, which involves the derivatives of q(t) and V(t). This is why I have not been able to find the analytical equation for q(t) yet.
If you have any suggestions on how to extract the analytical equation from the numerical data of V(t), I would appreciate your help.
Torsten
Torsten 2024년 12월 10일
Yes, you are correct. I have calculated q(t) using the cumulative sum of V(t)×Δt, which is a numerical method to approximate the integral of V(t).
If q(t) is the integral of V(t), then q(t) follows the differential equation
V(t) = dq/dt
Next you write that q(t) follows the differential equation
V(t) = R * dq/dt + L * d^2q/dt^2 + (1/C) * q(t)
Only one version can be correct.

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

채택된 답변

David Goodmanson
David Goodmanson 2024년 12월 12일
편집: David Goodmanson 2025년 1월 15일 2:56
Hi Trais,
The exact solution for q(t) involves integrating the voltage for times less than t. Let
w = sqrt(-R^2/4L^2 + 1/LC)
For underdamping which is the usual case, R is small enough so that the argument inside the square root is positive and w is real. The solution for q is
q(t) = (1/wL) Integral{-inf,inf} h(t-t') e^((-R/2L)(t-t')) sin(w(t-t')) V(t') dt'
where h is the heaviside function. h restricts t' to be <t, in accord with causality since V(t') is drivng the system. An equivalent way write this is
q(t) = (1/wL) Integral{-inf,t} e^((-R/2L)(t-t')) sin(w(t-t')) V(t') dt'
This is the particular solution. The integral only starts as far back in negative time as you define V to be nonzero, so if V starts at t = 0, then the integral runs from 0 to t. For any well behaved V(t) that does not have some kind of singularity at t=0, the solution produces q(0) = q'(0) = 0. This is highly restrictive, and since this is a second order differential equation you get to define two boundary conditions. You can add in two homogeneous solutions with adjustable coefficients A and B. If there are required boundary conditions on q(0) and q'(0) you can use
q(t) = e^((-R/2L)t) (A sin(wt) + B cos(wt) ) % add in these two solutions
q(0) = B
q'(0) = Aw - B(R/2L)
  댓글 수: 2
Trais
Trais 2024년 12월 12일
Thank you for your detailed explanation of the formula for q(t). Could you please provide a more detailed explanation of how this formula was derived and the steps involved?
I really appreciate your response in advance.
David Goodmanson
David Goodmanson 2024년 12월 13일
편집: David Goodmanson 2024년 12월 13일
You should probably consult a book on differential equations or physics or electrical engineering because this is a very common example. However, here is an outline of what goes on. First, the homogeneous solutions satisfy
Lq'' + Rq' + q/C = 0 (1)
Assume a solution of the form q = e^at. Plug that in, do the differentiations, get
(La^2 +Ra +1/C)q = 0
solve the quadratic, obtain
a = -R/2L +- i*w where w is defined in the answer
then q = e^((-R/2L)t) e^(iwt) or q = e^((-R/2L)t) e^(-iwt)
Take linear combinations to get for the (real) homogeneous solutions
q = e^((-R/2L)t) cos(wt) or q = e^((-R/2L)t) sin(wt)
For the particular solution take the second of these two solutions and call it g(t).
g(t) = e^((-R/2L)t) sin(wt) (3)
Note that g(t) obeys eqn (1), and that
g(0) = 0 and g'(0) = w (2)
Now look at [ this is q for the particular solution, not the homogeneous solutions ]
q = Integral{-inf,inf} h(t-t') g(t-t') V(t') dt'
and do the process of (1) on it, where the derivatives are w/r/t t. There are two kinds of derivative:
[a] Those that differentiate only g(t-t') in the integrand. They will all add up to 0 since g(t-t') obeys (1)
[b] Those that differentiate h(t-t'). Since the derivative of h is a dirac delta function d(t-t'), doing the integration results in the rest of the integrand evaluated at t' = t.
For Rq' there is the contribution
R(d/dt)Integral{-inf,inf} d(t-t') g(t-t')V(t')dt' = R g(0)V(t) = 0 from (2)
For Lq'' there is the contribution
L(d/dt)Integral{-inf,inf} d(t-t') g'(t-t')V(t')dt' = L g'(0)V(t) = LwV(t) from (2)
So all together
Lq'' + Rq' + q/C = wLV(t)
It's too high by a factor of Lw, so dividing by Lw and using the definition of g from (3) gives the particular solution shown in the answer.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Circuits and Systems에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by