Back to Forums
3 posts / 0 new
Last post
#1 Jun 29, 2018
luckyPatrick
Offline
Last seen: 5 years 9 months ago
Joined: 2018-06-29 07:25

Behavioral Model Using Current in Equation Causes Time Step too Small Errors

Hi,
I am trying to behavioral model a Wideband Linear Four-Quadrant Multiplier (MC1595). The SPICE code is below. For some reason when I put the current (i.e. "1/I(RScaleFactor)") into behavioral voltage source 1 equation it causes "time step tooo small error" in other parts of my circuit. Can you please help?

Thank you,
Patrick

.SUBCKT MC1595 V+ -Vy_OFFSET_ADJUST +Vy Ry5 Ry6 SCALE_FACTOR_TRIM V- +Vo -Vo +Vx -Vx_OFFSET_ADJUST Rx11 Rx10 R_+_GND PARAMS: RL=0 Rx=0 Ry=0

*this equation cause 'time step to small' errors in other parts of my circuit
*B§V1 N001 0 V=Kr*(1/I(RScaleFactor))*(V(+Vx)-V(-Vx_OFFSET_ADJUST))*(V(+Vy)-V(-Vy_OFFSET_ADJUST))
*this equation works fine
B§V1 N001 0 V=Kr*(V(+Vx)-V(-Vx_OFFSET_ADJUST))*(V(+Vy)-V(-Vy_OFFSET_ADJUST))

B§V2 -Vo 0 V=-V(Vo)/2
B§V3 +Vo 0 V=V(Vo)/2
RScaleFactor SCALE_FACTOR_TRIM 0 500
R1 -Vy_OFFSET_ADJUST 0 10Meg
R2 +Vy 0 10Meg
R3 +Vx 0 10Meg
R4 -Vx_OFFSET_ADJUST 0 10Meg
R5 0 Ry5 5k
R6 0 Ry6 5k
R7 Vo N001 10
C1 Vo 0 1µ
R8 V+ 0 10Meg
R9 V- 0 10Meg
R10 0 Rx11 5k
R11 0 Rx10 5k
R12 0 R_+_GND 5k
.PARAM Kr = {(2*RL)/(Rx*Ry)}
.backanno
.end

Fri, 2018-06-29 09:59
oldmouldy
Offline
Last seen: 2 years 4 months ago
Joined: 2016-07-06 04:23

This queston is not related to this forum since this model uses the SPICE 3 B component which the SPICE 2 based PSpice simulator wouldn't be able to process. Similarly, .backanno is not a command that SPICE, or PSpice, would recognise.

Fri, 2018-06-29 10:15
luckyPatrick
Offline
Last seen: 5 years 9 months ago
Joined: 2018-06-29 07:25

Hi oldmouldy,

Ok thank you. The .backanno command was generated by LtSpice. I am not sure what it does. Do you happen to know? Also what forum should I use to post my original question?

Thank you,

Patrick

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