[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ScanTesla program -> Optimization
- To: tesla@xxxxxxxxxx
- Subject: Re: ScanTesla program -> Optimization
- From: "Tesla list" <tesla@xxxxxxxxxx>
- Date: Thu, 19 May 2005 10:40:55 -0600
- Delivered-to: testla@pupman.com
- Delivered-to: tesla@pupman.com
- Old-return-path: <teslalist@twfpowerelectronics.com>
- Resent-date: Thu, 19 May 2005 10:46:15 -0600 (MDT)
- Resent-from: tesla@xxxxxxxxxx
- Resent-message-id: <703AUB.A.UvC.ULMjCB@poodle>
- Resent-sender: tesla-request@xxxxxxxxxx
Original poster: "Antonio Carlos M. de Queiroz" <acmdq@xxxxxxxxxx>
Tesla list wrote:
Original poster: Terry Fritz <teslalist@xxxxxxxxxxxxxxxxxxxxxxx>
Wow Cool!! You know far far more than me at this point!! I find I have
forgotten most of the mesh equation and complex number stuff over the
years. I will press on just to refresh my knowledge there in any case.
Jim also strongly suggested this "matrix stuff" too so it is probably a
"real good idea" ;-)) As far as I can tell, the C language has all the
function built in and ready to play.
The step function and input square wave (Fourier series) should be about
10000X faster to compute than a pure say 10-nS stepwise number grinder.
For the linear time-invariant case, that is the way to go. Program like
MathCad can also reduce the equations to run faster. But the equation are
not super bad.
Hummm. Complex analysis is for steady state solutions, even with Fourier
series to represent a square wave input. You need a time-domain solution,
that requires only real computations, to find the solution
with the transient, and with arbitrary input waveform.
What I am doing is (identical to what I have implemented in the sstcd
program):
Formulate a set of state equations with the form:
dX/dt = [A]X(t)+B*vin(t)
where X is a vector with 5 elements (Vc1,Vc2,Vc2,Il1,Il2), [A] is a
5x5 real matrix, and B is a vector with 5 elements. This is quite easy.
Solve it by numerical integration with the trapezoidal rule:
X(t0+dt)=X(t0)+(dt/2)*([A]*X(t0)+B*vin(t0)+[A]*X(t0+dt)+B*vin(t0+dt))
where t0 is the present time, dt is a small time interval ahead, X(t0)
is the present state, and X(t0+dt) is the next state.
The required calculation is:
X(t0+dt)=[[I]-(dt/2)*[A]]^(-1)*(dt/2)*([A]*X(t0)+B*(vin(t0)+vin(t0+dt)))
The matrix inversion has to be done just once.
This results in good precision if you put about 50 "dt" for each cycle.
If I find time I will make a starting code with these calculations
available soon.
Antonio Carlos M. de Queiroz