Control Processor

Discuss the technical details of an "open source" community-driven design of a polywell reactor.

Moderators: tonybarry, MSimon

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

It is CMOS which is more radiation tolerant than BiPolar. Not that any one uses bipolar in processors any more.

You are correct that shielding is in order. It will be tough since every foot adds 2 nS of delay (1 in, 1 out) roughly.

Hopefully, everything will run at 1 MHz or less where the requirements will not be so stringent.

===

Industrial anecdote:

FedEx uses FORTH in their "sign here" computers because they can do major changes very quickly. They did a major revamp in 6 months. The software mgr. estimated that the same level of change would have taken 2 years in C.

More on FedEx:

http://www.forth.com/resources/appNotes/app-fedex.html

Factoring:

http://thinking-forth.sourceforge.net/#DOWNLOAD

The above book is excellent in covering the factoring problem.

There are lots of Free FORTHs on the net if you want to learn it.

Here is one I like:

http://www.forth.com/swiftforth/trial-system.html

Nice Free book on FORTH:

ftp://ftp.forth.org/pub/Forth/Literature/rtfv5.pdf

and this "Starting FORTH" by Brodie:

http://home.iae.nl/users/mhx/sf.html

Here is a chip I worked with in '97.

http://www.elilabs.com/~rj/fish/index.html

An interesting take on software:

http://www.elilabs.com/~rj/spagetti/index.html

I worked with Bob on the above software and hardware. The guy is a programming genius. He loves FORTH for embedded systems.

tonybarry
Posts: 219
Joined: Sun Jul 08, 2007 4:32 am
Location: Sydney, Australia
Contact:

Post by tonybarry »

