SPICE - Frequency dependent resistor model

Hi,

I would like to know if there is any way to include a resistor with frequency dependence in SPICE. Specifically, I am looking for some spice element that has a voltage current relationship given by

V / I = k * (w ^ 2) where k is a constant and w is the angular frequency

I'm working on an electroacoustical model of a microphone. For those who are not familiar with this, electroacoustic circuits are equivalent analog electical models of acoustic devices. Different acoustic elements are transformed into equivalent resistances, capacitances, etc. So please note that the resistance that I refer to is NOT a real electrical resistance. It is just an equivalent model.

I tried looking into all the user manuals that I could lay my hands on, but am unable to find anything that I can use. I am an absolute newbie when it comes to SPICE, so I'm not even sure if this can be done in SPICE at all. I would be grateful if you could either tell me how to do this or tell me where I may find this information. Any help would be greatly appreciated.

Thanks,

Aravind

Reply to
aravindalwan
Loading thread data ...

formatting link

Reply to
JeffM

You can use Laplace transforms to make frequency dependent resistors for AC simulations. See

formatting link
for ideas on making resistors out of voltage and current sources. I like using current sources to make variable resistors. Some flavors of Spice (LTspice and PSpice come to mind) allow you to use Laplace transforms in the E and G devices.

--
Mark
Reply to
qrk

For an explanation from the PSpice folks, go to

formatting link
and select Item 2. That example deals with frequency dependent inductors where Z = Ls. Since a resistor is simply Z = R without the trailing s, follow the example but exclude the trailing s. You will have to use the abs(s)/6.283185 operator as your frequency dependence since abs(s)/6.283185 = f. Good luck.

Reply to
Bob Penoyer

Thanks everybody for your replies. I guess my searches weren't comprehensive enough, and I apologise for not having checked out all the threads before posting a new one.

Jeff : Although I had already seen the post on modeling skin effect in resistors, I found the following relevant post when I searched in Google groups as you suggested. It refers to modeling the resistance as a function of frequency using the .PARAM command

formatting link

qrk (Mark) : That was a great link that you posted. I found many useful ideas for simulating a resistor using controlled current and voltage sources. I will try incorporating Laplace transforms to model frequency dependence as you suggested.

Bob : This looks like a possible solution to the problem of incorporating frequency dependence. I think it can be combined along with Mark's idea above to do the job.

I will try out the various possibilities and post the results. Thanks again for all your help. It's been a great learning experience.

Aravind.

Reply to
aravindalwan

I think that only works for one specific value of "hertz", or stepping thru a .AC; certainly not for .TRAN

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
     It\'s what you learn, after you know it all, that counts.
Reply to
Jim Thompson

I tried the .PARAM option without much sucess. I keep getting the error "illegal parameter value: hertz". I substituted HERTZ with other variants, like FREQ, but got the same error. Finally I tried OMEGA and got an error message saying that OMEGA is a state variable and cannot be used in a parameter expression.

The other solution of using voltage controlled current sources works beautifully. I used a GLAPLACE device and was successfully able to use it to replace the capacitor in an RC circuit. I guess it should work for any other element whose transfer function is known beforehand. My problem is solved !

Thanks again for all your help.

Reply to
aravindalwan

Regarding my earlier post in this thread: The technique for which I provided a link works fine for frequency domain simulations. No surprise there. But I haven't been able to use the same frequency-dependent resistor model in time domain simulations. Are you aware of how to use such a frequency-dependent resistor model in both the frequency and time domains?

Reply to
Bob Penoyer

As snipped-for-privacy@gmail.com discovered, it has to be a "GLAPLACE" or an "ELAPLACE" device. I know that this works in PSpice, but I don't know about the others.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
     It\'s what you learn, after you know it all, that counts.
Reply to
Jim Thompson

ELAPLACE and GLAPLACE do not seem to be part of Berkeley Spice, but perhaps some may find a "B" non-linear dependant source source will do the job for them.

--
JosephKK
Gegen dummheit kampfen die Gotter Selbst, vergebens.  
--Schiller
Reply to
Joseph2k

perhaps

No that's not possible. Going from frequency domain to time domain requires a convolution and this is not supported by the Berkeley spice engine. This could be added with the XSPICE interface and would indeed be a nice add-on.

Maybe someone, someday...

--
Thanks,
Fred.
Reply to
Fred Bartoli

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.