How much do you trust your software?

  • Thread starter Topher925
  • Start date
  • #1
1,565
7
I've been delving a little deeper into electrical theory in terms of noise and low signal measurement as I'm working on some rather sensitive stuff and the back of my napkin calculations isn't cutting it anymore as I need to account for things like opamp input bias, voltage offset, etc. I thought I would do some spice based circuit simulations using NI Multisim to see if I could predict the same results I get in the lab. The software is no where even close to whats actually happening on the workbench. I'm measuring a current based signal of about a few pico-amps which is then going to a low-bias op-amp and is giving me a rms voltage of about a few micro-volts with a SNR of about 1:1. Mutlisim predicts a voltage of about 9,000V with a SNR of 10:1.

My simple napkin calculations in matlab give a result to within about 30% of what I'm measuring on the oscilloscope in terms of signal and noise magnitude. What the hell is going on here? I double checked all my numbers and schematics in the software and everything appears to be correct. The only thing I can think of is that the spice models for the amplifier components are wrong but I took those directly from the manufacturer (Analog Devices). Are spice based software packages always this off or am I doing something wrong?
 

Answers and Replies

  • #2
berkeman
Mentor
60,836
11,222
You're doing the right things. It's important to get agreement between calculations, simulations and measurements. They should eventually be very close to each other, once all the subtleties (and sometimes software bugs) are worked out.

Are you able to post more information so that we can try to check the simulation results? There may be an issue with the SPICE model that you have downloaded -- it wouldn't be the first time that a model had issues.
 
  • #3
1,763
59
Are you running your circuit using Transient Analysis or Sweep Analysis? Sweep analysis isn't concerned with power supply voltages and often you get voltages out that are higher than the power supply voltage.
 
  • #4
1,565
7
Are you running your circuit using Transient Analysis or Sweep Analysis? Sweep analysis isn't concerned with power supply voltages and often you get voltages out that are higher than the power supply voltage.

I'm running a transient analysis. I didn't think Multisim has a sweep analysis. :confused:

I attached an image of the results my code gives me (first pic) and the schematic with the simulation running (second pic). The spice models for the opamps came from Analogs Multisim free download thing on their website.

As you can see the multisim model just kind of goes off into oblivion while the matlab script I wrote gives more realistic results. I'm still fine tuning it a bit but its getting there. I can post code or what ever else if wanted.
 

Attachments

  • SignalModel.png
    SignalModel.png
    35.8 KB · Views: 391
  • MultisimModel.jpg
    MultisimModel.jpg
    32.4 KB · Views: 367
  • #5
berkeman
Mentor
60,836
11,222
It does look like the simulator is having trouble with the tiny currents and huge resistances. Can you ratio the values back to more nominal values to see if the math errors stop at some point?
 
  • #6
1,565
7
It does look like the simulator is having trouble with the tiny currents and huge resistances. Can you ratio the values back to more nominal values to see if the math errors stop at some point?

Yes. If I scale the feedback resistor down to around the 1Mohm range and bump up the photodiode current to the microamp range it starts to behave normally. This range of values is of course completely useless for my application.

I think I'm just going to stick with my matlab calculations and not deal with any fancy software. With my code I at least know exactly whats going on what needs to be tuned in order to get the results to agree with experimental measurements.
 

Related Threads on How much do you trust your software?

Replies
21
Views
9K
Replies
9
Views
2K
  • Last Post
Replies
6
Views
7K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
7
Views
2K
  • Last Post
Replies
5
Views
2K
Replies
9
Views
2K
Replies
9
Views
2K
Top