Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

MATLAB EQ: Approach: Use of Frequency Binning to Apply Frequency Gains


The main focus of a graphic equalizer is to manipulate different bands of frequencies, and then reconstruct them. Therefore, to manipulate the frequencies, a group of samples were taken, and the Fast Fourier Transform of the sample set was computed. In order to maximize the efficiency of the FFT, a sample set of a power of two was used. FFTs maximize symmetry in the Discrete Fourier Transforms and are best able to do that for signals of power of two lengths. Hence a refresh rate such that 2048 samples were taken in was chosen.
Once the signal is put into the Fourier domain, we then need to separate the frequencies into the desired bands so that they can be displayed, operated on, and then be displayed in their updated state. To do this we used a binning matrix. The matrix binned according to a logarithmic Q binning pattern. This means it puts the first and 2048th frequency in the first bin, the second, third, 2047th and 2046th frequencies in the second bin and so on and so forth. The matrix below is an example of how a bin matrix would look for an eight bit Fast Fourier Transform.
Figure 1: Example of a bin matrix for a length 8 FFT.
Figure 1 (graphics1.png)
The code to generate matrices of this form is below.
[n, bin] = histc(freqs, freqbins);
bin = bin(:,1:spt/2);
binmatrixa0 = zeros(length(n)-1, length(bin));
for k = 1:(length(n)-1)
binmatrixa0(k,:) = bin == k ;
end
binmatrixb0 = fliplr(binmatrixa0);
binmatrix0 = [binmatrixa0, binmatrixb0]
Once the bins are generated by multiplying the bin matrix with the FFT vector, the bins’ L2 norms are generated and displayed in bar graph form. Then, all the contents of all the bins are multiplied by what the user inputs in the GUI slide bars. The L2 norms are taken again and displayed in a bar graph as well.
The multiplying the frequency bins by a constant, it is the equivalent of passing the signal through several different ideal band pass filters. This is possible, because the signals are of finite length. Therefore, a discrete sinc of this length can create a perfect discrete band pass filter.
Once these gains have been applied, the vectors representing each of the bins are recombined to reform a 2048 Fast Fourier Transform vector. The signal is then Inverse Fast Fourier Transformed to allow for the display of the time wave form, and to allow for the application of time domain effects.
The last problem that needs to be taken into account is the phase. Due to the application of non-uniform gain to the bins, there is phase added to the output waveform. This phase needs to be removed, because the equalizer is supposed to output to speakers, and speakers can only interpret real signals.

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.