analog sim of FPGA control loop

The kids worked on it this weekend, and it works. They did the integrator and after as 32 bits, 7.25 format or something, and clip to

16 bits before driving my DAC.

The Spice model got the loop dynamics right, which sure helped.

I think I'll add a delay line, to simulate all the clocked pipeline delays in the FPGA math, but it seems to work.

Reply to
John Larkin
Loading thread data ...

chnology.com:

ptechnology.com:

know

mit.

igned

n the

ils

o

if

.

mal point ends up

l point

it which

d do the

I'm sorry, but none of this is really making much sense. If you want to mu ltiply by 3 and then saturate the result, that is simple enough to do in ex actly that way. 3 is 2 + 1. 1 * x requires no real operation. 2 * x requ ires a shift. The result of the shift can either be extended by 1 bit or s aturated. The two partial products can then be added with the result satur ated.

However, I believe he is talking about multiplying by 3, but also a calibra tion factor close to 1.0 (which also will not fit his 0 to 0.999.. range if "close to" includes 1 or higher). In that case a proper multiplication is required which he can keep in range by including the 0.75 factor in the co efficient. But... doing the multiply by 4 as a shift by 2 bits will potent ially exceeding the range of 0 to 0.99... In this case it makes more sense to simply change the radix point which requires no logic and treating the result of the proper multiply correctly. This Q2.14 or Q2.16 result can th en be saturated to an appropriate value.

The part I am puzzled by is that he seems to think this requires sticking w ith Q0.16 format all the way through the calculation rather than adjusting the word size appropriately. He talks about multiplying by 4 first which w ould be more likely to saturate than multiplying by 0.75 first. Multiplyin g by 0.75 is going to drop more resolution, but not by much. What is unkno wn is the actual range of values in the starting number in Q0.16 format bef ore doing any of this math. He talks like the saturation is not important, so I suppose these are all unimportant details.

As usual, he is not really explaining everything required to reason out a g ood approach.

--

Rick C. 

+ Get 1,000 miles of free Supercharging 
+ Tesla referral code - https://ts.la/richard11209
Reply to
Rick C

Fair enough - what you are describing is not an overload as I had assumed, but a normal part of the operation.

Reply to
David Brown

That was my thinking - if Q1.15 is not sufficient range to do the job, then use a format that /does/ have the range. And apparently, that's what he now has done.

Reply to
David Brown

Yes. A PM alternator is almost a constant-current source in normal operation, so the rectified DC could be extreme. A FADEC starts up using aircraft 28 VDC, so it can fire up the engine. Then a small dual alternator, geared to one of the fans, takes over powering up the redundant computers. The power supply shorts the alternators before the switchover, and shunt regulates after. That wasn't clear to us when we did the first 3-phase source, and it kept shutting down. Fortunately, we have a great customer, and we are fighting over who gets the blame, in the opposite of the usual direction.

The alternator people won't tell us anything... it's all proprietary. We had to borrow one from an engine manufacturer and test it ourselves.

formatting link

The best simulation seems to be a programmable current-limited 3-phase sine wave. I never liked the math of 3-phase systems. We had to take two semisters of electrical machinery in college and it wasn't popular. Came in handy some decades later.

--

John Larkin      Highland Technology, Inc 

The best designs are necessarily accidental.
Reply to
jlarkin

The usual spelling is semesters. There nothing all that complicated about 3-phase electrical systems - three sets of sine waves 120 degrees apart can be handled by trigonometry, but complex numbers can be used to represent the vectors more concisely.

If you can't even learn how to spell semester, that kind of intellectual effort might have been demanding. Tulane doesn't seem to have attracted clever students.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

Implementing current limiting or short circuit protection for high power 3 phase feeds should not be too hard. Use current transformers in each phase with proper burden resistors in the secondary. After full wave rectification use a single comparator to disconnect the source from all phases.

Works fine for sine wave, but badly filtered class-D PWM waveforms may cause some problems.

Reply to
upsidedown

He never figured out the difference between its and it's.

--

John Larkin      Highland Technology, Inc 

The best designs are necessarily accidental.
Reply to
jlarkin

As if John Doe had any interest in electronics. John Larkin makes money out of electronics, and likes to boast about his own circuits, but is less interested in talking about them, or anybody else's.

It's is a just contraction of "it is" but - like everybody else - I make typo's that make it look as if I've forgetten.

"Semisters" is a rather lower-frequency error, and my spelling -checker does pick it up.

--
Bill Sloman, Sydney
Reply to
Bill Sloman

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.