Simulation plot zoom-in displays incorrect Y-range

Bug #1674132 reported by Imre Deak
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Application: kicad
Version: (2017-03-18 revision 98e3bfb)-master, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.50.1 GnuTLS/3.5.3 zlib/1.2.8 libidn/1.33 librtmp/2.3
Platform: Linux 4.10.0-rc8+ x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.61.0
Curl: 7.50.1
KiCad - Compiler: GCC 6.2.0 with C++ ABI 1010
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=OFF
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=OFF

Simulating the following circuit:
http://electronics.stackexchange.com/questions/292901/capacitor-polarity-in-lamp-flasher

producing the following Spice .listing:

Circuit: KiCad schematic
KiCad schematic
1 : kicad schematic
2 : .global gnd
5114 : .model pn2222a npn (is=14.34f xti=3 eg=1.11 vaf=74.03 bf=255.9 ne=1.307 ise=14.34f ikf=.2847 xtb=1.5 br=6.092 nc=2 isc=0 ikr=0 rc=1 cjc=7.306p mjc=.3416 vjc=.75 fc=.5 cje=22.01p mje=.377 vje=.75 tr=46.91n tf=411.1p itf=.6 vtf=1.7 xtf=3 rb=10)
5138 : .model pn2907 pnp (is=650.6e-18 xti=3 eg=1.11 vaf=115.7 bf=231.7 ne=1.829 ise=54.81f ikf=1.079 xtb=1.5 br=3.563 nc=2 isc=0 ikr=0 rc=.715 cjc=14.76p mjc=.5383 vjc=.75 fc=.5 cje=19.82p mje=.3357 vje=.75 tr=111.3n tf=603.7p itf=.65 vtf=5 xtf=1.7 rb=10)
5428 : vv1 net-_q2-pad3_ 0 dc 8
5429 : rr1 net-_q2-pad3_ npnb 63k
5430 : rr2 npnb 0 5.6k
5431 : rr4 vout 0 200
5432 : cc1 vout npnb 22u
5433 : qq1 pnpb npnb 0 pn2222a
5434 : qq2 vout pnpb net-_q2-pad3_ pn2907
5435 : .save @vv1[i]
5436 : .save @rr1[i]
5437 : .save @rr2[i]
5438 : .save @rr4[i]
5439 : .save @cc1[i]
5440 : .save @qq1[ib]
5441 : .save @qq1[ic]
5442 : .save @qq1[ie]
5443 : .save @qq2[ib]
5444 : .save @qq2[ic]
5445 : .save @qq2[ie]
5446 : .save v(0)
5447 : .save v( 0 )
5448 : .save v(net-_q2-pad3_)
5449 : .save v(vout)
5450 : .save v(npnb)
5451 : .save v(pnpb)
5452 : .control
5453 : listing
5454 : .endc
5455 : .tran 100u 1
5457 : .end
Background thread stopped with timeout = 0
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Initial Transient Solution
--------------------------
Node Voltage
---- -------
net-_q2-pad3_ 8
npnb 0.631761
vout 7.88666
pnpb 7.17048
vv1#branch -0.040181
 Reference value : 0.00000e+00
No. of Data Rows : 10148

adding the following signals to the plot:
I(C1)
V(Vout)
V(npnb)
V(pnpb)

and then zooming in with the mouse cursor to the -7V to 15V, 0.4s to 0.45s Y/X range displays incorrectly the -4V to 18V, 0.4s to 0.45s Y/X range.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Please attach a test project.

tags: added: eeschema ngspice
Changed in kicad:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
michalstec (nnn4000)
Changed in kicad:
status: Expired → Confirmed
Revision history for this message
michalstec (nnn4000) wrote :

The incorrect zoom behaviour still exist and it's quite annoying. I changed to confirmed. When I try to zoom any waveform I mark the area I want to see with a mouse - the rectangle outline appears and I expect to see the marked area. Instead, different part of waveform is displayed, shifted up.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Please attach a project that shows this issue and include your KiCad version information

Changed in kicad:
status: Confirmed → Incomplete
Revision history for this message
michalstec (nnn4000) wrote :

Attached example: simple sinusoidal source, 1V, bipolar, 50Hz. Transient simulation 100ms. Try to zoom to see one period. Bottom of the waveform will be cropped (similar as in the picture attached in my previous post.

Application: KiCad
Version: 5.99.0-unknown-91c66a0~86~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-62-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.4.0 with C++ ABI 1011

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

michalstec (nnn4000)
Changed in kicad:
status: Incomplete → Confirmed
Changed in kicad:
milestone: none → 5.1.5
Changed in kicad:
status: Confirmed → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
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.