Author Topic: SPICE simulation does not compare to real measurement at all  (Read 716 times)

0 Members and 1 Guest are viewing this topic.

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
SPICE simulation does not compare to real measurement at all
« on: December 30, 2024, 07:00:31 am »
Hi,

i am trying to simulate a part of my curcuit, to see, how good my measure really is. But it looks much different.

Its the postive line of a BLDC driver that conducts the current for the mosfets.
This line has the following details:
- 7mm from blank spot to blank spot.
- Trace thickness 0.08mm (2 Oz)
- Layer separation 0.14
- Trace width 11.6mm

I am only swithcing the high side mosfet, simulating it with a current source.

This higher frequency of the simulation lets me think, that the simulation is not right.

Also i have thought about how i could manipulate the circuit "kind of realistically" to make the ringing dissappear.

I have set all stray values of the components, that are no real components to 0.
« Last Edit: December 30, 2024, 07:03:00 am by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Online Slh

  • Regular Contributor
  • *
  • Posts: 155
  • Country: gb
Re: SPICE simulation does not compare to real measurement at all
« Reply #1 on: December 30, 2024, 08:48:22 am »
It's an interesting simulation model.  Why are you trying to model just the trace? At the very least to be useful you'll also want the return trace to get the full loop inductances but I don't see the point in this particular simulation as it is.

Why aren't you using a mosfet model and a sensible model  for the load? MOSFETs have various delays and parasitic capacitances and resistance that will affect your model. The current source is perfect so the pulse is perfect. Shame the rest of it resonates as clearly there's not much damping in it (as you would hope).

Even if you put a proper load and MOSFET model in, it's probably going to have inaccurate ringing as it's very hard to model all of the nonlinear parasitic components properly.
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: pl
Re: SPICE simulation does not compare to real measurement at all
« Reply #2 on: December 30, 2024, 12:08:50 pm »
I am only swithcing the high side mosfet, simulating it with a current source.

Could you explain your schematic.
If I2 is to simulate high side mosfet than why it is connected from +27V to GND while high side mosfet isn't?
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: SPICE simulation does not compare to real measurement at all
« Reply #3 on: December 30, 2024, 02:36:14 pm »
I think i can answer some of your questions with the words "lazy" and "mistake".

