Post Go back to editing

How to get the index of a signal

Category: Software
Product Number: 1701
Software Version: 4.7

I need to take one from multiple signals, say max peak signal, I can use the following method, but I need more channel processing, how can I do it concisely, thanks

  • Hello brodytyler,

    If you want to detect the signal which has the highest peak among other signals then please look at the below example, I have used sines waves of different amplitudes (gain level) in this example and I ended up getting the highest peak contain signal. I used  periodic signals as an input here to show an easy demonstration.



  • Hi Harish,Thank you for your reply, there are 8 signals in the example you gave, we get the signal with the largest peak through the operation, but what I need is the index of the largest signal, which is used to take the original signal, just like the example I gave

  • Hello ,

    Thanks for the information.

    Please look at the below attached pictures. I have 4 inputs. Among those four inputs the signal which has the highest peak will be chosen as the input of the mux. i.e the index control of the mux will be based on the highest peak contain signal.

    Ex. The signal with -1dB gain is the highest peak contain signal among others. So that is 4th input (index 3). The index is shown in the readback cell. Then then index 3 is given to the control pin of the mux. So obviously the mux chooses the highest peak contain signal as its input and give it in the output side.

    The same set up for eight inputs.

    As you asked , You will get the index of of signal which has the highest peak, you can see the index number in the readback cell. If this is what you asked for then please get the attached project.


    Kindly do reply if you need anything.



  • Thank you again, I wonder if there is a more concise scheme, if I have 16 sets of inputs, I will draw for a long time

  • Hello brodytyler,

    I talked with Harish and we decided that I would provide an easier to expand version of this for you. 

    I created an hierarchy board that will compare the two signals and output the result. It also switches the audio and provides the highest audio out at the end of the chain. 

    Here is the start of the chain:

    Then the end of the chain:

    The meter is showing the resulting highest audio so this you should send out of the DSP. I just realized I forgot to put the output block there. 

    Then I am showing the resulting index for the highest signal level.

    All you have to do to expand is copy and paste and then go into the block and update the DC cell that holds the number for the new signal. Do Not change the 0 and 1 DC cells, those drive the MUX blocks. 

    Here is what is inside the block. 

    I have built this project for the ADAU1467 like Harish had been showing, then I created the same project for the ADAU1701. There are slight differences between them due to the differences in the DSP cores. 

    You can find the two projects below.

    Dave T



  • Think you Dave, You gave me a good idea to return the result of the last operation. The problem now is the lack of computing power. I need to add about 80 instructions to add a signal, which is too much for my 1701. Thanks again

  • Hello brodytyler,

    How are you getting 16 channels into the ADAU1701? 

    Unless you use an external controller to do all of these comparisons then I think you need to upgrade to a Sigma300/350 core. You simply may be trying to squeeze too much out of the 1701. 

    Dave T