# Basic problems with LTSpice

#### Prec99

##### New Member
Hi everyone,
I'm new to the forum and to the world of electronics. I'm in university and in our Circuit Theory course we've been asked to solve the attached problem using Spice, but we've been given very little information about it (the course is not mainly based on it). What I need to do in the problem is to find the expressions of i1(t) and vs2(t).
I've been able to draw the circuit in LTSpice, but I'm struggling to understand the kind of simulation I should be running and how I can find the expressions I'm looking for.
I know these are probably very basic questions, but the course is now over and I have no other mean to understand what I am supposed to do.

#### Attachments

• 41.1 KB Views: 13
• 14.4 KB Views: 10

#### crutschow

##### Well-Known Member
but the course is now over
Welcome to the forum.

So what's the purpose of this homework?

Since the sources are given as sine functions in radians, you can use the LTspice behavioral sources B1 (voltage) and B2 (current).
An example below shows the source for Vs1(t) using a transient simulation.
you must use the word "time" for t in the function.

You can do a similar thing for the other voltage source and the current source.
For the phase-shift, you will need to convert the shift in degrees to the equivalent radian offset (2pi radians = 360 degrees).
For example, 75 degrees equals pi*75/180 radians.

V and A in the equations are arbitrary numbers.
Since they are not specified, you can set them to 1 for simulation purposes. Last edited:

#### Prec99

##### New Member
Hi again, and sorry for the time it took me to respond back.

So what's the purpose of this homework?
We've been asked to write a short paper ahead of the exam, comparing the methods to analyze the circuit, either on paper (which is the main purpose of the course) or using simulation softwares.

Anyway, thanks to your help, I've been able to draw the circuit as you suggested and to run a transient simulation. I'm now able to display the graphics for the voltage of the sources.

The problem, though, asks to "find the expression of i(vs1)", so is there a way to calculate something like an algebraic expression for the currents or the voltages in the nodes?

Thanks again for the help.

#### Attachments

• 32.6 KB Views: 6
• 52.7 KB Views: 5

#### crutschow

##### Well-Known Member
The problem, though, asks to "find the expression of i(vs1)", so is there a way to calculate something like an algebraic expression for the currents or the voltages in the nodes?
Yes, you can use KVL Mesh analysis or KCL node analysis.
Have you not studied that?

#### Prec99

##### New Member
Have you not studied that?
Yes, we did study those methods, but I was wondering whether there was a way to find the expressions I'm looking for using LTSpice. What I'm looking for is a command to display "the value of is3 is 3*sin(4t)" (I made up numbers) or something similar.

Thanks and sorry for my continuous questions.

#### eTech

##### Active Member
Yes, we did study those methods, but I was wondering whether there was a way to find the expressions I'm looking for using LTSpice. What I'm looking for is a command to display "the value of is3 is 3*sin(4t)" (I made up numbers) or something similar.

Thanks and sorry for my continuous questions.
yes. Just use a BV device, label its output node as desired, and specify the equation in its value field. You can then click the label to display the value as a voltage.

or you can write a .meas statement to display the value in the error log.

#### crutschow

##### Well-Known Member
I was wondering whether there was a way to find the expressions I'm looking for using LTSpice.
No.
Spice does not use closed expressions for voltage and current to solve for the circuit response.
It iteratively solves by calculating the voltage and current for very small incremental increase of time using many thousands of calculations at each instant in time to converge at the solution.
A common problem with Spice is that sometimes it will have a problem doing that, and you will get a convergence or timestep error.

So sorry, there's not an easy way to derive the expressions of i1(t) and vs2(t) without doing the calculations yourself (which is likely the purpose of the exercise). #### eTech

##### Active Member
Yes, we did study those methods, but I was wondering whether there was a way to find the expressions I'm looking for using LTSpice. What I'm looking for is a command to display "the value of is3 is 3*sin(4t)" (I made up numbers) or something similar.

Thanks and sorry for my continuous questions.
oh...you want it to show the expression used to resolve a calculation...no won’t do that. 