0
\$\begingroup\$

I'm sure there is a really simple explanation for this, but I can't seem to figure it out. I am sweeping the series resistance of the source voltage and I am trying to see the transfer function output.

When plotting the \$V(out)\$ and \$V(in)\$ plots separately, the different plots are shown for increasing values of series resistance. However, when I "add trace" as \$\frac{V(out)}{V(in)}\$, only one plot appears. How do I get plots of \$\frac{V(out)}{V(in)}\$ for all the different values of series resistance?

Alternatively, is there a way I can plot \$\frac{V(out)}{V(in)}\$ directly rather than going into the waveform viewer and using "add trace"?

6 plots of V(out) for sweep in series resistance, 6 plots for V(in), Only one plot for V(out)/V(in)

Any insight on this problem would be greatly appreciated.

\$\endgroup\$
4
  • \$\begingroup\$ Why do you think that it's different for every step? Looks to me that there's a 6 dB difference between vout and vin for every step in the beginning, so it should just be a single line, and it also matches at the end. \$\endgroup\$
    – pipe
    Commented Jun 26, 2019 at 16:51
  • \$\begingroup\$ This might not meet your definition of 'directly', but I've just discovered bv, behavioural voltage source, and am over-using it. On the schematic, place a bv, with an expression =V(out)/V(in), then plot the output of that. \$\endgroup\$
    – Neil_UK
    Commented Jun 26, 2019 at 17:00
  • \$\begingroup\$ To compute Sensitivity on the other hand is just a derivative of dG(s)/dR \$\endgroup\$
    – D.A.S.
    Commented Jun 26, 2019 at 18:01
  • \$\begingroup\$ @pipe Nice catch. There is a consistent difference between V(out) and V(in) which is why all the plots are overlaid and it looks like there's only one plot. I should have caught that earlier. Appreciate the help. \$\endgroup\$ Commented Jun 26, 2019 at 19:11

2 Answers 2

1
\$\begingroup\$

If you're using a voltage source as the input and if the input resistance is part of the builtin parasitic (Rser) then you don't need to plot V(out)/V(in), V(out) will suffice. Otherwise, the behavioural source suggested in the comments and answer will do.

If you want to plot the result of a single value from the .STEP command, then use the @<step_number> selector, for example V(out)@3 will plot V(out) with the results from the third step. This also works for V(out)@3/V(in)@3, and you can make combinations, V(out)@3/V(in)@2.

The @ selector will not work in the behavioural source expression for obvious reasons: the behavioural expression needs to be evaluated at runtime, the latest, so you can't use V(out)@2 before the first step has been run, for example.

\$\endgroup\$
1
  • \$\begingroup\$ Must've been in a rush because a behavioural source involving division will not work, since it's considered a nonlinear operation and its outcome cannot be linearized (dependent on the parameters of the simulation, not the circuit, itself). \$\endgroup\$ Commented Dec 9, 2022 at 10:06
0
\$\begingroup\$

One way would be to add a b-source (bv in the device list) with the function equal to V(out)/V(in) You could then plot the voltage node of the b-source

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.