LTSpice: Assign a node voltage to a parameter

Thread Starter

Bharath12

Joined Nov 15, 2018
18
Hello Everyone,
I am new to LTSpice. I want to assign a node voltage to a parameter. Can you help please help me with it. I cannot share the original circuit but I have attached a similar one here. I want to assign the node voltage at pin 10 (voltages connected in series and pin 10 is at V7) to "X" which is at voltage V2 which is of pulse type.
 

Attachments

kubeek

Joined Sep 20, 2005
5,772
I am not sure it is possible to do it like you are trying to. I would use the pulse source to control a V-switch, which then swithces a buffered version of the voltage X.
 

ericgibbs

Joined Jan 29, 2010
15,544
hi,
Use Help option in LTS.
ie:
.IC -- Set Initial Conditions

The .ic directive allows initial conditions for transient analysis to be specified. Node voltages and inductor currents may be specified. A DC solution is performed using the initial conditions as constraints. Note that although inductors are normally treated as short circuits in the DC solution in other SPICE programs, if an initial current is specified, they are treated as infinite-impedance current sources in LTspice.

Syntax: .ic [V(<n1>)=<voltage>] [I(<inductor>)=<current>]

Example: .ic V(in)=2 V(out)=5 V(vc)=1.8 I(L1)=300m
 

Thread Starter

Bharath12

Joined Nov 15, 2018
18
hi,
Use Help option in LTS.
ie:
.IC -- Set Initial Conditions

The .ic directive allows initial conditions for transient analysis to be specified. Node voltages and inductor currents may be specified. A DC solution is performed using the initial conditions as constraints. Note that although inductors are normally treated as short circuits in the DC solution in other SPICE programs, if an initial current is specified, they are treated as infinite-impedance current sources in LTspice.

Syntax: .ic [V(<n1>)=<voltage>] [I(<inductor>)=<current>]

Example: .ic V(in)=2 V(out)=5 V(vc)=1.8 I(L1)=300m
Hi, In this circuit I know the voltage sources but in the real program I am analyzing using a netlist and in it consists of formulas to create 100's of voltages. So I cannot initialize the pulse voltage of V2. I need the sum of all voltages applied as a feedback to this circuit.
 

Thread Starter

Bharath12

Joined Nov 15, 2018
18
I am not sure it is possible to do it like you are trying to. I would use the pulse source to control a V-switch, which then swithces a buffered version of the voltage X.
Hi, Can you tell me with an example. I did not understand you.

Thanks in advance
 

ericgibbs

Joined Jan 29, 2010
15,544
hi 12,
It was impossible to give an helpful answer using the as file you posted, is it possible to post the 'real' asc file.?
E
 

kubeek

Joined Sep 20, 2005
5,772
You want a pulse source with output voltage 0V to X, where X comes as a value from the rest of the circuit. I don´t think it can be done in this way.
What you can do is use the pulse source to control a switch, which then provides the X value to where you want it.
 

Thread Starter

Bharath12

Joined Nov 15, 2018
18
hi 12,
It was impossible to give an helpful answer using the as file you posted, is it possible to post the 'real' asc file.?
E
I understand eric,
I am not in a position to share that file, but there is only a netlist file which is generated from another software . The netlist consists of two circuits: 1. The same LC circuit which is shown in the file above and 2. a circuit whose voltage difference at each nodes are calculated using various formulas and these voltage sources are connected in series to obtain a total voltage at a certain node. I have to give the total voltage from circuit 2 as a feedback to circuit 1. So if you can help me, it will be really helpful.
Thanks in advance!
 

eetech00

Joined Jun 8, 2013
3,162
Hi

Is this what your trying to do?

Voltage sources will only work with static values (or params). But you can use the voltage source as a reference multiplier for a Behavorial voltage source placed in the circuit. See below. As the value X changes, it is reflected in the output of B1.

eT

upload_2019-2-18_9-8-51.png
 

Thread Starter

Bharath12

Joined Nov 15, 2018
18
Hi

Is this what your trying to do?

Voltage sources will only work with static values (or params). But you can use the voltage source as a reference multiplier for a Behavorial voltage source placed in the circuit. See below. As the value X changes, it is reflected in the output of B1.

eT

View attachment 170416
Hi eetech00,

This is what I wanted. Thanks a lot. It is really helpful!
 
Top