|
From: Dominique M. <dom...@ho...> - 2005-03-03 14:04:46
|
It is my first post so i will introduce myself. I am a swiss citizen living in Sweden. I have a children, a little boy. I am a free believer, that mean at i believe to a better world, here and now. We have only to have a such goal and to work to get it. That's all! I am also engineer in both electricity and electronic with speciality in radio-TV and DSP. My greatest personal interest is vacumm tubes because i am a guitarist and the best guitar amplifiers are still made with these devices. I apologize for my english that is very poor, i have learn it only a few months at school... ########################## Now for my problem. I have installed ngspice from the gEDA tarbal and all seam to work fine. To learn the program and do some work at the same time, i have begun to do some library. The first device i nead is a double diode, the GZ34. I have the Pspice model model i get from http://www.digilander.libero.it/paeng/vacuum_diode_models.htm I have first test it with LTspice and all is working fine. I have modified the model to get 2 diodes in the device and put some () to get ride from an error. Like ngspice don't recognize the .PARAMS, the PWR and the PWRS, i have begun to change the model to get it to work. As i run the simulation, i get "Error: too few nodes: else" I was trying a lot to get it to work but nothing i was trying was working. In the files, only the first diode is modified with an IF THEN ELSE (for the PWRS). If i use 2 diode like the second one, the simulation is working but the result is wrong because the model don't have the part with the PWRS. From the psice doc, i get: PWR(x,y) abs(x)^y PWRS(x,y) +abs(x)^y (if x>0) -abs(x)^y (if x<0) Can somebody help me with this. I can't get the IF THEN ELSE to work. Or maybe is it a better way to go, i don't know. An exempel or a link to some exemple using a such if the else can be very usefull to me. The files GZ34.lib and GZ34.lib.pspice are the model files for respectively ngspice and LTspice. The files gz34IaUa.cir and gz34IaUa.cir.spice are the simulation for ngspice and LTspice. It is a simple test to get the Ia=f(Ua) caracteristic of the device to be abble to compare it with the data sheet. Dominique Michel _________________________________________________________________ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp |