KiCad Simulator gain is dBV (lp:#1772150)
Original report created by Andy (awmt102)
Application: kicad
Version: (5.0.0-rc2-dev-707-g2ed24a4), release build
Libraries:
wxWidgets 3.0.4
libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.3.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
Boost: 1.61.0
Curl: 7.43.0
Compiler: Clang 7.3.0 with C++ ABI 1002
Build settings:
USE_WX_GRAPHICS_CONTEXT=ON
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_SPICE=ON
When running the simulator with an ac sweep with an ac source of 20mV
amplitude I noticed that the 'gain' plot implied a loss (approx -30dB) for
my circuit. Running a transient analysis clearly shows a gain at the same
frequency. Looking into it further I realised that the "gain" is actually
not simple gain (dB), but is amplitude relative to 1V (dBV).
I imagine most people run ac analysis with 1V amplitude so would never
notice this (as the dB amplitude relative to 1V is equivalent to the actual
gain in this situation).
I propose that the "gain" axis either be configurable as dB gain or dBV
amplitude (and other potentially useful scales), or it remain as dB gain
but be corrected to account for the ac source amplitude (better option
IMO).
Original tags: ngspice