A stupid question about Sine Generator in Spice/LTSpice

I find it annoying that I can't simply set the starting degree angle I want without it causing an offset, unless I do

  1. Currently I get around this using the delay parameter and the sine will start with the correct offset so that it crosses the axes properly.

I was doing a 3 phase transformer simulation the otherday and needed to do Delta, WYE etc, connections. Using DC offsets is out of the question of course. And then the secondary side connected to a 3 phase bridge and cap.. etc..

For future reference, is there a simpler way to have the angle start with the proper offset so that it'll converge on the axes properly without doing what I did ?

Thanks Jamie

Reply to
M Philbrook
Loading thread data ...

Does your transformer model have any DC resistance? If not, a non-zero sine angle can make persistant DC circulating current. That's not usually a problem in real life.

Add a big series capacitor?

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Den mandag den 1. august 2016 kl. 23.43.51 UTC+2 skrev M Philbrook:

for 90 deg you want the sine to start a quarter cycle later instead of starting at 0 with peak voltage?

-Lasse

Reply to
Lasse Langwadt Christensen

For the case I was doing, driving a 3 phase transformer and having DC in there just does not cut it. It seems that I've done this before with out suffering from this while driving transformers.

In the past I've used the DC offset to correct for this and it seem to work out ok but not in this case. Also, I just did an update on LTSpice and the engine seems to be very cranky now, I switch to the other solver.

Currently using the "Delay" parameter seems to be the only way but it puts a hacky startup in there, not that it really matters much.

I suppose large caps may have got me by, but putting those on the sheet just adds components that are not there in reality.

I think we need a model made up for a 3 phase supply..

Thanks. Jamie

Reply to
M Philbrook

yes but in this case it would be 0, 120 and 240 degrees

The problem being is, spice starts the sine wave at the 0 volt line no matter the phase shift and thus we no long have a symmatrical sine wave with 0 phase. Jamie.

Reply to
M Philbrook

Repeat: do your transformer winding models have any DC resistance?

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

Is it possible to close a switch, between source and load, after an appropriate time into the simulation?

--
Mike Perkins 
Video Solutions Ltd 
www.videosolutions.ltd.uk
Reply to
Mike Perkins

Looks fine to me, in two simulator environments...

formatting link
formatting link

Tim

-- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website:

formatting link

Reply to
Tim Williams

Given that in real life your contactors won't energize all three windings s imultaneously and won't sweetly switch at the zero-crossings, it's probably worth investigating just why that screws up your simulation. I second JL 's suggestion to check how realistic your transformer model is. Zero resist ance and k=1.000000 probably isn't what you want.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

In LTspice there is a function...

stp(x), u(x), unit step, 1 if x > 0, else 0

Multiply your sine function by stp(time-delay) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 

             I'm looking for work... see my website.
Reply to
Jim Thompson

Den tirsdag den 2. august 2016 kl. 02.28.14 UTC+2 skrev M Philbrook:

but that's how it would likely be in the real world when you switch on three phase power and if you turn off after an integer number of cycles it would average out

-Lasse

Reply to
Lasse Langwadt Christensen

Can you post your simulation for us to look at?

Reply to
John S

You want all three sines to start at zero amplitude at T0?

Reply to
John S

yes it does and i wish it would work that way here.

If I don't do anything other than set the phase,voltage and freq, the sine starts at the given phase I entered at 0 volts, not where it should be.

Yours is starting where it should be.

I did note that I just down loaded an updated version of ltspice and running it on a Win10 machine, I don't know if that has any bearing but i am going to test that sim on an older PC with an older install of LTspice to see if there is any difference.

I was able to correct the issue using the delay parameter which did start at the proper level and used a flat line to finally connect to the starting angle of the sinewave.

Maybe I have a bad copy of spice on my pc. jamie

Reply to
M Philbrook

no. I wanted 0 phase to start at 0 which it does and the 120, 240 angle to start at the proper levels.

V = Sin (120) * Level; V = Sin (240) * Level; those are around ~ 0.866 and - 0.866 * level, which is where I would expext the sinewave to start on the left side.

Other posters have shown that it does do that with their test but not here.

I'll try a 3 phase non induciton load this time.. I can't have any DC in it.

Jamie

Reply to
M Philbrook

Just another data point - it works fine for me using the Phi(deg) phase parameter on an AC voltage source. As you find the engine 'very cranky', I'd suggest looking somewhere completely different. Do all your inductors have a little series resistance, for example? Any floating nodes which need a few gigohms to ground?

Cheers

--
Syd
Reply to
Syd Rumpo

Ok, this is the issue, I just experimented using R's and L's tied into a Y network to ground. That worked as it should have.

The problem is doing a Y primary transformer,the secondary having a delta. I have the K properties set so that only each phase is coupled with one secondary as it normally is. So I have 3 K directives using this K1 L1 L2 0.99 L1 being a primary of one of the Y's and L2 being the secondary of one of the delta's and that is repeated for the other two sets

What is happening is the delta on the secondary side is effecting the starting point back to the primary side. It is basically offseting the starting point in the simulation, but this does not happen in the real world! Its adding an offset due to the feed back if you want to call it that. Using the Delay parameter of 5.5ms for the 120 and 11 ms for the 240 fixes that because it starts at 0 volts anyway but delays the actual starting of the sinewave, for which the interpolation is correct.

its just a simple 3 phase transformer, Y primary side and Delta on the secondary side. I have the Star connections bonded to common on the Y side but I guess you could run it unbounded too.

I'll see how large the file is, maybe I can post it here. jamie

Reply to
M Philbrook

Hand-operated breakers are asynchronous to the line, so the random sine phase can squirt some DC into inductive loads. But the circuit resistance will make that DC decay pretty soon. Or eventually.

I don't know if any big breakars are line synchronized somehow. It would seem difficult.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Might I suggest that all should join the LTspice List...

I've learned quite a lot about LTspice from just reading the E-mailed digests. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 

             I'm looking for work... see my website.
Reply to
Jim Thompson

g the

That's very likely an underestimate of k. I've measured power transformers in the 0.9989ish range.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.