cjsnare said:Hello.
I want to run a simulation using cadence(icfb). The simulation should show time transient result with a time varing resistor value. Basically, I want to assign the value of resistor as res = sin( w* time) + some offset. Is there any way to do this?
The value of the resistor should vary along with the time variable of a transient simulation.
Thank you!
v_c said:Actually you can model a resistor by using a voltage controlled current source or a current controlled voltage source. For example if you are going to use a voltage controlled current source, just make the gain of the source equal to 1. Then your applied (control) voltage source will be equal to inverse of the resistance of the controlled branch. Verilog is just fine, but you could accomplish the same thing by using the elements already available in any spice.
Best regards,
v_c
v_c said:both verilog-A and the controlled source are modeling i=Gv, where G is the conductance, so I believe they will be the same. I believe the code for the controlled source is very similar, if not identical, to the verilog-A model.
v_c said:I don't understand why this would be different. The VCCS is being used *exactly* as a resistor -- it has the same equation as the resistor! It is a current source, but it is a *controlled* current source, so it's output impedance is not necessarily high. Now if this was a independent current source, then I would say, yes the output impedance is very, very high. But having a controlled current source and having V/I ratio controlled makes this identical.
Here's some PSpice code
G1 1 2 value={v(1,2)/R}
in this source, the controlled current from node 1 to 2 is controlled by the voltage from 1 to 2 divided by R. PSpice allows you to enter in actual expression instead of a simple number for resistance R, so you can do something like
G1 1 2 value={v(1,2)/v(R)}
where the voltage from node R to 0 (ground) can be varied in any way you like (as long as it is not zero) to basically emulate a arbitrary, time-varying resistance.
So just put an *independent* voltage source at node R to ground and vary it anyway you like. You might have to put some resistance, say 10k, to ground from node R because PSpice might not like floating voltage source nodes.
Best regards,
v_c
Test time-varying resistance
E1 1 0 value={10*sin(time)}
R1 1 2 10
G1 2 0 value={v(2,0)/v(R)}
ER R 0 value={3 + 2*cos(time)}
RR R 0 10k ; arbitrary
.probe
.tran .01 10 0 .01 uic
.end
v_c said:Just try it and you will see it works.
I know what you are saying with the voltage, but an actual resistor which is varying will see the same thing.
Also note that current flows from 1 to 2 and the voltage that this depends on is also 1 to 2. This works -- trust me.
Code:Test time-varying resistance E1 1 0 value={10*sin(time)} R1 1 2 10 G1 2 0 value={v(2,0)/v(R)} ER R 0 value={3 + 2*cos(time)} RR R 0 10k ; arbitrary .probe .tran .01 10 0 .01 uic .end
Here I am modeling a resistor with resistance equal to 3+2*cos(time) ohms, so the resistance will vary from 1 to 5 ohms. This is set by the source ER, it can be set any way you like as long as there is something at node R, I am using the E sources as a convenient way to specify time sources. The G1 source is simply a resistor, its current depends on its voltage divided by R. Attached is a plot of V(2)/I(G1) which is in fact its output resistance.
You might have a different situation but I would like to see your evidence.
v_c said:That has absolutely no effect at all, because the voltage at R depends on the voltage source ER. I can put any value there at all as long as it is not zero. That value of RR is only there because PSpice does not like floating nodes.
v_c said:The node voltage at R is the *controlling* node so this is not really where the loading is going on. The actual resistor current is from node 2 to 0, so if you wanted to discuss loading this should be directed at node 2. Note that I am not trying to implement a current source like found on ICs -- this is not my purpose at all. And from your questions, I gather that you are thinking along the lines of practical implementation.
I am not saying that what I am showing can be implemented in reality -- that was not my purpose. If you have access to a simulator, just try it and you will see.
Node R is really "decoupled" from the rest of the circuit and does not interact with it.
It only influences v(R) which is used in the implemented resistor. So you can treat voltage at R as an independent voltage.
Best regards,
v_c
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?