I am trying to setup an all-purpose testbench for some amplifier circuits I need on a regular basis that can be used for all the simulations I normaly use: DC, AC, TRAN and PSS.
The problem I have stems from the fact, that I need to test my circuit in a pulsed operating mode in the transient simulation: the circuit has a node called "powerdown" which is driven by a VPWL voltage source. This activates and deactivates the circuit for a certain amount of time, allowing me to observe the transient behaviour of the circuit with regards to settling time etc. in a pulsed operating mode.
For my PSS simulations, where I want to establish the 1dB-compression point for example, the powerdown-node needs to be set to a defined voltage, in my case 0 volt (or connected to ground) in order to avoid the frequency components of the powerdown source. Is there a way, to setup both in one testbench ? For DC-simulations, I can just set the DC value of the vwpl source to 0 and everything works as expected. I haven't found a way to do the same for PSS simulations which leads to me always having to make a copy of the testbench where I then statically connect the powerdown node to ground. This has lead to mistakes in the past and I would prefer a single testbench that just works and can be reused.
> . Is there a way, to setup both in one testbench ? For DC-simulations, I can just set the DC value
> of the vwpl source to 0 and everything works as expected. I haven't found a way to do the same for
> PSS simulations which leads to me always having to make a copy of the testbench where I then
> statically connect the powerdown node to ground. This has lead to mistakes in the past and I would
> prefer a single testbench that just works and can be reused.
I had a thought that I often use in my test benches to allow them to be used for many analysese that might be helpful and allow you to use the same test bench for a PSS simulation. When there are multiple stimuli, I include a design variable for each source to define its delay. For example, in your test bench with a powerdown piecewise linear source, I might invlude a delay variable "delay_powerdown" in the definition of the source as shown in the attached example. In your pss simulation, if the value of delay_powerdown is set to a value that far exceeds the value of TSTAB, the source will remain at 0 throughout your PSS simulation. For a transient simulation, you might set delay_powerdown to something less than the TSTOP time of your simulation to study the impact of powerdown.
I hope I understood your queston!
Actually that won't work. The tstab is additional time added on to Tonset (the onset of periodicity). It will simulate for as long as needed for the sources to be periodic, and then the tstab. So with a tstab of 1u, if you have a source with a delay of 1m, it will simulate 1m+1u for the initial transient.
Thomas - a couple of approaches I'd suggest: