Altium Designer Simulation - Page 1
Forum section: electronics / projects

author: msimunic
author_rank: Contributor
timestamp: July 14, 2021, 03:45:33 pm
content: I'm traying to figure out how to do simulation in Altium Designer.I'm trying to simulate complex resistor (ie. RF resistor, with inductance, capacitances, etc.) and I would like to use component parameter as value for the model parameter.I'm trying to write this model as sub-circuit.Regarding usage of component parameter.There is parameter named Value.If I chose model type to be Resistor, then it automatically behind the scene use the component parameter "Value" as parameter inside the model for the resistance value of the resistor part.Great, but I want to use more detailed model of the resistor and I want to use this component parameter Value, and I won't to use other component parameters as package type or pad size, or what ever I need to use in my model. Because I don't want to use 1000 different models for 1000 resistors which differences vary in package, resistance and type.So I came up that I need to use something like this:Code:****************************************************************** Resistor Model *.SUBCKT RESISTOR 1 2R1 1 2 RES.MODEL RES R (Value).ENDS RESISTOR***********But I get the orange exclamation mark for the simulation schematic and model of the resistor. Not sure why, what's wrong with the model.And, yes, I don't know how to automatically input the part property/parameter "Value" into model parameter "Value".Regarding the Altium - little bit of complaining.One of the annoyance is that there is updated GUI and there is no consistent detailed documentation about the tool. Not for old GUI ,ad not for new one.The tool is a Simulator in Altium. There is few ways how to make a simulation, how to describe the part with some kind of model, different language supported, PSpice, LTSpice, MixSim (whatever).But, docs about all those things are fuzzy and lacking the plain and simple explanation how in details simulator is working, what does it expect as input, who it connects all this together...And, example of how to make one simple simulation from start.

author: 2N3055
author_rank: Super Contributor
timestamp: July 14, 2021, 05:54:56 pm
content: Just use LTSpice. It has tons of tutorials, examples, models, internet support groups...It's pretty much standard, unless your company explicitly forbids it...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 14, 2021, 09:18:06 pm
content: I mean, AD does basically everything LTSpice does, you don't really need the one when you have the other.Also, this is AD21? They finally revamped the simulation system, which I haven't touched yet (still haven't needed to, alas!) but it should be easier to use.As for the model, I forget if you can specify VALUE in a resistor MODEL. That's a PSPICE thing I think? Outside of it I think it's only for tempco stuff. Instead of "RES", put in {Value}.Which, watch out for that if you import any PSPICE models. Unless they changed it, transistor dimensions are also per-instance, not per-model. So you have to copy all the L, W, AD, AS etc. parameters over.Or make a voltage-controlled resistor:Bres n1 n2 I={V(n1, n2) * Value}Tim

author: msimunic
author_rank: Contributor
timestamp: July 15, 2021, 03:30:02 pm
content: Thank you Tesl4co1l,The thing is that Altium complains about the model if it's written as:Code:*Resistor Subcircuit Model.SUBCKT MYRES 1 2R 1 2 {Value}.ENDS MYRES

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 15, 2021, 03:53:42 pm
content: Try,.SUBCKT MYRES 1 2 PARAMS: Value=1should be able to set it to {Value} in the model instance.I... forget offhand if parameters are scoped or local exclusive. Not being able to use {Value} inside the model, does seem to suggest it's local only (i.e., global scope is not accessible within the model). Which also suggests the apparent duplication should be okay because they're two namespaces (i.e., literally doingValue={Value}, but you can of course name it whatever on either side).You can put.PARAMs inside theSUBCKTas well, if you like (they'll be fixed, and inaccessible from outside the scope).Alternately, you don't need aSUBCKTfor just a resistor, you can put in a normal resistor part and use{Value}on the schematic. Not helpful once you want to scale up to actual networks, of course...As example of a fleshed-out network, take this, say?https://www.seventransistorlabs.com/Modeling/SPICE/Coilcraft_1206CS-102.cktNote the eponymousSUBCKTat the top takes noPARAMS, and sets them all of the subsequentSUBCKT. The general model in turn has some shortcut.PARAMs, and finally calls in one more networkRDIFF. (The overall result is a network that well approximates the real component. For more detail see:https://www.seventransistorlabs.com/Modeling/and related pages.)Tim