How much do you trust your software?

  • Thread starter Thread starter Topher925
  • Start date Start date
  • Tags Tags
    Software
AI Thread Summary
The discussion highlights issues with the accuracy of NI Multisim simulations compared to real lab measurements in sensitive electrical applications. The user finds that while their MATLAB calculations yield results within 30% of actual measurements, Multisim predicts implausibly high voltages and signal-to-noise ratios. Concerns are raised about the reliability of SPICE models, even those sourced directly from manufacturers. The user discovers that scaling component values can improve simulation behavior, but these adjustments render the results impractical for their specific application. Ultimately, the user prefers to rely on their MATLAB calculations for more accurate and controllable outcomes.
Topher925
Messages
1,562
Reaction score
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 what's 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?
 
Engineering news on Phys.org
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.
 
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.
 
skeptic2 said:
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
    20.6 KB · Views: 502
  • MultisimModel.jpg
    MultisimModel.jpg
    32.4 KB · Views: 468
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?
 
berkeman said:
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 what's going on what needs to be tuned in order to get the results to agree with experimental measurements.
 
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top