08-27-2009 08:41 PM
I have an external Spice model I need to use on occasion. I alsways have trouble with this. It doesn't seem to be because I don't understand the models or know how spice works, but more that the conventions to define and get nodes hooked up correctly and various other aspects of MS are ambiguous to me.
Here is an NTC thermistor model and a multisim schematic I'm working on. I've tried a lot of things but haven't got the errors to go away. I've put it back the way I first started here.
This model is from:
http://www.ecircuitcenter.com/Circuits/therm_model1/therm_model1.htm
Can anyone explain how to get this NTC thermistor model to work in MS?
The 100V ramp at 1V/sec source is the temperature input to the model. (0-100C, 1 degC/sec on the grapher if I ever get that far)
Thanks,
David B
Solved! Go to Solution.
08-28-2009 09:39 AM
Hi David,
I think you pasted the entire netlist given on the webpage into Multisim's component wizard. I think this is the root of the problem. Really, all you need to enter into the Component Wizard are the following lines:
.SUBCKT NTC_10K_1 1 2 4 5
ETHERM 1 3 VALUE = { I(VSENSE)*10K*EXP( 3548/(V(4,5)+273) - 3548/(25+273) ) }
VSENSE 3 2 DC 0
.ENDS
The remaining lines that are given to you generate the stimulus, like the voltage source that you placed in your schematic.
I corrected this and attached the corrected circuit. Open this in Multisim and click Simulate>>Analyses>>DC Sweep and click Simulate. You should see the IV curve of the NTC resistor operating at different temperatures.
Hope that helps.
08-28-2009 09:39 AM
Hi David,
It looks like the SPICE file that that web page provides is for a test/demo circuit using the thermistor model. The component you're making in Multisim needs a single .MODEL or .SUBCKT, so you just need to remove the extra stuff from the model you're using in the thermistor.
In this case, you only need the four line NTC_10K_1 subcircuit. Everything else you see in the provided .cir is connected to the thermistor or an instance of the thermistor, not part of the thermistor model.
08-28-2009 01:09 PM
Dang, I should have looked closer. I was hung up on thinking I had node matching issues between MS and the model.
Thanks.
01-07-2010 03:40 PM - edited 01-07-2010 03:41 PM
01-08-2010 10:07 AM
Hi Speedyg8,
You can copy the component from MTC_10k_1.ms10 into another design and use it there. It will continue to work.
The thermistor in the example posted earlier actually only has two pins. The additional pins are added to the model to provide a convenient way to specify the input temperature. (The difference in voltage between Ra and Rb is the temperature in Celsius.) If you want to create a thermistor component with only 2 inputs, you will need another way to specify the temperature, and you have a couple of options. (I'm assuming here that you want the temperature to be constant with respect to time. If you need it to vary with time, you will need a slightly different approach.)
1. You could create a SPICE model that uses an instance parameter to specify the temperature. In this case, you will create a model where you can easily override the temperature. Your model will look something like:
.SUBCKT THERMISTOR 1 2 PARAMS:TEMPVAL=273
R1 1 2 {TEMPVAL} #Substitute with the actual function you want to use
.ENDS
TEMPVAL then becomes a parameter that you can use in your model. When you place the component, you can double click on the component, click Edit Model, and you will see a Current Instance Parameters. You can specify the instance temperature by typing PARAMS: TEMPVAL=300. The advantage of this approach is if you have multiple thermistors, you can independently set the temperature.
2. You could create a SPICE model that uses a globally defined parameter to specify the temperature. You model will look something like:
.SUBCKT THERMISTOR 1 2
R1 1 2 {TEMPVAL} #Substitute with the actual function you want to use
.ENDS
TEMPVAL then becomes a parameter than you must specify outside of the component. The easiest way to do this is to place an Arbitrary SPICE Block, (located in Basic > BASIC_VIRTUAL > ARBITRARY_SPICE_BLOCK), and set the global variable there.
.PARAM TEMPVAL = 273
3. There is a third option, to use the global, specified in the Analysis Options. I mention this only for completeness, but you might consider this approach if the other components in your design will be at the measured temperature.
I'll give you one final tip. The model in the posts above uses sources to emulate the resistive behaviour, whereas in my examples, I've used resistors directly. Multisim can use equations (identified by the curly braces) to specify the resistance, so you don't need to use sources to get the desired behaviour.
01-08-2010 05:14 PM
You can also right click on the part and add it to your library from right out of the schematic.
David B
01-11-2010 02:52 PM
>The easiest way to do this is to place an Arbitrary SPICE Block, (located in Basic > BASIC_VIRTUAL > ARBITRARY_SPICE_BLOCK), and set the global variable there.
In Multisim 10.1 Pro, I could not locate "Basic > BASIC_VIRTUAL > ARBITRARY_SPICE_BLOCK" could this have changed recently? There is not reference to it in Help either.
01-11-2010 03:13 PM
Have a look again. I checked all Professional versions of Multisim and it was there.
In the component reference, it is topic Basic Components > Arbitrary SPICE Block.
01-11-2010 09:41 PM
My version doesn't have it. I guess I'll have to see about upgrading our support subscription.
Anyway, thanks for your help.