0

I have a numerical time series of voltage $V(t)$ and aim to derive the analytical equation for the charge $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\frac{dq}{dt} + L\frac{d^2q}{dt^2} + \frac{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

$$ q'(t)=\frac{dq}{dt} = \frac{(q(t+\Delta t) - q(t))}{\Delta t}$$

The second derivative $$\frac{d^2q}{dt^2} = \frac{(q'(t+\Delta t) - q'(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 $\frac{dq}{dt}$, The third column contains $\frac{d^2q}{dt^2}$. 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 = \frac{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.

How can I derive an analytical expression for $q(t)$ from the $RLC$ circuit equation?

Since $V(t)$ is provided as numerical data, is there a way to approximate $q(t)$ in a closed form?

Are there any MATLAB tools or functions that can handle this type of numerical differential equation?

Cesareo
  • 36,341
  • Also can be helpful https://math.stackexchange.com/questions/3470910/how-to-fit-ordinary-differential-equations-to-empirical-data – Cesareo Dec 10 '24 at 16:00
  • 1
    Edited it to make it more readable, may take a while to show. – Paul Dec 10 '24 at 16:22

0 Answers0