find resistance value using LT spice

Discussion in 'Homework Help' started by Bigcountry, Jul 26, 2014.

  1. Bigcountry

    Thread Starter Active Member

    Jul 4, 2008
    71
    0
    I am having a hard time find the value of the R1 and R2 in the circuit using LT spice.

    Notice that I drew the circuit but I get an error for R1 and R2. Of course I used KCL to solve for the resistors values. My big problem is I can not place voltage meters that are shown in the given circuit. I tried placing the label net there but could not get it work.

    Any suggestion or input would be greatly appreciated.
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    LTspice (or just about any Spice program) does not solve for unknown values. You have to put in estimated values.

    The voltage and currents at all nodes can be determined the doing the .op analysis.
     
    Bigcountry likes this.
  3. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    But it can solve this by taking advantage of LTSpice's neat functionality.

    I set up three behavioral voltage sources, the first V(e1) computes the square of the error between 3.71V and V(b), the second V(e2) the square of the error between V(c) and 5.61V, and finally the third V(e3) computes the sum of the squared errors.

    Goal is to find values of R1 and R2 which minimizes the sum of the squared errors (sound familiar?)

    I'm using the .step Param function to explore ranges of R1 and R2 that simultaneously minimize the sum of the squared errors. This does repeated .op DC solutions

    First iteration, do 81 DC solutions as R2 steps from 1Ω to 9Ω in steps of 1Ω and as R1 steps from 1Ω to 9Ω in steps of 1Ω. Plotting Log of V(e3) displays it as a family of curves vs R2 (first index being stepped). The color of the curve is the second index. You can see by inspection that the minimum sum of the squared errors occurs when R2 is near 6Ω and R1 is near 4Ω.

    Two more iterations of refining the range over which R2 and R1 is stepped brings us the answer out to 4 significant figures...

    Somebody want to solve a system of mesh equations in two unknowns to check this?

    Ain't LTSpice wonderful? It limits you only to your own imagination...
     
    • D169.jpg
      D169.jpg
      File size:
      372.7 KB
      Views:
      41
  5. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    In the original statement of the problem, likely the voltages at V(b) and V(c) were rounded down to less significant figures. A simple .OP sim with R1=4Ω and R2=6Ω shows this...
     
Loading...