Re: PWM Amp Design




"Larry Brasfield" <donotspam_larry_brasfield@xxxxxxxxxxx> wrote in message
news:Gcd6e.12$F24.425@xxxxxxxxxxxxxxxxxx

[Garbage Spice Simulation Snipped]

> The above simulation should be a convincing demonstration
> that using the controller to get the PWM filtered output
> response apparently desired by the OP is feasable and
> unlikely to present serious problems. Obviously, gains
> and maybe offsets will need adjustment once the VCVS
> is replaced by the PWM IC. When current limiting is put
> into place, some attention to limiting in the controller will
> be in order. A sensitivity analysis for L and C variation
> would be smart. It might be a good idea to make sure
> no limit cycles are possible, using time domain simulation
> and a range of step inputs.
>
> --
> --Larry Brasfield
> email: donotspam_larry_brasfield@xxxxxxxxxxx
> Above views may belong only to me.
>

SNORT!!!!

I don't know which three legged horse you rode in on but perhaps you should
mount up and ride back out again......

Let's just see the error report for your circuit,


Questionable use of curly braces in "c1 vx 0 {7.2?/lpfs}"
error: Error: unknown token in: "7.2[?]/lpfs"
Questionable use of curly braces in "l2 va vx {22.5?/lpfs}"
error: Error: unknown token in: "22.5[?]/lpfs"
Questionable use of curly braces in "b1 va 0 v={{gx}*v(vc)}"
error: Error: undefined symbol in: "(gx)*[v](vc)"
Circuit: * C:\news\carlen\larry.asc

Error on line 4 : c1 vx 0 (7.2?/lpfs)
Unknown parameter "/lpfs"
Error on line 5 : l2 va vx (22.5?/lpfs)
Unknown parameter "/lpfs"

Spice doesn't generate these sort of reports for general entertainment. It
gives you indications about ERRORS in your circuit. The analysis might run
but there is the old adage about 'garbage in, garbage out'.

Shall we try again?

Instead of 7.2?/LPFS try 7u2/LPFS
Instead of 22.5?/LPFS try 22u5/LPFS
Instead of .param LPFS=.1 try .param LPFS=1
Instead of V={GX*V(VC)} try V=GX*V(VC)
L1, that 250? inductor will be interpreted as a 250H inductor. Try the
proper value of 250u.

You could write V=80*V(VC) for B1 and include a note to the effect that you
are assuming that the peak to peak amplitude of the modulator triangle wave
is 2V and you are assuming a bridge supply of 80V. Then you might as well
just use the proper values for the components.

Why you are including all this knob end when it's not really necessary is a
mystery known only to yourself. Are you pretending to be clever or are you
being deliberately stupid so that someone will talk to you?

Oh, R2 serves no visible purpose.

So...... Let's just fix and tidy up your circuit.

