Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Implementing a switch in HSPICE

Status
Not open for further replies.

sharas

Member level 4
Member level 4
Joined
Jun 7, 2005
Messages
74
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,965
Hi,

Does anybody know how to implement a switch that switches as a function of time in HSPICE?

I would be gratefull,

Thanks,

Sharas
 

eecs4ever

Full Member level 3
Full Member level 3
Joined
Jan 31, 2006
Messages
176
Helped
28
Reputation
56
Reaction score
10
Trophy points
1,298
Location
Analog Environment
Activity points
2,838
You can used a voltage controlled resistor.
in the syntax below, phi1 is the control signal
and the switch connects 2 nodes, vin and vout.
the resistance between the 2 nodes is 100G ohms when phi1 is 0 volts.
When phi1 reaches 5 volts, the resistance is 1 mOhm = 0.001 ohm.


G1 vin vout VCR PWL(1) phi1 0 0,100G 5,1m

you can also refer here:
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Switches

Good luck.
 
  • Like
Reactions: elec_hi

    sharas

    Points: 2
    Helpful Answer Positive Rating

    elec_hi

    Points: 2
    Helpful Answer Positive Rating

vbhupendra

Full Member level 4
Full Member level 4
Joined
May 11, 2005
Messages
235
Helped
15
Reputation
30
Reaction score
9
Trophy points
1,298
Location
GOA, INDIA
Activity points
3,219
eecs4ever is correct E element is different as i suggested previously. its G element.
 

    sharas

    Points: 2
    Helpful Answer Positive Rating

sharas

Member level 4
Member level 4
Joined
Jun 7, 2005
Messages
74
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,965
eecs4ever said:
You can used a voltage controlled resistor.
in the syntax below, phi1 is the control signal
and the switch connects 2 nodes, vin and vout.
the resistance between the 2 nodes is 100G ohms when phi1 is 0 volts.
When phi1 reaches 5 volts, the resistance is 1 mOhm = 0.001 ohm.


G1 vin vout VCR PWL(1) phi1 0 0,100G 5,1m

you can also refer here:
h**p://www.seas.upenn.edu/~jan/spice/spice.overview.html#Switches

Good luck.
Thanks,

but Isn't there a way to do a time controlled resistor?
 

eecs4ever

Full Member level 3
Full Member level 3
Joined
Jan 31, 2006
Messages
176
Helped
28
Reputation
56
Reaction score
10
Trophy points
1,298
Location
Analog Environment
Activity points
2,838
You can make a voltage waveform that depends on time. Call this signal phi1, and use this voltage to control the value of the resistor.

now you have a time dependent resistance.

To make a voltage waveform that depends on time,
you have multiple options.

1. the PWL function :
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Piecewise
2. the Pulse Function:
https://www.seas.upenn.edu/~jan/spice/spice.overview.html#Pulse

If the behavior is periodic, then its probably easier to use the Pulse function.

good luck!
 

    sharas

    Points: 2
    Helpful Answer Positive Rating

yaxazaa

Advanced Member level 4
Full Member level 1
Joined
Nov 13, 2004
Messages
117
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Activity points
902
In Hspice there is a element called voltage controled resistance. This could be modeling a switch
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top