Post Go back to editing


I want to simulate an RC filter circuit in LTspice. For that I have taken two resistors in series with two capacitors. The variable for capacitor is {C} and for resistor it is {R}. I am using sine wave for the voltage source.

I have used following spice directives:

SINE (0 1 {F}) as I have set the frequency value for sine wave as F

Frequency of sine wave: .set param F 1k 10k 1k

For capacitor: .set param C 10n 100n 10n 

Equivalent series resistance of capacitor: {Xc}

For Xc: .param Xc=(1/(2*3.14*F*C))

Now what I want that the value of R should change such that it should be 10*Xc

But the schematic does not run. It says that "Unknown sub circuit Xc=(1/(2*3.14*F*C))

Please help. Can we set an independent variable for frequency in LTspice and use the spice directives to create a formula for F?

I am using LTspice XVII.