Whats wrong with the sinusoidal generator SOLVED

Hi there!

I tried to simulate nothing more than a sinusoidal genarator and just connected its negative pin to ground and the other one to a 'NodeName'.

When I want to simulate it, there is no sinusoidal curve, but a curve I would call pure crap ...

Anything known about this? ... Can I post Images to this support forum? Just to show what my problem is about ...

by StefanK
July 18, 2013

... ASCII Art won't work so I give it a another try:

That's the very very very basic circuit.... but the time simulation of the voltage signal generator doesn't show a sine signal don't know how to describe the resulting curve:

Any idea?

by StefanK
July 18, 2013

@StefanK,

Hi and welocme to CL.

Sorry you'e having problems.

If you make your circuit Unlisted or Public, by doing this:

https://www.circuitlab.com/blog/2012/06/07/unlisted-circuits-easier-sharing-of-schematics/

then we can all have a look and maybe offer some suggestions.

If you have a simulation problem it is much easier to diagnose what may be going wrong if you post the sim rather than just pictures of it or the plots.

In the meanwhile have a read of:

https://www.circuitlab.com/docs/

and in particular:

https://www.circuitlab.com/docs/the-basics/#time_domain_simulation

plus:

https://www.circuitlab.com/docs/faq/

and then have a play with:

by signality
July 18, 2013

Hi @StefanK, I also can't see your circuit so it's hard for me to know exactly what's going on (please make "public" or "unlisted"), but it's possible that such a curve comes from aliasing / undersampling of a signal. For example, if you drop in the normal Voltage Function Generator and leave the normal parameters (1kHz, etc) and then choose a transient time step of some integer multiple of 1 millisecond, you are essentially just sampling one of the zero-value points on each cycle of the sine wave.

If T = N/1000 (i.e. 1ms timestep), this leaves you only seeing a little bit of round-off error from the computer's sin(2*PI*1000*T) = sin(2*PI*1000*N/1000) = sin(2*PI*N) calculation, which due to finite precision of the computer's math functions, leaves a little trace down in the picovolts range. When I try this, I get a very similar trace to the screenshot you posted.

Try reducing the timestep substantially, for example to 1/FREQ/10, or "100u" or less for a 1kHz sine source. Let us know if that works!

by mrobbins
July 18, 2013

Hi there ... I allready marked it 'solved' but you're right ... I've forgotten to post an explanation ... you're totally right ... I did not adjust the step size and so I got a terrible undersampling effect ... everything is ok now ... apart from your way to generate money. I'm just a hobby user ... and don't like time restrictions ... $5 a month? Since there are plenty of free alternatives ... sorry ... even if your software is really good ... a model in which one publishes circuits or circuit parts and thus generates "free time" I consider to be more appropriate for hobbyists ... Greetings from Germany, Stefan

by StefanK
July 19, 2013

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.