KiCad Simulator gain is dBV

Bug #1772150 reported by Andy
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
New
Unknown

Bug Description

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).

Tags: ngspice
Revision history for this message
Jeff Young (jeyjey) wrote :

At a minimum we need to at least label the gain axis.

Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I have changed the units to dBV for now. I do not mark the bug as fixed, as there are more appropriate solutions.

tags: added: ngspice
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1777

Changed in kicad:
status: Confirmed → Expired
Changed in kicad:
importance: Medium → Unknown
status: Expired → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.