not being able to run laser_driver simulation

Asked by Cristiano Gavião on 2016-10-07

Hello,

I'm using latest KiCad and trying to run the provided demo simulation schemas.
When I run the demo laser-driver simulation I'm receiving many errors on the console (below).
Am I missing something ?

thanks.

Application: kicad
Version: 201610061319+7281~55~ubuntu16.04.1-, release build
Libraries: wxWidgets 3.0.2
           libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-38-generic x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.58.0
Curl: 7.47.0
KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_SCH_IO_MANAGER=OFF
                  KICAD_USE_OCE=ON

Circuit: KiCad schematic
Warning: Model issue on line 1 :
.model laser d(is=1e-22 rs=6 n=1.5 cjo=50p xti=100 iave=160m vpk=5) ...
unrecognized parameter (iave) - ignored
unrecognized parameter (vpk) - ignored
Error on line 0 :
a$poly$e.xu1.eos %vd [ xu1.20 xu1.98 ] %vd ( xu1.3 net-_r2-pad1_ ) a$poly$e.xu1.eos
MIF-ERROR - unable to find definition of model a$poly$e.xu1.eos
Warning: Model issue on line 0 :
.model a$poly$e.xu1.eos spice2poly coef = [ 2e-3 1 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$f.xu1.fbn %vnam [ v.xu1.vnoise3 ] %id ( net-_c1-pad1_ xu1.98 ) a$poly$f.xu1.fbn
MIF-ERROR - unable to find definition of model a$poly$f.xu1.fbn
Warning: Model issue on line 0 :
.model a$poly$f.xu1.fbn spice2poly coef = [ 50e-6 1e-3 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$f.xu1.fbp %vnam [ v.xu1.vnoise3 ] %id ( net-_r2-pad1_ xu1.98 ) a$poly$f.xu1.fbp
MIF-ERROR - unable to find definition of model a$poly$f.xu1.fbp
Warning: Model issue on line 0 :
.model a$poly$f.xu1.fbp spice2poly coef = [ 50e-6 1e-3 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$g.xu1.gcm %vd [ xu1.98 0 xu1.30 0 ] %id ( xu1.98 xu1.7 ) a$poly$g.xu1.gcm
MIF-ERROR - unable to find definition of model a$poly$g.xu1.gcm
Warning: Model issue on line 0 :
.model a$poly$g.xu1.gcm spice2poly coef = [ 0 1e-5 1e-5 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$e.xu1.eref %vd [ vdd 0 vss 0 ] %vd ( xu1.98 0 ) a$poly$e.xu1.eref
MIF-ERROR - unable to find definition of model a$poly$e.xu1.eref
Warning: Model issue on line 0 :
.model a$poly$e.xu1.eref spice2poly coef = [ 0 0.5 0.5 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$e.xu1.ecmref %vd [ net-_r2-pad1_ 0 net-_c1-pad1_ 0 ] %vd ( xu1.30 0 ) a$poly$e.xu1.ecmref
MIF-ERROR - unable to find definition of model a$poly$e.xu1.ecmref
Warning: Model issue on line 0 :
.model a$poly$e.xu1.ecmref spice2poly coef = [ 0 0.5 0.5 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$f.xu1.fout1 %vnam [ v.xu1.vo1 v.xu1.vcur1 ] %id ( 0 vdd ) a$poly$f.xu1.fout1
MIF-ERROR - unable to find definition of model a$poly$f.xu1.fout1
Warning: Model issue on line 0 :
.model a$poly$f.xu1.fout1 spice2poly coef = [ -9.27e-3 1 -1 ] ...
Unknown model type spice2poly - ignored
Error on line 0 :
a$poly$f.xu1.fout2 %vnam [ v.xu1.vo2 v.xu1.vcur2 ] %id ( vss 0 ) a$poly$f.xu1.fout2
MIF-ERROR - unable to find definition of model a$poly$f.xu1.fout2
Warning: Model issue on line 0 :
.model a$poly$f.xu1.fout2 spice2poly coef = [ -9.27e-3 1 -1 ] ...
Unknown model type spice2poly - ignored
Reducing trtol to 1 for xspice 'A' devices
Doing analysis at TEMP = 27,000000 and TNOM = 27,000000
Warning: vv1: no DC value, transient time 0 value used
Note: Starting dynamic gmin stepping
Trying gmin = 1,0000E-03 Note: One successful gmin step
Trying gmin = 1,0000E-04 Note: One successful gmin step
Trying gmin = 1,0000E-05 Note: One successful gmin step
Trying gmin = 1,0000E-06 Note: One successful gmin step
Trying gmin = 1,0000E-07 Note: One successful gmin step
Trying gmin = 1,0000E-08 Note: One successful gmin step
Trying gmin = 1,0000E-09 Note: One successful gmin step
Trying gmin = 1,0000E-10 Note: One successful gmin step
Trying gmin = 3,1623E-11 Note: One successful gmin step
Trying gmin = 1,0000E-11 Note: One successful gmin step
Trying gmin = 5,6234E-12 Warning: Further gmin increment
Trying gmin = 8,6596E-12 Note: One successful gmin step
Trying gmin = 8,0584E-12 Warning: Further gmin increment
Trying gmin = 8,5053E-12 Warning: Further gmin increment
Trying gmin = 8,6208E-12 Note: One successful gmin step
Trying gmin = 8,5628E-12 Warning: Further gmin increment
Trying gmin = 8,6063E-12 Note: One successful gmin step
Trying gmin = 8,5990E-12 Note: One successful gmin step
Trying gmin = 8,5918E-12 Warning: Further gmin increment
Trying gmin = 8,5972E-12 Warning: Further gmin increment
Trying gmin = 8,5986E-12 Warning: Further gmin increment
Trying gmin = 8,5989E-12 Note: One successful gmin step
Trying gmin = 8,5988E-12 Note: One successful gmin step
Trying gmin = 8,5987E-12 Warning: Last gmin step failed
Warning: Dynamic gmin stepping failed
Note: Starting source stepping
Supplies reduced to 0,0000% Note: One successful source step
Supplies reduced to 0,1000% Note: One successful source step
Supplies reduced to 0,2000% Supplies reduced to 0,1000% Note: One successful source step
Supplies reduced to 0,1100% Note: One successful source step
Supplies reduced to 0,1250% Note: One successful source step
Supplies reduced to 0,1475% Note: One successful source step
Supplies reduced to 0,1812% Note: One successful source step
Supplies reduced to 0,2319% Note: One successful source step
Supplies reduced to 0,3078% Note: One successful source step
Supplies reduced to 0,3837% Note: One successful source step
Supplies reduced to 0,4977% Note: One successful source step
Supplies reduced to 0,6685% Note: One successful source step
Supplies reduced to 0,9248% Supplies reduced to 0,6685% Note: One successful source step
Supplies reduced to 0,6813% Supplies reduced to 0,6685% Note: One successful source step
Supplies reduced to 0,6704% Note: One successful source step
Supplies reduced to 0,6733% Note: One successful source step
Supplies reduced to 0,6748% Note: One successful source step
Supplies reduced to 0,6769% Supplies reduced to 0,6748% Note: One successful source step
Supplies reduced to 0,6749% Note: One successful source step
Supplies reduced to 0,6750% Note: One successful source step
Supplies reduced to 0,6753% Note: One successful source step
Supplies reduced to 0,6756% Note: One successful source step
Supplies reduced to 0,6762% Supplies reduced to 0,6756% Note: One successful source step
Supplies reduced to 0,6757% Note: One successful source step
Supplies reduced to 0,6758% Note: One successful source step
Supplies reduced to 0,6760% Supplies reduced to 0,6758% Note: One successful source step
Supplies reduced to 0,6759% Note: One successful source step
Supplies reduced to 0,6759% Note: One successful source step
Supplies reduced to 0,6760% Note: One successful source step
Supplies reduced to 0,6761% Supplies reduced to 0,6760% Note: One successful source step
Supplies reduced to 0,6760% Note: One successful source step
Supplies reduced to 0,6760% Note: One successful source step
Supplies reduced to 0,6760% Note: One successful source step
Supplies reduced to 0,6761% Warning: source stepping failed
Transient solution failed -
Last Node Voltages
------------------
Node Last Voltage Previous Iter
---- ------------ -------------
/in 0 0
vss -0,0676045 -0,0676092
xu1.3 1,20511e-06 1,20512e-06
xu1.5 0,525991 0,525995
vdd 0,0676045 0,0676092
xu1.4 2,73903e-08 2,73336e-08
xu1.6 -0,525988 -0,525992
net-_r2-pad1_ 2,23824e-08 2,23348e-08
xu1.98 0,134774 0,134722
net-_c1-pad1_ 2,73903e-08 2,73336e-08
xu1.16 0,278645 0,278599
xu1.17 0,134774 0,134722
xu1.18 0,134774 0,134722
xu1.7 0,134776 0,134723
xu1.8 0,0552329 0,0552367
xu1.9 -0,0552329 -0,0552367
xu1.14 0,134776 0,134723
xu1.15 0,134776 0,134723
xu1.19 0,134774 0,134722
xu1.21 0,138357 0,138305
xu1.20 0,134774 0,134722
xu1.22 0,134774 0,134722
xu1.24 0,138661 0,13861
xu1.23 0,134774 0,134722
xu1.13 0,134776 0,134723
xu1.40 0,31119 0,3111
xu1.26 0,134774 0,134722
xu1.27 0,134774 0,134722
xu1.90 0,0676045 0,0676092
xu1.91 -0,0676045 -0,0676092
xu1.10 0,134776 0,134723
net-_q1-pad2_ 0,134776 0,134723
xu1.11 0,131767 0,131715
xu1.12 0,137784 0,137732
/out 5,31582e-08 5,30452e-08
net-_c1-pad2_ 5,35079e-08 5,33942e-08
v.xu1.voc#branch 9,52025e-12 9,50619e-12
v.xu1.vnoise3#branch 0 0
v.xu1.vnoise1#branch 3,55271e-15 3,55271e-15
v.xu1.vsl#branch 2,89249e-12 2,89312e-12
v.xu1.v1#branch 5,78497e-12 5,7863e-12
e.xu1.epole#branch 0 0
vv3#branch -2,00172e-07 -2,00203e-07
vv2#branch -2,00437e-07 -2,00468e-07
v.xu1.vcl4#branch 4,2419e-15 4,2422e-15
v.xu1.vcl3#branch 4,2419e-15 4,2422e-15
v.xu1.vo2#branch -4,76012e-12 -4,7531e-12
v.xu1.vo1#branch 4,76012e-12 4,7531e-12
v.xu1.vcur2#branch -1,86373e-13 -1,86336e-13
v.xu1.vcur1#branch 9,33388e-12 9,31985e-12
v.xu1.vnoise4#branch -5,50903e-15 -5,50942e-15
v.xu1.vnoise2#branch -5,06891e-15 -5,06927e-15
v.xu1.vcl2#branch 1,99975e-13 1,99926e-13
v.xu1.vcl1#branch -2,86128e-13 -2,85567e-13
vv1#branch 1,3989e-10 1,39593e-10
doAnalyses: Too many iterations without convergence
run simulation(s) aborted

Question information

Language:
English Edit question
Status:
Solved
For:
KiCad Edit question
Assignee:
No assignee Edit question
Solved by:
Wayne Stambaugh
Solved:
2016-10-07
Last query:
2016-10-07
Last reply:
2016-10-07
Wayne Stambaugh (stambaughw) said : #1

The polynomial library cannot be found due to a broken spice configuration. The spice simulation configuration is a known issue on windows and osx that is still being resolved. There should be enough information in this mailing list thread[1] to resolve your problem. Hopefully we will get this resolved in the not too distant future.

[1]: https://lists.launchpad.net/kicad-developers/msg26494.html

Cristiano Gavião (cvgaviao) said : #2

Hey Wayne, thank for the info.
Perhaps I didn't understood right, but the link you provided have a workaround that is related to Windows.

I'm using Ubuntu and installing the nightly build from PPA.

I was not able to find .spiceinit file in my installation...

Best Wayne Stambaugh (stambaughw) said : #3

On 10/7/2016 10:43 AM, Cristiano Gavião wrote:
> Question #402843 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/402843
>
> Status: Answered => Open
>
> Cristiano Gavião is still having a problem:
> Hey Wayne, thank for the info.
> Perhaps I didn't understood right, but the link you provided have a workaround that is related to Windows.
>
> I'm using Ubuntu and installing the nightly build from PPA.
>
> I was not able to find .spiceinit file in my installation...
>

I'm surprised this does not work. Depending on the ngspice install
path, copy the file install_path/share/ngspice/spinit to ~/.spiceinit.
Verify that the .cm file paths are correct. By default the .cm files
will be installed in install_path/lib/ngspice/*.cm. Verify that the .cm
files are install. If the .cm file paths listed in the .spiceinit file
are not correct, edit them accordingly. If that doesn't work, I'm not
sure what the next step would be. The are several environment variables
that are helpful such as SPICE_INIT and SPICE_LIB_DIR. See the ngspice
documentation for more information.

Cristiano Gavião (cvgaviao) said : #4

Interesting, the problem was that the ngspice package was not installed, only libngspice-kicad.
Perhaps would be interesting to require ngspice installation when libngspice-kicad were installed.

Cristiano Gavião (cvgaviao) said : #5

Thanks Wayne Stambaugh, that solved my question.

Wayne Stambaugh (stambaughw) said : #6

On 10/7/2016 5:43 PM, Cristiano Gavião wrote:
> Question #402843 on KiCad changed:
> https://answers.launchpad.net/kicad/+question/402843
>
> Status: Answered => Solved
>
> Cristiano Gavião confirmed that the question is solved:
> Interesting, the problem was that the ngspice package was not installed, only libngspice-kicad.
> Perhaps would be interesting to require ngspice installation when libngspice-kicad were installed.
>

On Debian, libngspice is not built as a shared object so it doesn't work
for kicad so we provide our own shared object version. I don't know if
Ubuntu is using Debian's ngspice package build code but I'm guessing
they do. There is a bug report along with patches to resolve this on
the Debian ngspice package page but the last I looked, the Debian
package maintainer didn't seem that interested in fixing the issue.