high update freqency application---thank you very much

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi folks,
  I have an application requiring a very high update frequency. I describe
it briefly here, could someone give me some suggestion ?

I need to send out the command of F = sin(X) to a motor, where X is the
reading of a position sensor.
The X is sensed by a position sensor. Through the A/D card, my computer get
the position value. Then it calculate F(t) = sin(X(t)), and then send the F
command to D/A card, through which the motor gets the command.

My desired updating rate is 10k Hz, so the Windows OS can't handle it(coz
it's multimedia timer's resolution is only 1kHz). What should I do?

Note: the A/D and D/A card manufacturer provide the device driver for
Windows and Linux already.

This is the loop need to have a 10k Hz update rate.
sensor==>A/D card==>computer(calculation of F)==> D/A card ==>motor.



Re: high update freqency application---thank you very much
Quoted text here. Click to load it

Stop trying to do a hardware job with software.  There are a
gazillion proven hardware solutions to your problem.  All of
my favorites involve an FPGA.  A typical commercial product
of this genre is the Mesa Electronics (PC104 form factor)
line of "Anything I/O cards": 4I34/4I34M/4I65.

       - Larry

Re: high update freqency application---thank you very much

Quoted text here. Click to load it
describe
get
the F
it(coz
Quoted text here. Click to load it
~~~~~~~~~~~~~~~~~would you please explain in more details? How this FPGA
communicate with A/D and D/A?
Quoted text here. Click to load it
~~~~~~~~~~~~~~~~~~~~~what does this mean? thanks.

Thank you very much. I agree with you that HW is alway much much faster than
SW. But I guess SW might still be a good choice as following reasons:
(1)The relationship between F and X is not fixed, I need to change it for
different situations, say F= sin(X) this time, but F= 5+ cos(X) next
time--maybe I didn't address the problem clearly.
(2)There is already a device driver, which may simplify my work.




Re: high update freqency application---thank you very much
Quoted text here. Click to load it

Direct connection with wires between the FPGA and the A/D and D/A chip.

Quoted text here. Click to load it

Have you not heard of PC-104?  It's electically the same as an
ISA bus, but with a shrunk connector and form factor.  It's widely
used in embedded applications.  Mese Electronics is online at
  http://www.mesanet.com /

Quoted text here. Click to load it

An FPGA chip is programmable (that's what the "P" stands for).
But its programmability operates faster and more predictably than
a traditional computer.  Hang out in comp.arch.fpga for a while.

Quoted text here. Click to load it

Unless, of course, that device driver, and indeed the entire
computer infrastructure, doesn't meet your needs.

My work applies FPGAs to digitally programmed feedback control,
where the latency from analog input to analog output is about 300 ns.

     - Larry

Re: high update freqency application---thank you very much
Really appreciate the explanation. That helps a lot.
Quoted text here. Click to load it
the
than
for



Re: high update freqency application---thank you very much

 
Quoted text here. Click to load it

(1) This doesn't matter.  If you were to implement your waveform
generator (rather than sine wave generator!) with a FPGA, then it
wouldn't really change the design much.  Your FPGA would include a a DDS
(Direct Digital Synthesiser) with a look up table.  You set up the table
with an arbitrary waveform, tell it what frequency you want and tell it
to go. Once its running the software then doesn't have to get involved as
the FPGA could easily be designed to update a DAC but of course this
involves getting a board with an FPGA + DAC on it or designing one
yourself.

In the description of what you are trying to do, you don't mention the
frequency of your waveform + resolution of frequency setting.  This is
important because it can affect the speed the DDS has to run at.  I
designed a DDS system a few years ago which generated a waveform of up to
50HZ, but the resoltuion on the freqnucy setting was pretty fine so I had
to run my DDS at several MHz so I had to do it in hardware. DDS are not
exclusive to hardware designs, you can implement them in software.  Once
you have decided on the frequency/resolution/accuracy then you can decide
on wether you should implement it in software or hardware.

Regards,

Paul.

Re: high update freqency application---thank you very much

Quoted text here. Click to load it

Hi Sean,
you could compile the real time clock support into your kernel (not 10kHz
but 8,192kHz are possible). Read ../Documentation/rtc.txt which also
contains an example.

Hope this helps,
Juergen

Re: high update freqency application---thank you very much

Quoted text here. Click to load it
describe
send
it(coz
Quoted text here. Click to load it
Thanks a lot. This solution looks very simple and straightforward. But can I
do this we a cheap MCU(microcontroller)?

Quoted text here. Click to load it



Re: high update freqency application---thank you very much

Quoted text here. Click to load it
the
computer
10kHz
I


Pretty probably yes - depending on the required resolution of the signals.

For high-accuracy work, an Atmel AT91 should be enough (32 bits, ARM7TDMI
core). 10 kHz interrupt rate is easy for it, even if there is some
calculation to be done, though, IMHO, the sines should be picked from a
table (e.g. 90 degrees / 256) and interpolated for the low-end bits. It's
not advisable to try to run floating-point function routines at that rate.

HTH

Tauno Voipio
tauno voipio @ iki fi




Re: high update freqency application---thank you very much
Quoted text here. Click to load it

Take a look at the 2022 (www.ubicom.de). It's very fast (150 MOPS),
cheap (some $7 for big quantities) and completely self-contained (RAM,
ROM, Watchdog, peripherals...) It can do Ethernet, USB, serial ports
etc. The development system is Linux or Windows using Linux like tools.

-Michael

Re: high update freqency application---thank you very much
Thanks all you a lot. Folks in this newsgroup are really nice and
warmhearted.

Quoted text here. Click to load it
get
F



Re: high update freqency application---thank you very much
Hi Sean

Linux can't do this due to it's undefined latency. But you can add RTAI
to provide a solid timing.

-Michael

Site Timeline