Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nutmeg equations using Fourier results of LM386 #480

Closed
tomhajjar opened this issue Jan 21, 2024 · 8 comments
Closed

Nutmeg equations using Fourier results of LM386 #480

tomhajjar opened this issue Jan 21, 2024 · 8 comments
Labels

Comments

@tomhajjar
Copy link

tomhajjar commented Jan 21, 2024

I can't figure out how to plot in dB the Four(v(out)).

If I drive the LM386 into distortion, the dB FFT plot, S_dB=db(v(out)) clearly shows the distortion while the linear plot of Four(v(out)) does not. The Nutmeg equation menu does allow Four as a "Used simulation" so I chose fft. Another issue is figuring out what "variable" to use.

2024-01-21_112633

2024-01-21_112647

2024-01-21_112557

2024-01-21_114118

LM386.zip

@csrabak
Copy link

csrabak commented Jan 21, 2024

Just for the sake of dividing and conquering, have you tried a minimum example directly in ngspice?

I'm lost about some results of it alone itself (including the one already reported by you @tomhajjar )

@tomhajjar
Copy link
Author

tomhajjar commented Jan 21, 2024

Unfortunately out of the 600+ examples provided by the ngspice team only one uses Fourier, 100W.cir.

I have not seen any Qucs-S examples use Nutmeg to process the Fourier data points.

@ra3xdh
Copy link
Owner

ra3xdh commented Feb 1, 2024

#513 should resolve this problem.

@ra3xdh ra3xdh linked a pull request Feb 1, 2024 that will close this issue
@ra3xdh
Copy link
Owner

ra3xdh commented Feb 1, 2024

My comment above was wrong. The attaching of Nutmeg equations is not allowed to FOUR simulation. The variables are only printed in the console or exported to the text file. Ngspice manual recommends to use FFT if the postprocessing with Nutmeg is needed.

@ra3xdh ra3xdh closed this as completed Feb 1, 2024
@ra3xdh ra3xdh added the question label Feb 1, 2024
@ra3xdh ra3xdh removed a link to a pull request Feb 1, 2024
@tomhajjar
Copy link
Author

tomhajjar commented Feb 8, 2024

Vadim can you show how to use Nutmeg to get Four in dB?

Using the "Log left axis grid" setting blanks the screen

2024-02-08_145428

AudioIC_prj.zip

@ra3xdh
Copy link
Owner

ra3xdh commented Feb 9, 2024

Vadim can you show how to use Nutmeg to get Four in dB?

It is not possible by design. The FOUR results could be only printed in terminal. Ngspice manual recommends to use Spectrum analysis (FFT) instead.

@csrabak
Copy link

csrabak commented Feb 19, 2024

Am I doing something absolutely wrong running this example with ver 24.1?

I made two different schematics to circumvent the issue of not allowing FFT and AC in same.

When I run the AC one, the delay calculation doesn't get the older results:

export-delay

@tomhajjar
Copy link
Author

You should attach your files so others can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants