[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: very backward time step?



You're specifying a 10 ms step size (first parameter in the tran command), and 
it looks like that's what you're getting.  The period of a 60 Hz sine wave is 
16.6 ms, so you're getting fewer than 2 samples per cycle.  Try changing the 
step size to 1 ms and things should start to look better. 


In most simulations the solver would calculate additional intermediate time 
steps which would show up with 'trace all', but I'm guessing that your circuit 
model is so simple and linear that the solver just calculated the values at the 
requested time steps without creating any intermediate points.




----- Original Message ----
From: Chris Cole <clecol@xxxxxxxxx>
To: geda-user@xxxxxxxxxxxxxx
Sent: Tue, September 21, 2010 12:27:30 PM
Subject: Re: gEDA-user: very backward time step?

>
> On Tuesday 21 September 2010, Chris Cole wrote:
>    
>> I get a normal sine wave output,
>> but when the frequency increases, the wave changes
>> considerably and  starts to turn into a triangle wave...I'm
>> not sure what I'm doing wrong, but this is strange.
>>      
> In the tran command (tran 10m 10 1) you asked it to strobe at 1
> second intervals.  So, no matter what the signal, you get
> samples 1 second apart.
>
> If you add "trace all" to the tran command you will see all of
> the samples, which should produce a smoother waveform.
>
> How it works is a throwback to when people actually looked at
> ASCII plots.  It needs to change to make "trace all" the
> default, and have the strobe interval require a keyword "strobe"
> like spectre does.
>
> The actual time stepping is determined internally.  There will
> be extra steps internally if needed to get a proper simulation,
> but they are not displayed unless you ask for them.
>
>
>    
Even with the "trace all" added to my tran command:

#!/bin/bash
gnucap <<EOF
build
Vcc ( vin 0 ) sin offset=0. amplitude=24. frequency=60.
r1 ( vin 0 ) 1.K

list
print tran v(Vcc)
tran 10m 10 1 trace all > ac_test.gwave
!gwave ac_test.gwave
EOF
rm ac_test.gwave


I get a crazy waveform (attached)


Chris





_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user