Analyse a tan calculation in LTSpice

Thread Starter

Finn Cheng

Joined Apr 15, 2023
8
The resistance value is x, and its calculation formula is expressed below. If you use a computer to calculate x=1000*tan(pi/4+01)=15.45, so i=5/15.45=0.3236A, but this result is completely different from the picture , I don't know where the error in the simulation is now.Screenshot (1).png
 

crutschow

Joined Mar 14, 2008
32,841
It's a little gotcha that's easy to forget about in using angles.
Your computer is using Degrees but Spice uses Radians for the angle.
Which are you intending?

Since you are using Pi as part of the angle value, I expect it's Radians.
If so, to get degrees for the computer calculation, multiply the Radian angle by 180/Pi.
 
Last edited:

Thread Starter

Finn Cheng

Joined Apr 15, 2023
8
It's a little gotcha that's easy to forget about in using angles.
Your computer is using Degrees but Spice uses Radians for the angle.
Which are you intending?

Since you are using Pi as part of the angle value, I expect it's Radians.
If so, to get degrees for the computer calculation, multiply the Radian angle by 180/Pi.
Ok, I got it. Thank you so much!
 
Top