Showing posts with label DSP. Show all posts
Showing posts with label DSP. Show all posts

Thursday, December 2, 2010

Embedded DSP Processor design Notes

DSP has turned out to be one of the most important technologies in the development of communications systems and other electronics. After Marconi and Armstrong’s invention of basic radio communication and transceivers, users were soon unsatisfied with the poor communication quality. The noise was high and the bandwidth utility was inefficient. Parameters changed due to variations in temperature, and the signals could not be reproduced exactly. In order to improve the quality, analogue radio communication had to give way to digital radio communication.

Coding for communications can be further divided into reliable coding (for error detection and error correction) and efficient coding (compression).

Without special hardware acceleration,the performance of Huffman coding and decoding is usually much lower than one bit per instruction. With special hardware acceleration, two bits per instruction can be achieved. Huffman coding and decoding are typical applications for a FSM (Finite State Machine).

Voice (speech) compression has been thoroughly investigated, and advanced voice compression today is based on voice synthesis techniques.

---------------------------------

it’s quite a good book in DSP processor design, and here is some of my thoughts.

Most current DPS algorithms are predictable, streaming computing is currently sufficient. However, more intelligent DSP applications are emerging and introduced such as language recognition, etc. Searching and sorting algorithms are used by intelligent signal processing. We therefore plan to analyze behaviours of most used sequential algorithms in intelligent DSP and implement them into ASIP.

Systolic array

  • MIMD like engine
  • reduce Load/Store instructions by evolving data on the array
  • controlled by MIMD like instructions with loop-able syntax

Analogue computation

when accuracy and computation result need not to be point but range reproducible. it is a good candidate for power,performance and area improvements.

  • pros

      fast, low power, smaller size, addition is almost free, just merge wires

  • cons

      noisy, not good for multiplication or differentiation, need extra ADC, DAC interface.

 

read more at

http://hrl.harvard.edu/analog/

http://hrl.harvard.edu/

 

some time adding electrons together is much elegant than using them as fuels for the ALUs… but only some times!  

 

------------------

some old thoughts about systolic array, FYC, I merge it into DSP area.

systolic array was a  hot research topic in the 80’s, but just like all the other parallel computing research, they all suppressed by the exponential performance growth of sequential machine offered by Moore's law.

but things will not always go faster, the sequential machines has certainly reached a wall in terms of both power and speed.

so it make us start rethinking parallel, and especially how software behaves and hardware implementation to match them.

the are few concepts are very helpful.

  • computer architecture design is a optimization process which find best solution to match the software-hardware behaviour given the constrains of communication and computation cost.
  • as the transistor size shrinks, clock frequency increases, the communication cost is getting bigger than computation.
  • many techniques such as cache, parallel memory banks, data pre-allocation, traffic data compression, or even dynamic traffic optimization. were used to balance the imbalance of communication and computation.
  • if software = algorithm + data structure, then they both adaptable to hardware environment. but if the adaptation has reduced the performance of the software too much, hardware will also adapts to software to better match it’s behaviour. such as GPUs and OpenGL.
  • model based design is very useful to capture software behaviours.
  • systolic and cellular array provided MIMD like behaviour with looping capabilities.

Friday, May 21, 2010

Pink noise beat analysis -part2

 

windowing effect in the spectrum

peak detection method

  1. method for AM sin wave
  2. http://www.mathworks.com/products/demos/shipping/dspblks/dspenvdet.html#7
  3. but for a drum beat, it fails, because the carrier wave is not a narrow band signal
  4. need to use the neighborhood method, details here http://billauer.co.il/peakdet.html
  5. noise in the signal can also effect the neighborhood method, so may need to to some threshold.
  6. peak can be sharp or flat, so

Sunday, March 7, 2010

Jacobi iterations and vector rotation

The Jacobi method [see wiki] for solving liner system is based on the fact that matrix multiplication will rotate the vector and converge if the infinity norm of Eigen values are less than 1.

From a practical point of view, the performance of convergence is determined by the spectral radius [see wiki] of the matrix. and the small the spectral radius the better.

CORDIC computations are also a sequence of rotations but the rotation matrix is adaptive. the spectral radius of rotation matrix is always 1, but when rotating using shift & add, the spectral radius is slightly bigger than 1, but as the rotation angle –>0, the spectral radius->1, so resulting vector converge to the set angle/point. more information about CORDIC please check these papers.

I have also wrote a matlab script for visualizing the path of the vector converge/ diverge. the red curve shows the path, and green/blue lines are the lines defined by eigenvectors. note that the rotation vector is random.

%%  eig value roatation divergence/ convegence
N=100; %number of interations
r=rand(2,2);

[l v]=eig(r);
x=N*ones(1:N,2);
eigenvalu_max=max(max(v))
if eigenvalu_max<1.1


    for i=1:N+1
x(i+1,:)=r*x(i,:)';
end
end

%compass(x(:,1),x(:,2));
plot(x(:,1),x(:,2),'r'); axis equal; hold on
plot([-N:N]'./l(1,1),[-N:N]'./l(2,1),'g');
plot([-N:N]'./l(1,2),[-N:N]'./l(2,2),'b'); hold off;


eigen_rotation1



the path of convergence some oscillate along the way down to 0, this another interesting fact about eigenvalues, so far I am still not very sure the exact reason, but I have some ideas, maybe I will post another one when I got the time to prove it.

Saturday, March 6, 2010

Pink noise beat analysis -part1

pink noise [see wiki] is a very interesting phenomena where the frequency spectrum has a 1/f curve.

but many musical instrument’s harmonics often show this 1/f like curve as well, a interesting fact is, if the frequency spectrum curve is smooth (no leakages [see wiki] or holes ), then they don’t sounds like noise any more. otherwise they sounds more noisy.

blow is a sample pink beat I found from this link http://www.brusi.com/downloads.shtml, a download  link is provided below, you can try it first and then read on.

in matlab, the periodogram analysis shows the PSD like this,

pink beat

and the time domain waveform as below

pink beat_time

to compare it with another base generated by Maxim Vedenev

from http://dj-toolbox.9f.com/

drum beat_time

and PSD

drum beat_psd

personally, I would say the pink beat is more rich with dynamics and sounds more attractive,and the drum beat is more pure and more leaky in the spectrum, but that’s not end of story.

I will post a second blog which explain the windowing effect on PSD and spectral smoothing. thanks for reading.