I just wanted a rough peek, at whats happening. As usual, things are more complicated...  :(

I put in the mosfets (similar ones i guess), and fixed the mistake with the current source beeing wrong at all.

BUT now, the simulation runs and runs, not giving a plot.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: SPICE simulation does not compare to real measurement at all
« Reply #4 on: December 30, 2024, 03:12:46 pm »
Found a workaround for the never ending simulation. Hitting escape a few times helps.

It also now looks good enough to me, that i trust now (somewhat) what i measured.


"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13098
  • Country: ch
Re: SPICE simulation does not compare to real measurement at all
« Reply #5 on: December 30, 2024, 03:17:28 pm »
I think i can answer some of your questions with the words "lazy" and "mistake".

I just wanted a rough peek, at whats happening. As usual, things are more complicated...  :(

I put in the mosfets (similar ones i guess), and fixed the mistake with the current source beeing wrong at all.
I think you mean "voltage source" (Spannungsquelle), not "current source" (Stromquelle)? I only see voltage sources in the simulation schematic.
 

Offline PGPG

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: pl
Re: SPICE simulation does not compare to real measurement at all
« Reply #6 on: December 30, 2024, 03:29:59 pm »
I only see voltage sources in the simulation schematic.

I2 in schematic from first post.
 
The following users thanked this post: tooki

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: SPICE simulation does not compare to real measurement at all
« Reply #7 on: December 30, 2024, 04:06:18 pm »
There are two things (among others) that both the simulation have in common:
- the tiny rise before the peak
- the kink in the top of some peaks

But there is one thing, where it is way wrong:
- the amplitude of the peak.

Can anyone tell me how i could lower that amplitude in the simulation?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5506
  • Country: va
Re: SPICE simulation does not compare to real measurement at all
« Reply #8 on: December 30, 2024, 04:57:58 pm »
Do post your .asc file..
Readers discretion is advised..
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: SPICE simulation does not compare to real measurement at all
« Reply #9 on: December 30, 2024, 05:35:16 pm »
There you go:
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Offline AnalogTodd

  • Regular Contributor
  • *
  • Posts: 121
  • Country: us
Re: SPICE simulation does not compare to real measurement at all
« Reply #10 on: January 02, 2025, 02:02:40 pm »
There are two things (among others) that both the simulation have in common:
- the tiny rise before the peak
- the kink in the top of some peaks

But there is one thing, where it is way wrong:
- the amplitude of the peak.

Can anyone tell me how i could lower that amplitude in the simulation?
Take some time to look at the results the simulator is giving you and think about them. The current in your motor (L6) is hitting almost 240A! This is not realistic. There is parasitic resistance and back EMF that will come into play when using a real motor.

From there, you are only simulating a single side of the drive on this. When the top side driver turns off, the bottom side usually turns on after a certain amount of blanking time (usually in the tens of nsec range). You have it fixed such that the bottom side FET never turns on, so the current in your inductor gets run through the body diodes of your bottom and top side devices, and those diodes likely have enough resistance to get to the voltages you are looking at. The current in your load will NOT change quickly when you are simulating a 10mH inductor with zero parasitic effects.
Lived in the home of the gurus for many years.
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1152
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: SPICE simulation does not compare to real measurement at all
« Reply #11 on: January 02, 2025, 02:20:30 pm »
Take some time to look at the results the simulator is giving you and think about them. The current in your motor (L6) is hitting almost 240A! This is not realistic. There is parasitic resistance and back EMF that will come into play when using a real motor.

From there, you are only simulating a single side of the drive on this. When the top side driver turns off, the bottom side usually turns on after a certain amount of blanking time (usually in the tens of nsec range). You have it fixed such that the bottom side FET never turns on, so the current in your inductor gets run through the body diodes of your bottom and top side devices, and those diodes likely have enough resistance to get to the voltages you are looking at. The current in your load will NOT change quickly when you are simulating a 10mH inductor with zero parasitic effects.
I dont find it that unrealistic. In my real circuit i am hitting somewhere above 60A without anything smoking. Only the shunt gets hot, nothing else.

What parasitic effects do i have to set up, in order for the current in my load to change quickly? What are you considering my load?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
My current top list of issues on the SDS800X HD:
https://www.eevblog.com/forum/testgear/sds800x-hd-bug-reports-firmware/msg5766323/#msg5766323
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5506
  • Country: va
Re: SPICE simulation does not compare to real measurement at all
« Reply #12 on: January 02, 2025, 02:26:39 pm »
So, what is the problem with the sim?
It shows something (you may press "escape" once/twice when offered by the LTspice - usually when it does iterate in a circle - look at the bottom info line when the sim runs and your cursor shall be in the schematics window).
Also your C9 3300uF can hardly have 500n ESR (I put there 0.5)..
« Last Edit: January 02, 2025, 02:32:33 pm by iMo »
Readers discretion is advised..
 

Offline AnalogTodd

  • Regular Contributor
  • *
  • Posts: 121
  • Country: us
Re: SPICE simulation does not compare to real measurement at all
« Reply #13 on: January 02, 2025, 08:49:54 pm »
Take some time to look at the results the simulator is giving you and think about them. The current in your motor (L6) is hitting almost 240A! This is not realistic. There is parasitic resistance and back EMF that will come into play when using a real motor.

From there, you are only simulating a single side of the drive on this. When the top side driver turns off, the bottom side usually turns on after a certain amount of blanking time (usually in the tens of nsec range). You have it fixed such that the bottom side FET never turns on, so the current in your inductor gets run through the body diodes of your bottom and top side devices, and those diodes likely have enough resistance to get to the voltages you are looking at. The current in your load will NOT change quickly when you are simulating a 10mH inductor with zero parasitic effects.
I dont find it that unrealistic. In my real circuit i am hitting somewhere above 60A without anything smoking. Only the shunt gets hot, nothing else.
You are talking 4X the current in your simulation, which is 16X the power. If your shunt is getting hot, that's 1-2W of power that is shifting to MUCH higher numbers in the simulations.
Quote
What parasitic effects do i have to set up, in order for the current in my load to change quickly? What are you considering my load?
Do you have any resistance in series with the 10mH inductor? Your original post said this is a BLDC driver, the assumption I made is that the 10mH is the DC motor as a load. It's pretty easy to look at the circuit and see that you have a high side switch and a low side switch and the simulations you are doing only uses one of them (the bottom switch has its gate tied to source, forced off). So, let's remember back to the inductor equation: V = L * dI / dt. Inductors do NOT change current easily. The larger the inductor, the harder it is to change currents quickly.

So we have a current that needs to keep flowing in this inductor as you turn off the top side FET. Where does this current come from? It runs through the body diode of the bottom side FET. When you are talking 200+A through a body diode, you get large voltages. Now, what is happening to other currents in the circuit? When that top side FET is on, you're getting 200+A running through all of those inductors and resistors in your circuit (look closely at L9). Turn off that top side FET, and that current wants to continue as well. Where does it go? Into the caps and resistors you have there. Remember that the energy stored in an inductor has to go somewhere which is to shunt into the capacitors/resistors you have. Just calculate what happens if you shunt the energy from the inductor into you caps and you'll see a massive shift up in voltage.

The physics aren't changing anywhere here. You've created a tank circuit with an extremely high Q (@iMo was right about the ESR, getting below a few milliohms is nigh impossible, let alone sub-microohm). This will ring like CRAZY with any transient on it. The thing to look at in debugging your simulation and circuit is to review not only the voltages around the circuit, but the currents as well. What happens where as you have a change happen? When M2 turns off, where does current flow happen at one time point versus the next? Put that together with the understanding that inductors can have voltage change rapidly but will fight current change and capacitors can have current change quickly but not voltage change and you will begin to understand what happens in the circuit.

I think part of the issue that a lot of people are going to have is that we also have a hard time lining up which node is which when they are unlabeled on the schematic you provide.
Lived in the home of the gurus for many years.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf