EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

DSP using a non DSP processor

Started by Rohan September 1, 2006
My requirement is to use a moderate controller (Non DSP) and take
analog sinusoidal signals (half second cycle 50 hz) , take their
samples, do a Fourier transform to remove harmonics and then multiply
them to find instantaneous power. Then do a Low Power Filtering
operation on this power signal.
Is it possible? has anyone implemented anything similar or am I being
too ambitious?
please post your comments about its feasibility.

Thanks,
Rohan

Rohan wrote:

> My requirement is to use a moderate controller (Non DSP) and take > analog sinusoidal signals (half second cycle 50 hz) , take their > samples, do a Fourier transform to remove harmonics and then multiply > them to find instantaneous power. Then do a Low Power Filtering > operation on this power signal. > Is it possible? has anyone implemented anything similar or am I being > too ambitious? > please post your comments about its feasibility. > > Thanks, > Rohan >
The big question is "in real time?". Do you want to do this in C ? So, Yea but, is your answer.
Rohan wrote:
> My requirement is to use a moderate controller (Non DSP) and take > analog sinusoidal signals (half second cycle 50 hz) , take their > samples, do a Fourier transform to remove harmonics and then multiply > them to find instantaneous power. Then do a Low Power Filtering > operation on this power signal. > Is it possible? has anyone implemented anything similar or am I being > too ambitious? > please post your comments about its feasibility.
It is possible, depends on your precision, harmonics and samples. I've seen some of the better 80C51's used for mains FFT work. Look at some of the metering ICs like http://www.tsc.tdk.com/products/product_category_detail.cfm?category_key=27 or http://www.austriamicrosystems.com/03products/11_metering.htm -jg
Rohan wrote:
> My requirement is to use a moderate controller (Non DSP) and take > analog sinusoidal signals (half second cycle 50 hz) , take their > samples, do a Fourier transform to remove harmonics and then multiply > them to find instantaneous power. Then do a Low Power Filtering > operation on this power signal. > Is it possible? has anyone implemented anything similar or am I being > too ambitious? > please post your comments about its feasibility. > > Thanks, > Rohan >
Are you sure that Fourier is the way to go instead of a simpler low-pass filter? You can implement a quite fancy filter at about 70 Hz corner frequency with the calculation tedium of a FFT / inverse FFT pair. The main difference of a DSP to a more common processor is the ability to make a very fast scalar product of two vectors, i.e. multiply the vectors element-by-element and add the products. If your application stands doing the same with a garden-variety processor, you can use it. To get a reasonable amount of samples in a cycle, you will need a sample rate around 1000 samples per channel and second. This is not a problem for modern controllers. A good point to ponder is whether a 8 bit controller can handle it or if a more powerful 32 bit chip would better fill the bill. The main considerations here are cost and needed calculation resolution. (I'd consider some of the ARM's here, e.g. Atmel AT91's). -- Tauno Voipio tauno voipio (at) iki fi
Tauno Voipio wrote:
> Rohan wrote: > > My requirement is to use a moderate controller (Non DSP) and take > > analog sinusoidal signals (half second cycle 50 hz) , take their > > samples, do a Fourier transform to remove harmonics and then multiply > > them to find instantaneous power. Then do a Low Power Filtering > > operation on this power signal. > > Is it possible? has anyone implemented anything similar or am I being > > too ambitious? > > please post your comments about its feasibility. > > > > Thanks, > > Rohan > > > > Are you sure that Fourier is the way to go > instead of a simpler low-pass filter? > > You can implement a quite fancy filter at about > 70 Hz corner frequency with the calculation > tedium of a FFT / inverse FFT pair. > > The main difference of a DSP to a more common > processor is the ability to make a very fast > scalar product of two vectors, i.e. multiply > the vectors element-by-element and add the > products. If your application stands doing > the same with a garden-variety processor, > you can use it. > > To get a reasonable amount of samples in a cycle, > you will need a sample rate around 1000 samples > per channel and second. This is not a problem > for modern controllers. > > A good point to ponder is whether a 8 bit controller > can handle it or if a more powerful 32 bit chip > would better fill the bill. The main considerations > here are cost and needed calculation resolution. > > (I'd consider some of the ARM's here, e.g. Atmel AT91's). > > -- > > Tauno Voipio > tauno voipio (at) iki fi
I think low pass filter is a good idea. can you guide me how the FFT / inverse FFT pair could give a corner frequency of 70hz. this should solve the problem I am using a renesas R8C series 16 bit processor. This is the first time i am dealing with analog/digital signals so my knowledge is limited to the books. Its the function of a AD7751 metering IC whose function I have to emulate inside the controller. Yes it has to be done in real time. So logic should be about 1000 samples per second, Low pass filter at 70 hz, multiply over a cycle and take average? is it feasible? And also do ADC give a negative value for negative half cycles. If no then how do you take care of it?
Rohan wrote:

> I think low pass filter is a good idea. can you guide me how the FFT / > inverse FFT pair could give a corner frequency of 70hz. this should > solve the problem
The filter should be done *without* any Fourier transform at all. Please get an elementary textbook on digital signal processing and learn the filter design. There are quite a lot of different design decisions that *you* have to make.
> I am using a renesas R8C series 16 bit processor. This is the first > time i am dealing with analog/digital signals so my knowledge is > limited to the books. > Its the function of a AD7751 metering IC whose function I have to > emulate inside the controller. > Yes it has to be done in real time. > So logic should be about 1000 samples per second, Low pass filter at 70 > hz, multiply over a cycle and take average? is it feasible?
IMHO, yes. It depends on your other design decisions, however.
> And also do ADC give a negative value for negative half cycles. If no > then how do you take care of it?
Pretty many ADCs can be set up for bi-polar operation. Have a look at the manual of the converter you have. -- Tauno Voipio tauno voipio (at) iki fi
Rohan wrote:
> My requirement is to use a moderate controller (Non DSP) and take > analog sinusoidal signals (half second cycle 50 hz) , take their > samples, do a Fourier transform to remove harmonics and then multiply > them to find instantaneous power. Then do a Low Power Filtering > operation on this power signal. > Is it possible? has anyone implemented anything similar or am I being > too ambitious?
I have designed a similar (but quite simpler) system. The idea is in using fast FIFO memory to read from ADC and hold a signal and then operate with data in non-real time by slow mcu.
Eugene V. Upenik wrote:
> Rohan wrote: > > My requirement is to use a moderate controller (Non DSP) and take > > analog sinusoidal signals (half second cycle 50 hz) , take their > > samples, do a Fourier transform to remove harmonics and then multiply > > them to find instantaneous power. Then do a Low Power Filtering > > operation on this power signal. > > Is it possible? has anyone implemented anything similar or am I being > > too ambitious? > > I have designed a similar (but quite simpler) system. The idea is in > using fast FIFO memory to read from ADC and hold a signal and then > operate with data in non-real time by slow mcu.
Hi all, Thanks for the wonderful support. Have got the book and working on my DSP skills. Thats the most important first step. Thanks hi Eugene. I am also looking at simplifying design. I have to ensure I have an average power being calculated every half second. so its like non real time. could you guide me a little more about what kind of system you are using. I couldn't get the logic from your post. Thanks a lot
On 31 Aug 2006 21:45:22 -0700, "Rohan" <rohanshar@gmail.com> wrote:

>My requirement is to use a moderate controller (Non DSP) and take >analog sinusoidal signals (half second cycle 50 hz) , take their >samples, do a Fourier transform to remove harmonics and then multiply >them to find instantaneous power. Then do a Low Power Filtering >operation on this power signal. >Is it possible? has anyone implemented anything similar or am I being >too ambitious? >please post your comments about its feasibility.
Look here. There is a reference design available. http://www.maxim-ic.com/solutions/electricity_metering_system/index.mvp Mit freundlichen Gr&#4294967295;&#4294967295;en Frank-Christian Kr&#4294967295;gel
    C dont do machine code , Forth does .
   H/w is too cheap to ignore ....

_____________________________________________


Donald wrote:
> Rohan wrote: > > > My requirement is to use a moderate controller (Non DSP) and take > > analog sinusoidal signals (half second cycle 50 hz) , take their > > samples, do a Fourier transform to remove harmonics and then multiply > > them to find instantaneous power. Then do a Low Power Filtering > > operation on this power signal. > > Is it possible? has anyone implemented anything similar or am I being > > too ambitious? > > please post your comments about its feasibility. > > > > Thanks, > > Rohan > > > > The big question is "in real time?". > > Do you want to do this in C ? > > So, Yea but, is your answer.

The 2024 Embedded Online Conference