Back to Forums
1 post / 0 new
#1 Aug 10, 2016
TeamPSpice
Offline
Last seen: 10 months 3 weeks ago
Joined: 2016-03-23 11:50

How to use the piece-wise linear (PWL) voltage and current sources?

 

Problem

How to use the piece-wise linear (PWL) voltage and current sources?

 

Solution

 

The piece-wise linear voltage sources allow you to describe a transient voltage waveform by connecting time-voltage pairs, which you define. The following are schematic parts that can be used, along with their property definitions:

Name: VPWL

Use: Piece-wise linear voltage source

Symbol Properties and example settings:

Properties:

  Ti, where i=1,2..8. These are simulation time values.

  Vi, where i=1,2..8. These are voltages corresponding to the simulation time values.

Example property settings:

  T1=0s   V1=1V

  T2=10us V2=2V

  T3=20us V3=3V

  T4=22us V4=3V

  T5=100us V5=10V

  T6=110us V6=11V

  T7=120us V7=12V

  T8=200us V8=1V

 

 

Name: VPWL_ENH

Use: Piece-wise linear voltage source

Symbol Properties and example settings:

Properties:

  FIRST_NPAIRS - First line containing PWL pairs, i.e. (time, voltage) pairs.

  SECOND_NPAIRS - Second line containing PWL pairs, to be concatenated with FIRST_NPAIRS.

  THIRD_NPAIRS - Third line containing PWL pairs, to be concatenated with SECOND_NPAIRS

  REPEAT_VALUE - Number of times to repeat the specified PWL waveform

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  FIRST_NPAIRS=(0s,1V) (10us,2V) (20us,3V)

  SECOND_NPAIRS=(22us,3V) (100us,10V) (110us,11V)

  THIRD_NPAIRS=(120us,12V) (200us,1V)

  REPEAT_VALUE=100

 

 

Name: VPWL_FILE

Use: Piece-wise linear voltage source

Properties:

  FILE - Name of file containing PWL pairs

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  FILE=pwl.txt

    where "pwl.txt" is a file in the design directly. The format of the file is as follows. Do not include a header line.

 

    0s 1V

    10us 2V

    20us 3V

    22us 3V

    100us 10V

    110us 11V

    120us 12V

    200us 1V

 

 

Name: VPWL_RE_FOREVER

Use: Piece-wise linear voltage source

Properties:

  FIRST_NPAIRS - First line containing PWL pairs, i.e. (time, voltage) pairs.

  SECOND_NPAIRS - Second line containing PWL pairs, to be concatenated with FIRST_NPAIRS.

  THIRD_NPAIRS - Third line containing PWL pairs, to be concatenated with SECOND_NPAIRS

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  FIRST_NPAIRS=(0s,1V) (10us,2V) (20us,3V)

  SECOND_NPAIRS=(22us,3V) (100us,10V) (110us,11V)

  THIRD_NPAIRS=(120us,12V) (200us,1V)

 

 

Name: VPWL_RE_N_TIMES

Use: Piece-wise linear voltage source

Properties:

  FIRST_NPAIRS - First line containing PWL pairs, i.e. (time, voltage) pairs.

  SECOND_NPAIRS - Second line containing PWL pairs, to be concatenated with FIRST_NPAIRS.

  THIRD_NPAIRS - Third line containing PWL pairs, to be concatenated with SECOND_NPAIRS

  REPEAT_VALUE - Number of times to repeat the PWL waveform

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  FIRST_NPAIRS=(0s,1V) (10us,2V) (20us,3V)

  SECOND_NPAIRS=(22us,3V) (100us,10V) (110us,11V)

  THIRD_NPAIRS=(120us,12V) (200us,1V)

  REPEAT_VALUE=100

 

 

Name: VPWL_F_RE_N_TIMES

Use: Piece-wise linear voltage source

Properties:

  FILE - Name of file containing PWL pairs

  REPEAT_VALUE - Number of times to repeat the PWL waveform

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  REPEAT_VALUE=100

  FILE=pwl.txt

    where "pwl.txt" is a file in the design directly. The format of the file is as follows. Do not include a header line.

 

    0s 1V

    10us 2V

    20us 3V

    22us 3V

    100us 10V

    110us 11V

    120us 12V

    200us 1V

 

 

Name: VPWL_F_RE_FOREVER

Use: Piece-wise linear voltage source

Properties:

  FILE - Name of file containing PWL pairs

  TSF - Time scaling factor (multiplies time values specified)

  VSF - Voltage scaling factor (multiplies voltages specified)

Example property settings:

  FILE=pwl.txt

    where "pwl.txt" is a file in the design directly. The format of the file is as follows. Do not include a header line.

 

    0s 1V

    10us 2V

    20us 3V

    22us 3V

    100us 10V

    110us 11V

    120us 12V

    200us 1V

 

 

If you want to describe a current source, by entering time-current data, use the analogous parts:

IPWL, IPWL_ENH, IPWL_FILE, IPWL_RE_FOREVER, IPWL_RE_N_TIMES, IPWL_F_RE_N_TIMES, IPWL_F_RE_FOREVER

Name : VPWL_abm

For details please refer solution 11786012

Name : VPWL_File

For details please refer solution 11094668

Also of interest: Part Properties in the PSpice Help defines all of the user-defined properties on the PSpice schematic parts, and is a help to know which properties to set on the xPWLx symbols in the SOURCE libray.

Download PSpice and try it for free! Download Free Trial
Cadence