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

Re: Coupling vs secondary voltage chart



Original poster: Terry Fritz <teslalist@xxxxxxxxxxxxxxxxxxxxxxx>

Hi Antonio,

At 03:13 PM 6/18/2005, you wrote:
Tesla list wrote:
Original poster: Terry Fritz <teslalist@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Antonio,
The problem I ran into was knowing "NewVin" in the case of a primary current controlled DRSSTC. In order to know NewVin, I would have to know NewIprimary ( Xo[4}(t+dt) ) which I will not have until the simulation cycle ends. The NewVin is controlled by the primary current NewIpri. When the cycle starts, I don't know what NewIpri will be.
So I set the NewVin equal to the LastVin. This will cause Vin to actually switch one cycle later. But that really is the case in a real DRSSTC since the electronics take time to switch.

The problem is not in the calculation of Vin based on the last calculated current. I agree that this is a reasonable approach. The problem is that by always using Vin+Vin, at each transition a sum that should be zero goes to a full sum. Consider what this means, in a transition from -Vin to +Vin at t0+dt: Vin(t0)+Vin(t0+dt) should be 0. You are using 2*Vin, what is equivalent to say that Vin(t0+dt)=2*Vin. Continuing, Vin(t0+dt)+Vin(t0+2*dt)=2*Vin means that Vin(t0+2*dt)=0 Continuing, Vin(t0+2*dt)+Vin(t0+3*dt)=2*Vin means that Vin(t0+3*dt)=2*Vin. The input voltage is then oscillating between 0 and 2*Vin at each step. The oscillation gets worse at each transition. This has little effect in the simulation, however, as the high-frequency component is rejected by the relatively narrowband circuit (and by the simulation method).

Antonio Carlos M. de Queiroz

I see.... I applied a fix which I think will correct it. I just used the old value of Vin from the last iteration. This will actually be a dt late in time, but it probably switches more accurately this way and I think it fixes the oscillation problem.


............
for (T1 = T1_start; T1 <= T1_stop; T1 = T1 + T1_inc)
{
Vin_old = 0.0;
if (X0[4] >= 0) Vin=Vrail; else Vin=-Vrail; //Inputs Vin for DRSSTC case
if (T1 > DwellTime) Vin = 0; //Dwell time shutdown


      /* X1=X0+(dt/2)*[A]*X0+(dt/2)*B*(vin(t0)+vin(t0+dt)) */
      for (j=1; j<6; j++) {
        X1[j]=X0[j];
        for (k=1; k<6; k++) X1[j]+=(T1_inc/2)*(A[j][k]*X0[k]);
        X1[j]+=(T1_inc/2)*B[j]*(Vin_old+Vin);
..................

I made this change in the latest version and it changes the numbers a bit probably for the better ;-)

http://drsstc.com/~terrell/modeling/scantesla622.ZIP

This version also has the 10% to 90% streamer energy rise time calculated...

Cheers,

        Terry