Version 4
*** 1 880 880
WIRE -640 112 -672 112
WIRE -640 192 -640 112
WIRE -640 288 -640 272
WIRE -544 592 -544 560
WIRE -544 704 -544 672
WIRE -544 736 -544 704
WIRE -448 112 -640 112
WIRE -432 592 -432 560
WIRE -432 704 -544 704
WIRE -432 704 -432 672
WIRE -336 112 -368 112
WIRE -336 208 -336 112
WIRE -336 704 -336 240
WIRE -288 208 -336 208
WIRE -288 240 -336 240
WIRE -256 112 -336 112
WIRE -256 192 -256 160
WIRE -256 288 -256 256
WIRE -240 160 -256 160
WIRE -240 288 -256 288
WIRE -144 112 -192 112
WIRE -144 224 -224 224
WIRE -144 224 -144 112
WIRE -112 112 -144 112
WIRE -112 224 -144 224
WIRE 0 112 -32 112
WIRE 0 336 0 112
WIRE 0 432 0 384
WIRE 0 464 0 432
WIRE 0 704 -336 704
WIRE 0 704 0 544
WIRE 48 176 48 144
WIRE 48 320 48 176
WIRE 48 432 0 432
WIRE 48 432 48 400
WIRE 80 544 0 544
WIRE 96 704 0 704
WIRE 128 176 48 176
WIRE 128 640 80 640
WIRE 128 672 128 640
WIRE 128 768 80 768
WIRE 128 768 128 736
WIRE 208 544 160 544
WIRE 208 688 160 688
WIRE 208 688 208 544
WIRE 208 720 160 720
WIRE 208 752 208 720
WIRE 240 544 208 544
WIRE 240 688 208 688
WIRE 272 176 208 176
WIRE 272 320 272 176
WIRE 272 432 48 432
WIRE 272 432 272 384
WIRE 336 176 272 176
WIRE 336 208 336 176
WIRE 336 320 336 288
WIRE 336 432 272 432
WIRE 336 432 336 400
WIRE 352 688 320 688
WIRE 416 176 336 176
WIRE 416 544 320 544
WIRE 416 544 416 176
WIRE 416 688 416 544
WIRE 448 112 0 112
WIRE 448 144 48 144
WIRE 448 176 416 176
FLAG -640 288 0
FLAG -432 560 VP
IOPIN -432 560 Out
FLAG -240 160 VP
IOPIN -240 160 In
FLAG 80 640 VP
IOPIN 80 640 In
FLAG -544 560 VN
IOPIN -544 560 Out
FLAG 80 768 VN
IOPIN 80 768 In
FLAG -240 288 VN
IOPIN -240 288 In
FLAG -672 112 VIN
IOPIN -672 112 Out
FLAG 448 176 VX
IOPIN 448 176 Out
FLAG 448 144 VA
IOPIN 448 144 Out
FLAG 448 112 VC
IOPIN 448 112 Out
FLAG 208 752 0
FLAG 0 464 0
FLAG -544 736 0
FLAG -112 224 VERR
IOPIN -112 224 Out
SYMBOL res 320 304 R0
WINDOW 3 36 66 Left 0
SYMATTR Value 2.5
SYMATTR InstName R1
SYMBOL ind 320 192 R0
WINDOW 3 36 65 Left 0
SYMATTR Value 250µ
SYMATTR InstName L1
SYMBOL cap 256 320 R0
WINDOW 0 -11 24 Right 0
WINDOW 3 -2 48 Right 0
SYMATTR InstName C1
SYMATTR Value 7µ2
SYMBOL ind 112 192 R270
WINDOW 0 -25 48 VTop 0
WINDOW 3 -22 59 VBottom 0
SYMATTR InstName L2
SYMATTR Value 22µ5
SYMBOL Opamps\\LT1215 128 640 M0
WINDOW 0 19 -53 Left 0
WINDOW 3 -34 -27 Left 0
SYMATTR InstName U2
SYMBOL Opamps\\LT1215 -256 160 R0
WINDOW 0 -3 167 Left 0
WINDOW 3 -3 192 Left 0
SYMATTR InstName U1
SYMBOL voltage -640 176 R0
WINDOW 123 -91 176 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 -90 152 Left 0
WINDOW 3 -92 200 Left 0
SYMATTR Value2 AC 0 0
SYMATTR InstName VIN
SYMATTR Value PULSE(0 5 10u 10n 10n 500u 500u)
SYMBOL voltage -544 688 R180
WINDOW 0 -62 70 Left 0
WINDOW 3 -76 45 Left 0
SYMATTR InstName V1
SYMATTR Value 10V
SYMBOL voltage -432 576 R0
WINDOW 0 38 41 Left 0
WINDOW 3 37 64 Left 0
SYMATTR InstName V2
SYMATTR Value 10V
SYMBOL cap 352 704 R270
WINDOW 0 32 32 VTop 0
WINDOW 3 0 32 VBottom 0
SYMATTR InstName C2
SYMATTR Value 1n
SYMBOL res 336 528 R90
WINDOW 0 -25 70 VBottom 0
WINDOW 3 -31 63 VTop 0
SYMATTR InstName R3
SYMATTR Value 12K
SYMBOL res 176 528 R90
WINDOW 0 -23 54 VBottom 0
WINDOW 3 -26 49 VTop 0
SYMATTR InstName R4
SYMATTR Value 12K
SYMBOL cap -192 128 M270
WINDOW 0 53 32 VTop 0
WINDOW 3 59 31 VBottom 0
SYMATTR InstName C3
SYMATTR Value 1n
SYMBOL res -464 96 M90
WINDOW 0 -23 49 VBottom 0
WINDOW 3 -29 55 VTop 0
SYMATTR InstName R5
SYMATTR Value 12K
SYMBOL res 336 672 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R6
SYMATTR Value 1K
SYMBOL e 48 304 R0
WINDOW 0 37 46 Left 0
WINDOW 3 38 70 Left 0
SYMATTR InstName E1
SYMATTR Value 80
SYMBOL voltage -16 112 R90
WINDOW 0 -32 56 VBottom 0
WINDOW 3 32 56 VTop 0
WINDOW 123 39 54 VTop 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VAC
SYMATTR Value ""
SYMATTR Value2 AC 1 0
TEXT -548 790 Left 0 !.ac dec 20 1 500K
TEXT -552 816 Left 0 ;.tran 0 100u 0



Much prettier.

You're doing it again, I've told you about this before. You are plotting the
closed loop response rather than measuring the loop response. See how I've
inserted an AC source, VAC, in the loop.

Do an AC analysis, the circuit as given is set up to do that, and plot
V(VERR)/V(VC). Notice how it crosses over at 400KHz with little to no phase
margin.

Let's just ignore the fact that this is supposedly a model of a PWM
amplifier operating at 125KHz.

Don't believe it?

Right Click on .ac dec 20 1 500K and turn it from a Spice Directive to a
Comment. Right Click on .tran 0 100u 0 and turn it from a Comment to a Spice
Directive.

Run the transient analysis and plot V(VERR). You will notice that it's
ringing a bit. Do an FFT on it...... That's right it's ringing at 400KHz,
the loop crossover frequency.

You've, sort of, got a bit of it right. But, seriously, your bunch has no
bananas. Before you rush off and intersperse my wonderful critique of your
mess with 800 lines of blibble.... try to shut up.

DNA



.