help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: differential equation


From: Liam Groener
Subject: Re: differential equation
Date: Mon, 16 May 2011 14:52:15 -0700

On May 16, 2011, at 9:35 AM, CdeMills wrote:

> Hello,
> 
> I'm trying to simulate an electrical circuit whose time-domain differential
> equation is
> V" + k1 V' +k2 V = a1 I' + a2 I
> Vs(t) - Rs I = V
> where V and I are the device voltage and current, respectively, and the rest
> are constants. Vs is the time-varying voltage source, and Rs its internal
> resistance. Starting from equilibrium, all values and their derivatives are
> set to zero. 
> 
> I don't see how to formulate the problem, in particular adding the source
> equation into the picture. 
> 
> LSODE: let's say x1 = V, x2 = I, x3 = V'; so we have
> x1' = x3
> x2' = ??? => I' depends on Vs'(t) ???
> x3' = a1 * ??? + a2 x2 - k1 x3 - k2 x1
> How to fill the "???"
> 
> DASSL: same variables
> res1 = x1'-x3
> res2 = ...
> res3 = x3' - a1 x2' - a2 x2 - k1 x3 - k2 x1
> In all cases, I need a relationship around I', and would like Vs(t) to be a
> step source, in this case Vs'(t) would become infinite ???
> 
> Any hints ?


I would substitute I = (Vs-V)/Rs into your first equation and use lsode.
You would then have 2 d.e.'s:
x'(1) = x(2)
x'(2) = aVs - k1 x(2) - b x(1)
where:
a = a1/Rs and b = k2+a1/Rs

The initial conditions would be:
x(1)=0, x(2)=0
Don't worry about the infinite derivative, the imbalance in the initial voltage 
should take care of that.
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]