Have you had a look at the Propeller chip from Parallax? It might be a reasonably low cost way to get upt to speed on SEAforth ... it uses a similar architecture, I expect it will be a heap cheaper, no BGA/SMT devkit required (all TH) ... and it has a Forth compiler (? not sure if it's a straight compiler or some kind of tokenised thing) available. It might be worth a look. I'm rummaging through the net looking for Forth stuff, might be worth getting up to speed on it ... you never can tell.

Regards,
Tony Barry

Thoth
Posts: 8
Joined: Sat Aug 25, 2007 6:19 pm

Post by Thoth »

MSimon wrote:Thoth,

It was exactly the algorithm question that led me to the processor question.
Understood. The message came across a little more brusquely than I intended. I'll have some further thoughts on this topic when it isn't 4:30 AM.

drmike
Posts: 825
Joined: Sat Jul 14, 2007 11:54 pm
Contact:

Post by drmike »

I guess if the assembler is FORTH, I won't notice I'm programming in FORTH!

The sea of processors was started with the TRANSPUTER, which never took off because it was way to far ahead of its time. At this point you can hundreds of processors on a single chip fairly easily and spread out a complicated process to parallel actions and make things go fast even with slow clocks.

Sounds like a fun processor to work with. Good luck getting an eval kit for it!

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

tonybarry wrote:Have you had a look at the Propeller chip from Parallax? It might be a reasonably low cost way to get upt to speed on SEAforth ... it uses a similar architecture, I expect it will be a heap cheaper, no BGA/SMT devkit required (all TH) ... and it has a Forth compiler (? not sure if it's a straight compiler or some kind of tokenised thing) available. It might be worth a look. I'm rummaging through the net looking for Forth stuff, might be worth getting up to speed on it ... you never can tell.

Regards,
Tony Barry
Thanks for the Propeller chip info. I'm looking it up now.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

The Propeller chip is kinda slow.

So far I haven't found a block diagram of the actual processors. What are they trying to hide?

It is nominally a 32 bit chip but from the description of the way the chip operates it looks like the ALU is an 8 bitter.

Top Clock speed is 80 MHz which translates to 20 MHz at 32 bits.

It is non-deterministic. i.e. a branch can take 2X as long when it branches out of a loop. A number of instructions take 7 to 22 clock cycles to complete.

That is from a quick look at the manual.

It looks like the chip is video oriented. Good for games. Good for process control in the 100 KHz range.

http://www.parallax.com/propeller/index.asp

A good alternative to the chips discussed so far might be the Analog Devices SHARC. Although it is a humongous BGA. Very complicated. Harvard Architecture but not stack oriented.

http://www.analog.com/processors/

drmike
Posts: 825
Joined: Sat Jul 14, 2007 11:54 pm
Contact:

Post by drmike »

Yeah, the SHARC is pretty cool. I built debuggers for some of the early versions, but have given up on it. The core processor is very nice, but the external access in some of the versions was crippled or difficult. The ADI floating point flagship is now the TigerSHARC, and that's a complex beast. I think the 2136x versions have a full address and data bus external, so they are pretty easy to work with.

But you really have to need floating point and real time processing to justify using it.

tonybarry
Posts: 219
Joined: Sun Jul 08, 2007 4:32 am
Location: Sydney, Australia
Contact:

Post by tonybarry »

Simon, I don't think the Propeller will cut the mustard in WB-7. But if its architecture and programming are similar, then it might be possible to use Propellor chips offsite to get the programming up to speed (like a hardware stub).

The SEAforth chip (BGA, SMT, microwave clock speeds, board costs circa AUD500 / 10 pieces?) is likely to be outside the budget of private experimenters. Quite OK for the Polywell team, but dev costs often largely centre around programming, and it might be helpful to leverage the considerable programming talent on this forum to get control programs running.

Regards,
Tony Barry

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

tonybarry wrote:Simon, I don't think the Propeller will cut the mustard in WB-7. But if its architecture and programming are similar, then it might be possible to use Propellor chips offsite to get the programming up to speed (like a hardware stub).

The SEAforth chip (BGA, SMT, microwave clock speeds, board costs circa AUD500 / 10 pieces?) is likely to be outside the budget of private experimenters. Quite OK for the Polywell team, but dev costs often largely centre around programming, and it might be helpful to leverage the considerable programming talent on this forum to get control programs running.

Regards,
Tony Barry
Actually. Since we have no idea what the requirements are beyond general speculation, I'm inclined to study the problem for now and just consider options.

The Programs are not difficult to write. Once I get the hang of a processor and have a FORTH to work with I can do the job in short oder. The hard stuff will be getting the hardware to function. FORTHs shine here because you can control them from the console. And you don't need a "main" to call a subroutine. You just type the name in the console.

A PID loop is just adds subtracts and multiplies.

If you want to know about PID loops from a technical standpoint (implementation)

Here is a very good chip to study:

http://www.national.com/mpf/LM/LM629.html

http://www.national.com/ds.cgi/LM/LM628.pdf

http://www.national.com/an/AN/AN-706.pdf

http://www.national.com/an/AN/AN-693.pdf

BTW PID loops are easiest to control when the constants for setting up the loop are times. Look up the Zeigler Nichols method.

I did an autotuning PID once. Basically you find the dead time of the process (the time from the output of a control signal until the system starts responding). That determines the Integrator time constant. If you are using the D term (which I don't generally recommend ) set its time constant to 1/10th the Integrator time constant. The gain will be determined by the slope of the response once you are out of the dead zone.

So the process tells you how to set up the control.

Using time to set up a PID simplifies all the tuning constants.

The equation is Output = G (e + e-sum/Ti + e-change*Td)

Where G is the gain, e is the error, e-sum is the integrated error, and e-change is the rate of change of the error. All this of course gets normalized to the loop time constant and some precautions are taken to prevent wind up. Plus you might want "acceleration" limits. And rate of change (velocity) limits on the output. But any way those are the basics. If you precompute the constants you wind up with 3 multiplies and a bunch of add and compares.

BTW wind up is when the integrator gets "full"because the error has been present for a long time. I usually put a limit on the integrator so that its value*G can't exceed 100% output. I also like to set the integrator to zero when e*G is greater than 100%. However, all this is subject to change depending on how the process actually performs.

Since the purpose of the integrator is to zero out any steady state loop error it really doesn't have to function until the loop is in the proportional range.

===

I had always wanted to learn how to do auto-tuning and some one actually paid me to learn it.

Those are the best kind of jobs.

Well anyway, since I already got paid, I can afford to give it away. :-)

*

As to the cost of the SEAforth chip: Supposedly it is going to be very low cost. If they come in at less than $100 per crack that would be fine with me.

Small fusors have real problems with control. The smaller the device the faster the control speed required. Bigger IS better.

==

Did you know that Japan is the only other nation with a robust IEC program? There is a lot of collaboration between the two nations on IEC.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

Tony,

I forgot the most important part.

The SEAforth chip is free.

At least if you get the simulator. I have it but haven't tried it.

ryip
Posts: 4
Joined: Sat Sep 01, 2007 6:38 pm

Good times

Post by ryip »

Hi MSimon,

I remember you from the MISC mailing list, but didn't realise you were the same person until you started talking about FORTH chips and FPGAs again. There were some fun discussions on that list, though I was mainly a lurker.

Anyway, I suspect there are some control challenges in the Polywell that will have tougher time constraints than can be solved by any digital chip, simply because the latency of converting A/D then back to D/A is a major problem (the faster the DAC, the more jitter and noise you have to deal with).

Particularly if you want to regulate electron density, that might be a problem best done in analog, since I doubt you'll find any e-guns with digital controls that are as fast. That isn't to say the circuits need be purely linear, though obviously if they are, the easier to debug.

I suspect Bussard was using piezo-electric valves precisely because they could be electrically regulated, and have a natural oscillation that could be modulated as needed.

That isn't to say the SEAForth chip wouldn't be cool to use, and there may definitely be other control loops that it'll be suitable for. I couldn't find a price on them though. Do you know if we'll have to buy them in batches? If so, I'll be glad to split some of the cost to get a couple of my own to play with.

-Rae.

tonybarry
Posts: 219
Joined: Sun Jul 08, 2007 4:32 am
Location: Sydney, Australia
Contact:

Post by tonybarry »

Hello Simon,
The free bit sounds very attractive ...
Regards,
TB

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

Yes. The MISC list was great. I learned a lot.

Jeff Fox is at SEAforth. Head of software.

A/Ds and D/As are much faster than they used to be. The chips can take in frequencies as high as 500 to 600 MHz with 8 bit nominal and probably 6 ENOB. Of course they sample at a lower frequency so you would have to band limit them or just use them at a lower frequency. Plus with lower speed chips you can get more bits and more ENOB.

There is a lot of stuff being done in RF these days that was unimaginable 4 or 5 years ago.

I'll get some specs and post them.

ryip
Posts: 4
Joined: Sat Sep 01, 2007 6:38 pm

Post by ryip »

It's good to hear Jeff is alive and well. I was quite dismayed when I heard iTV went under. They had a good idea, but perhaps it was too revolutionary!

Hope Intellasys fares better. :)

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

A/D

Post by MSimon »

Nice little screamer from Analog Devices.

16 bits 100 MHz sampling rate. About 40 to 60 bucks.

Runs hot. 2.8 W 13.2 ENOB at 25C, 30 MHz fin, Parallel port interface.

http://www.analog.com/en/prod/0,,AD9446,00.html

Of course there are lesser chips for less money. A/D speed is not going to be a problem.

And D/As are even faster.

Post Reply