Author Topic: Moddeling Load Dump Pulse 5a in LTSpice  (Read 25100 times)

0 Members and 2 Guests are viewing this topic.

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Moddeling Load Dump Pulse 5a in LTSpice
« on: June 25, 2015, 09:17:16 am »
Hey guys,

I am struggling with trying to find a good way to model a 24V Pulse 5a (unsuppressed) Load Dump (see attachment) in LTSPICE. I think using the EXP function is the best approach but I cant figure it out exactly.

I now use this expression to model the 174V pulse on top of the 24V+20% supply voltage with a 2 ohm output impedance but I am not quite sure if this is correct:

EXP(28.8 202.8 100m 5m 0 350m)
Rser=2

Anyone ever done this? Thx,
« Last Edit: June 25, 2015, 09:26:44 am by DutchGert »
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: au
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #1 on: June 25, 2015, 09:22:04 am »
There's a way to input .WAV files; so one obvious approach is to produce a Load Dump .WAV file and then reference that from LTSpice.

(Note for my own future self: PWL TIME_SCALE_FACTOR=0.5 VALUE_SCALE_FACTOR=2 (0 0 1m 1 2m 1 3m 0?)
« Last Edit: June 25, 2015, 01:54:54 pm by rs20 »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1485
  • Country: 00
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #2 on: June 25, 2015, 10:23:20 am »
How about a B(ehavioral) source?
,
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2176
  • Country: fi
  • Embedded SW/HW.
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #3 on: June 25, 2015, 10:28:03 am »
There is also PWL parameter available in voltage and current sources which is handy for creating different kinds of pulse waveforms.

http://www.linear.com/solutions/1814

Especially the relative format is very handy:
Quote
Time values can also be defined relative to the previous time value by prefixing the time value with a + sign:
PWL (0 0 +1m 1 +1m 1 +1m 0)
« Last Edit: June 25, 2015, 10:32:36 am by Kalvin »
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #4 on: June 25, 2015, 12:10:44 pm »
How about a B(ehavioral) source?

But how can I do that?
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #5 on: June 25, 2015, 12:11:41 pm »
There is also PWL parameter available in voltage and current sources which is handy for creating different kinds of pulse waveforms.

http://www.linear.com/solutions/1814

Especially the relative format is very handy:
Quote
Time values can also be defined relative to the previous time value by prefixing the time value with a + sign:
PWL (0 0 +1m 1 +1m 1 +1m 0)

But it can't do exponential decay of the signal
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #6 on: June 25, 2015, 12:16:52 pm »
So far with a EXP source I get this but it is still not exactly the Pulse 5a....

28.8V is the 24V supply +20%
202.8 is the 28.8V with the 174V Load Dump pulse
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: au
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #7 on: June 25, 2015, 12:23:37 pm »
Wave files... you can do a hypergeometric modified Bessel function if you want.

http://electrostud.wikia.com/wiki/Using_WAVE_files_as_input/output_in_LTSpice
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #8 on: June 25, 2015, 12:27:14 pm »
Wave files... you can do a hypergeometric modified Bessel function if you want.

http://electrostud.wikia.com/wiki/Using_WAVE_files_as_input/output_in_LTSpice

Yes but how to get a WAV file of a load dump pulse?
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: au
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #9 on: June 25, 2015, 12:34:47 pm »
MATLAB? Gnu Octave? Excel + csv2wav? Write a quick thing in python? Audacity with some sort of plugin maybe?

Also, there's the arbitrary voltage source part (BV), which lets you type any arbitrary function: https://www.physicsforums.com/threads/ltspice-question-dependent-sources.333623/

Should be easy to piece that together with the max and exp functions: http://ltwiki.org/?title=B_sources_(complete_reference)

[ Edit: Noticed that dom0 already mentioned the B parts. Didn't mean to steal your idea! ]
« Last Edit: June 25, 2015, 12:38:05 pm by rs20 »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2176
  • Country: fi
  • Embedded SW/HW.
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #10 on: June 25, 2015, 12:43:24 pm »
There is also PWL parameter available in voltage and current sources which is handy for creating different kinds of pulse waveforms.

http://www.linear.com/solutions/1814

Especially the relative format is very handy:
Quote
Time values can also be defined relative to the previous time value by prefixing the time value with a + sign:
PWL (0 0 +1m 1 +1m 1 +1m 0)

But it can't do exponential decay of the signal

You can create a decaying pulse composing it from the piecewise linear segments. Depending how accurately you want to model the pulse, the more segments you need. There are of course other alternatives as the other formum members has already suggested.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: au
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #11 on: June 25, 2015, 01:04:49 pm »
Further points:

The curve that you're trying to achieve is far from exponential. An exponential curve has a gentle curve all the way along, the curve you're targeting has a pronounced, not-at-all-exponential knee at the end of its fall.

Also, in trying to use the exp source, you fed in 350ms as your time constant (i.e., 100% - 36.8% time), not the time to fall to 10% as specified in the doc. Divide by -ln(0.1) to specify a fall to 10%; i.e., the time constant should be 350ms / 2.303 = 152ms. Also, t2 is supposed to be the time to transition into the fall; not 0. That will make the shape meet the spec, but it won't look the same as the picture, because again, the picture isn't exponential.

All of this aside, why are you so interested in matching the curve on that page so closely? That curve you're trying to imitate so closely isn't an engineering spec, apart from the specified properties: peak value, pulse width (10% -- 10%), and rise time. So reading so much into the exact shape of the curve is probably a bit silly.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2986
  • Country: ca
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #12 on: June 25, 2015, 01:42:08 pm »
Hi group,

Here is one way of modelling the type 5 pulse. you can adjust the parameters to fine tune the shape.



It uses an exponential waveform generator sitting on top of the dc voltage. Ideal diodes are used to set allow the source impedance to be set.

This is the resulting waveform:




Regards,

Jay_Diddy_B
« Last Edit: June 25, 2015, 01:44:05 pm by Jay_Diddy_B »
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #13 on: June 25, 2015, 02:31:50 pm »
Hi group,

Here is one way of modelling the type 5 pulse. you can adjust the parameters to fine tune the shape.



It uses an exponential waveform generator sitting on top of the dc voltage. Ideal diodes are used to set allow the source impedance to be set.

This is the resulting waveform:




Regards,

Jay_Diddy_B

That looks very good, thanks a lot
 

Offline DutchGertTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #14 on: June 25, 2015, 05:04:52 pm »
Further points:

The curve that you're trying to achieve is far from exponential. An exponential curve has a gentle curve all the way along, the curve you're targeting has a pronounced, not-at-all-exponential knee at the end of its fall.

Also, in trying to use the exp source, you fed in 350ms as your time constant (i.e., 100% - 36.8% time), not the time to fall to 10% as specified in the doc. Divide by -ln(0.1) to specify a fall to 10%; i.e., the time constant should be 350ms / 2.303 = 152ms. Also, t2 is supposed to be the time to transition into the fall; not 0. That will make the shape meet the spec, but it won't look the same as the picture, because again, the picture isn't exponential.

All of this aside, why are you so interested in matching the curve on that page so closely? That curve you're trying to imitate so closely isn't an engineering spec, apart from the specified properties: peak value, pulse width (10% -- 10%), and rise time. So reading so much into the exact shape of the curve is probably a bit silly.

It is indeed not about matching it exactly but what is important is matching the rise time and the energy in the pulse so matching it as closely as possible helps doing that.
Also, the test and certification gear output the exact pulse specified in the picture so it is good to be ably to simulate a simmilar one.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2986
  • Country: ca
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #15 on: June 25, 2015, 05:20:09 pm »
Hi group,

Here is application of the type 5 pulse generator. I am looking at the clamping provided by different voltage TVS diodes. I use quite a few LTspice techniques to get these results.
Here is the complete model:



This what the clamped voltage looks like:




The .meas statement allows us to plot the energy absorbed by the TVS:



I have attached a zip file with the LTspice model.

Regards,

Jay_Diddy_B
 
The following users thanked this post: kellogs

Offline mariuss_suciu

  • Newbie
  • Posts: 1
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #16 on: March 06, 2017, 12:54:08 pm »
Hello guys,

Know somebody if I can find somewhere all transient test pulses (12V), for eg. 1a, 1b, 2a, 2b, 3a, 5a also for LTspice

Thx,
Marius.
 

Offline SvanGool

  • Regular Contributor
  • *
  • Posts: 135
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #17 on: March 06, 2017, 02:30:30 pm »
This is what I am using for 1, 2A and 5A @ 24V:
  • 1: V=28*(1-u(mod(time,500ms)-300ms))+p124sc1*({p124sc2}/({p124sc2}-{p124sc3})* (exp(-{p124sc3}*delay((mod(time,500ms)*1000),300ms))-exp(-{p124sc2}*delay((mod(time,500ms)*1000),300ms))))
  • 2A: V=28+p2a24sc1*({p2a24sc2}/({p2a24sc2}-{p2a24sc3})* (exp(-{p2a24sc3}*delay((mod(time,500ms)*1000) ,300ms))-exp(-{p2a24sc2}*delay((mod(time,500ms)*1000),300ms))))
  • 5A: V=28+p5a24sc1*({p5a24sc2}/({p5a24sc2}-{p5a24sc3})* (exp(-{p5a24sc3}*delay((mod(time,500ms)) ,300ms))-exp(-{p5a24sc2}*delay((mod(time,500ms)),300ms))))
.func mod(x,y) {((x/y)-int(x/y))*y}



# Don't hurry, the past will wait. #
 
The following users thanked this post: bcaglar63

Offline SvanGool

  • Regular Contributor
  • *
  • Posts: 135
  • Country: nl
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #18 on: March 06, 2017, 02:41:41 pm »
Attached the .asc file  :)
# Don't hurry, the past will wait. #
 
The following users thanked this post: bcaglar63

Offline relu

  • Newbie
  • Posts: 6
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #19 on: April 01, 2017, 12:54:38 pm »
Has anyone got the change to look at the "official" LT spice model for the ISO pulses?
on 23nd March they had this page up on their site:

http://linear.com/solutions/7719

with all the definitions of the ISO pulses.

I only managed to download the asc files which did not contain the definition of the pulse itself.
Now it seems that the page is no longer valid.  :(

Has someone get their hands on these pulses? If so, could you please share it with me?


Thanks,
Relu

 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14130
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #20 on: June 16, 2018, 02:28:02 pm »
Necroposting to aid future searches

I'm still stuck using LTspice IV, so cant use the ISO 7637 pulse sources introduced with LTspice XVII.  My carefully hand crufted ISO 7637-2 Pulse 5A and 5B sim for 12V and 24V systems can be downloaded from: https://www.eevblog.com/forum/beginners/circuit-to-convert-from-12v-automotive-into-a-microcontroller-voltage/?action=dlattach;attach=457570

Its as close as I can get it to the spec. including the changeover to a second exponential for the last 10% of the tail but hasn't been independently verified.

Edit: corrected version below.
« Last Edit: June 16, 2018, 08:19:13 pm by Ian.M »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17806
  • Country: fr
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #21 on: June 16, 2018, 05:12:39 pm »
Select 'bi' as your current source in the component selection dialog. It's an arbitrary behavioral current source.

You can then define the current as a function of voltages, currents, time and other stuff in your design. Take a look at "Arbitrary Behavioral Voltage or Current Sources" in LTSpice Help.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14130
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #22 on: June 16, 2018, 05:19:49 pm »
Yes, that would be the nice way to do it, but the change in the exponential function at the 10% point on the falling slope of pulse 5A is *VERY* difficult to model mathematically over the full range of possible pulse parameters without introducing a discontinuity.   It was far easier to model that second exponential as a RC decay activated at 10% then use a BV (behavioural voltage source) to both buffer it and limit the peak for pulse 5B.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14130
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #23 on: June 16, 2018, 08:08:33 pm »
*WHOOPS!*
I just spotted an error I made in the above sim while tidying up the currently commented out 24V pulse 5B.  It should be:
Code: [Select]
.param Uss 70 and the also commented out 12V pulse 5A should be
Code: [Select]
.param Uss 1KThey got swapped.  :palm: :(

The 5A pulses use 1K because that's higher than the highest possible peak so its unclamped.

Do note that the clamping voltage Us* (parameter Uss in the sim) is left up to the vehicle manufacturer so you'll need to make sure its suitable for your application.

Corrected version uploaded here.

Edit: Later versions of LTspice complain about insufficient parameters for Vctrl. Try adding 1n 1n 9e9
« Last Edit: July 17, 2025, 08:34:20 am by Ian.M »
 

Offline bcaglar63

  • Newbie
  • Posts: 1
  • Country: fr
Re: Moddeling Load Dump Pulse 5a in LTSpice
« Reply #24 on: September 30, 2022, 07:00:46 pm »
Hello,

I want to use your asc model.
Could you please explain .func mod(x,y) {((x/y)-int(x/y))*y} ltspice formulas?
Also for pulse 2a, 3a, 3b and 4 I couldnt find voltage source in your asc file. How can you manage this?

Many thanks
Best Regards
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->