Computational power needed for a digital PLL

Discussion in 'General Electronics Chat' started by richiechen, Dec 20, 2012.

  1. richiechen

    Thread Starter Member

    Jan 1, 2012
    Hi everyone,

    I am trying to implement a digital Lock-In Amplifier in a microcontroller or DSP. However, I dont know how fast do the controller/DSP need to be. I will try to describe how the Lock-In Amplifier works and could you help me to figure out the computational power needed?

    I am trying to get amplitude of 1kHz sine wave buried in noises. The signal will be measured by a 16-bit ADC first at 128ksps sampling rage.

    Then it will be multiplied by two orthogonal sine waves in DSP. After this, the results will go through a DC pass filter to get the DC value. To do this, will 70MIPS enough?

    Please tell me if you need more information to tell the computational power needed.

    Thank you very much.

    Last edited: Dec 21, 2012
  2. Brownout

    Well-Known Member

    Jan 10, 2012

    I believe it's going to be very hard for anyone to understand what you're trying to do from your description. But I'll try to give you a general method to calculate your requirements. First, analyze your algorythm and decide how many operations per second is required. Then, determine the average CPU instructions per operation. This might be difficult. To do this, take a samping of operations you're using, list all the instructions, look up the instructions per operatoin for each one in your CPU's documentaion, and average the results. Multiply the average instructions per operations by the required operations per second from your earlier analysis. This will give you the number if instructions per second you will require. Until you do all this work, there isn't a good way to know if your processor will do the job or not.

    Also, test your analysis with a emulator for your processor if possible.
  3. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    You could do that task of measuring the 1kHz content in a signal with a PIC16F or 18F, you don't need a 70 MIPS DSP processor!

    Also you don't need 128kHz sampling to get an accurate reading on a 1kHz amplitude, even at 20kHz you will get 10 samples per half wave which is enough for your algorithm.