Author 
Topic 

James
2 Posts 
Posted  Nov 01 2019 : 09:14:55

Hello, I use *.spice file generated from FastHenry in MicroCap, and AC simulation gives me negative resistance and negative inductance. I correct this by changing the sign in the spice model. Can be this corrected by MakeLnegative utility? Can I generate rom.m file with statespace model (A,B,C,D matrix)? Or how can I get these matrices from *.spice model?
Thanks, James


Enrico
531 Posts 
Posted  Nov 03 2019 : 19:49:13

Hi James,
I'm not sure which is the *.spice file generated by FastHenry you refer to.
Is this the one you get using the 'MakeLCircuit' utility or the one you get from FastHenry as statespace model?
I am not sure by your simulator would give you negative resistance and inductance. I don't know MicroCap; is this able to handle negative K (inductive coupling) in the Spice input file? MakeLnegative is done to cope with simulators not able to specify negative values for the Spice K element.
You can anyway surely generate space state models (this is why I guess the first *.spice file you talked about is possibly generated via MakeLCircuit), you find full details on how to do that in the FastHenry User's Guide (pag 20).
Best Regards, Enrico



James
2 Posts 
Posted  Nov 05 2019 : 12:56:22

Hi Enrico, I refer to the file generated with the option “–r order“ that creates the frequencydependent model. The problem with the matrix sign in Microcap is solved. if the current source is used, then everything is OK (I will check the syntax for this). The description of –r option should generate rom.m file that contains statespace A, B, C, D matrixes. The file is generated if debug is on (thanks for source codes). Best regards, James




Topic 


