Home > Community > Forums > Cadence Academic Network > Help to create a time varying resistance in PSpice

## Email

Recipients email * (separate multiple addresses with commas)

Message *

 Send yourself a copy

## Subscribe

Intro copy of the newsletter section here, some intro copy of the newsletter. Instruction of how to subscribe to this newsletter.

First Name *

Last Name *

Email *

Company / Institution *

 Send Yourself A Copy

# Help to create a time varying resistance in PSpice

Last post Fri, Feb 14 2014 5:26 AM by alokt. 6 replies.
 Started by shilpakhetan 22 Aug 2011 04:46 AM. Topic has 6 replies and 5253 views
• #### Mon, Aug 22 2011 4:46 AM

Help to create a time varying resistance in PSpice
 Hello all,    I am Shilpa and i wish to simulate a circuit where in a time varying resistance is required.The idea is to vary the resistance over time which will give a varying voltage output across the resistor terminals.I intend to feed the varying resistance values as a look-up table along with time. I am aware of accomplishing this by using the TABLE and ETABLE parts in PSpice but not very clear. Any help would be highly appreciable. Please DO REPLY..!! Thanks and Regards,Shilpa.
• Post Points: 20
• #### Mon, Aug 22 2011 6:28 AM

• alokt
• Joined on Thu, Aug 21 2008
• Posts 241
• Points 3,470
Re: Help to create a time varying resistance in PSpice
 In PSpice you can access the TIME paramater during simulation, and you can use this in your expression. For example, one can create linearly increasing resistance by substituting resistance value by expression {((1000*TIME)+0.001)}. Here time would be current simulation Time. You can use E or preferably G device to create varying load. You can define the expression or make it on the  basis of lookup table.  Table can be defined as following E <(+) <(-) node> TABLE { } = < , >ET2 2 0 TABLE {V(A,B)} = (0,0) (3,1) Above example would put 0 volts  between node 2 w.r.tground (0) node,when voltage between node (controlling node) A & B is 0 and it will put 1 voltage when voltage between A,B reaches 3 You can have as many as value pairs as your need. Avoid abrupt value changes value pairs to avoid convergence issues.
• Post Points: 20
• #### Tue, Aug 23 2011 1:33 AM

Re: Help to create a time varying resistance in PSpice
 Thanks for ur reply. But what i dont understand is that in the ETABLE part can i use resistance and time values too? I mean according to the documentation E and G parts can be used to plot (V vs I) (V vs V) (I vs V) and (I vs I). But is there a possibility for (R vs V) or say (T vs R) or somethimg like that. Also the expression to caluculate time varying R in my case is:                                               R= t/[-ln(V2/V1) * C]                       (1)where, V1=2.8085V             C=94.22F              t= is varying.I can also back calculate V2 by substituting for R as:                                               V2=V1*exp[-t/(R*C)]                          (2)My idea is to substitute T and R values and observe the corresponding change in voltage across its terminals. Or can i substitute V2 values over time and get R? Is there any other way how can i do this in PSpice. I use 9.1 version. I am also attaching my circuit where i need to vary R over time. Thanks and Regards,Shilpa
• Post Points: 20
• #### Tue, Aug 23 2011 11:55 PM

• alokt
• Joined on Thu, Aug 21 2008
• Posts 241
• Points 3,470
Re: Help to create a time varying resistance in PSpice
 You can not use E device to define R & Time relation. You need to realize variable resistance using controlled sources. A simple "Resistance" can be realized by G device where current is linearly depend upon the voltage. Please refer the application note http://www.cadence.com/rl/Resources/application_notes/modeling_resistors_appnote.pdf on how to model dependent resistance in PSpice.Hope this helps.
• Post Points: 20
• #### Wed, Aug 24 2011 3:47 AM

Re: Help to create a time varying resistance in PSpice
 Hey thanks a lot. This was exactly what i was looking for..I am trying it in my circuit. Hope it works fine..The application note link is very useful. Thanks again..!
• Post Points: 20
• #### Mon, Feb 10 2014 5:29 PM

• Joined on Tue, Feb 11 2014
• Posts 3
• Points 60
Re: Help to create a time varying resistance in PSpice
 I have a similiar issue.  I am trying to model a switch with a turn on time of 45 nsec.  I used a switch in Pspice and set the resistance to 4.5 ohms, but I want to use something to model the resistance going from very high to effectively 4.5 0hms in that 45 nsec.  I tried using an E component as follows (see E_E1):* source 20140206 CEM DAVE1C_30kV_Cap         N14983 0  1u  TC=0,0 C_20kV_Cap_1         N14970 N15043  100n  TC=0,0 R_30kV_discharge         N14983 0  75000k TC=0,0 R_Cathode_Limit_1         N14970 N14983  20 TC=0,0 R_Cathode_Limit_2         N14970 N14983  20 TC=0,0 R_30kV_Charge         N14970 N17068  600 TC=0,0 R_20kV_Charge         N15043 N15036  600 TC=0,0 R_CEM_Limiting         N15597 N15043  150 TC=0,0 R_R7         N15597 N15043  150 TC=0,0 R_Monitoring_Shunt         N15043 N14970  25000k TC=0,0 R_R11         N15886 N14970  4400 TC=0,0 R_R12         N15886 N14970  4400 TC=0,0 R_R13         N15886 N14970  4400 TC=0,0 R_Tail_Biters         N15886 N14970  4400 TC=0,0 C_20kV_Cap_2         N14970 N15043  100n  TC=0,0 C_Load         N14970 N15886  60p  TC=0,0 V_Cathode_HVPS         0 N17068 30000V_CE_HVPS         N15036 N14970 17000X_S1    N15640 0 N15597 N22093 SCHEMATIC1_S1 V_V3         N15640 0  +PULSE 0 5 10u 10n 10n 10u 6.25mE_E1         N22093 N15886 N22093 N15886 {1-exp(-TIME/10n)}.subckt SCHEMATIC1_S1 1 2 3 4  S_S1         3 4 1 2 _S1RS_S1         1 2 1G.MODEL         _S1 VSWITCH Roff=100e6 Ron=4.7 Voff=0.0V Von=3.ends SCHEMATIC1_S1The simulator gives teh following error:ERROR(ORPSIM-16048): Encoding gain/transconductance/transresistance expression Any hints on modelling a none ideal switch.  (FET, in fact.)Thanks,-dB
• Post Points: 20
• #### Fri, Feb 14 2014 5:26 AM

• alokt
• Joined on Thu, Aug 21 2008