texts:
Assume we are receiving gaussian pulses and I'd like to do some sort of band-pass filter on the standard deviation $\sigma$ - as best as can be done. Is there a way to do this?

I have looked on google, and there are several mentions of gaussian wavelet filters, but I don't think these are what I'm looking for.


texts:
I am little bit confused over these two. As per my understanding, spatial domain is the usual method we did in matlab by using the function fft2, which will return a complex value for each pixel. What about temporal? If it is a sequence of images, how do I obtain the 'temporal Fourier domain'?

If you looking at the image, is it true that the temporal Fourier domain shall have the same shape as the spatial domain image (shown in figure is the amplitude of Fourier domain)?


texts: Why Fourier series if Fourier transform can be calculated for both periodic and aperiodic?

texts: While learning about Fourier Transform after Fourier Series, That we can calculate Fourier transform of periodic signals too. If we can take the Fourier transform of periodic signal too then my question is why we Fourier series if Fourier transform can be calculated for both periodic and aperiodic?


texts: Speech segmentation for speaker recognition

texts:
I'm trying to implement a speaker recognition system and want to make sure I'm aware of the latest trends in speech segmentation. I've read a number of very different methods at a higher level but I'm not sure which one would be best for my particular situation. I'll list what I found so far and I'd appreciate either (a) comments on the research I've done so far or (b) popular methods that I didn't mention that I should know about. Then I'll take it from there in terms of determining what will work best for my situation.

Techniques for Speech Segmentation
(that I've identified so far)

I've read that strong long-term modulation frequencies between 1-16 Hz are indicative of speech activity, but haven't been able to find any good explanations of what exactly these are. What I've been able to determine so far is that they are the temporal spectrum of specific frequency bands. (Unsupervised speech/non-speech detection for automatic speech recognition in meeting rooms by Maganti et al)
Using energy variance (high variance implies speech-like segments) independently or with other methods to build a Gaussian mixture model with two components: one for speech and one for noise, and then re-classifying windows as either speech or non-speech. (An unsupervised, sequential learning algorithm for the segmentation of speech waveforms with multiple speakers by Siu et al)
Using the Voting Experts algorithm, which utilizes iter- and intra- window entropy (a window in this sense is a 'window of windows') to determine where "chunks" are using a feature that has high inter-segment entropy, and then to classify these chunks as either speech or non-speech using 2-means clustering, where each cluster of chunks contains all chunks of one of the two classes. (Voting Experts: an unsupervised algorithm for segmenting sequences Cohen et al)

The short version of my question

Ultimately, I'd really like to know what is standard in the industry as of right now.  Then I can determine what will work best for my particular situation once I have a little more base knowledge.


texts:
According to Wikipedia, audio frequency-shift keying (AFSK) is done by using binary FSK, i.e. 2 tones of different frequencies, a tone for the 1 bit and a tone for the 0 bit.

But isn't it possible to choose more than 2 frequencies (any frequency between 0 and half the sampling rate) to transmit more than binary data?
Why don't we use say 10 tones of different frequencies, to transmit in decimal, or say 256 tones to transmit in chars?  Wouldn't that make transmission much more efficient?


texts: nature of output of the addition of white noise with colord noise

texts: I want to know that the addition of a uncorrelated time series x with a correlated time series, say y generates a time series but is that correlated or uncorrelated output? For example: x is White Gaussian noise and y is pink noise, then z = x+y Looking at the plot which is the output of the noisy time series, it is hard to say whether z is correlated or uncorrelated. Is there a rule about the nature of the output?


texts: Differential Equation and Transfer Function of Multiple Summer Integrator Block Diagram

texts:
I've been working on this more than 5 hour,
I know how to solve feedback, summer, but was not able to solve this one,
I've tried to simplify it by choose A(i) to be the first output of first summer and B(i) to be the second output of second summer

A(t) = u(t) + int(B(t))
B(t) = int(A(t) + y(t)
y(t) = int(int(B(t))

When I'm substituting A(t), its getting worse, forever recurs
y(t) = int(int(int(A(t))+y(t)))
y(t) = int(int(int(u(t)+int(B(t))

I've tried to use simulink, (I'm a newbie) and  I got 1 / (s^3 - s)
and I don't even know how to output the differential equation in matlab

How do I derive the solution?


texts: Filtering 50Hz using a notch filter in MATLAB

texts:
I've read up a lot about this, but haven't been able to piece everything together successfully, so I'm looking for some help.

I need to filter 50 Hz from a signal. It looks like the best options are either a notch filter or a LMS filter, but I don't have a copy of the noise so a notch filter seems to be the best choice.

I don't need the frequencies normalised, as I know the sampling frequency (16kHz), and the duration is 30 seconds. The bandwidth can be fairly tight, 49.5Hz ~ 50.5Hz should be fine.

It looks like I need to use a combination of filter and iirnotch, but I'm not entirely sure how.

If someone can bring this all together I would greatly appreciate it. Thanks.


texts: 2nd derivative using gaussian filter (gnu scientific library) - offset?

texts:
I am working on an application where I use gaussian filtering (convolution) to smooth a signal and at the same time get the 1st and 2nd derivative in real time. The signal is an equidistant sampling of a time series which is not equidistant.

I am using the GNU scientific library to generate the kernels I am convolving with. I am using the gsl_filter_gaussian_kernel function, with parameters vector length 1001, alpha 3.0, with normalization, to generate kernels for order 0, 1 and 2.

The sum of the kernel values for order 1 and 2 does not equal 1 while for order 0 it does. When I convolve my data (only positive values with a value typically roughly around 9500.0 and with unknown range) with the kernels for order 1 and 2, I get a signal that has a DC offset on it rather than being centered around zero, making it hard to know whether the derivatives cross through zero or not and whether they are negative or positive. I need to know this to be able to determine local maxima and minima.

Looking at the source code of the GSL I have the impression kernels for order 0 are normalized, but not for higher orders. What would be the best solution to get a signal for orders > 0 that is centered around zero?


texts:
I can't find out if it possible to compute the minimum-phase response corresponding to a given magnitude response using a Hilbert transformer. Is that possible?

When I write Hilbert transformer I mean a 90-degree phase shifter.

I know other ways to compute the minimum-phase response but since there are IIR filters that approximately can realize a Hilbert transformer I was wondering if it is possible to use the Hilbert transformer. Not sure if the answer is obvious but it is not a homework question.

Edit:

Implementation of proposed

function y = test_minph(Mag)
    Mag  = Mag(:);
    x    = [Mag; Mag(end-1:-1:2)];
    len  = length(x);
    N    = (len)/2-1;
    wn   = [0; -1i*ones(N,1); 0; 1i*ones(N,1)];
    xhat = real(fft(log(x)));
    y    = -ifft(wn.*xhat);
end

But the question is about how to compute the below using a Hilbert transformer (if possible) which is what robert johnson proposed.

function y = minphase(Mag)
    Mag  = Mag(:);
    x    = [Mag; Mag(end-1:-1:2)];
    len  = length(x);
    N    = (len)/2-1;
    wn   = [1; 2*ones(N,1) ; 1; zeros(N,1)];
    xhat = real(ifft(log(abs(x))));
    y    = imag(exp(fft(wn.*xhat)));
end

So it seems there are two different Hilbert transforms in play (don't know if they are dual) and I'm not sure how to compute the minimum-phase Hilbert transform using the 90 degree phase shift Hilbert transform. I hope it makes sense.


texts: spectral mask and power spectral density

texts:
I have been reading a paper that specifies the spectral mask for certain communication devices attempting transmit over a channel

Can someone explain

1) importance if this spectral mask, is it a filter ?

2) what do we mean by roll off at the pass band from -28 dBr to -20 dBr.

3) Also why is the unit of measurement dBr and not db

Thank you very much


texts: Is it possible to normalize an un-normalized cross-correlation vector after computation

texts:
I have a C++ code that computes cross-correlation for a given 2 vectors as input. It doesn't have an implicit normalization or normalized implementation of cross-correlation. But I would prefer a noramlized output. I referred the Wikipedia article on cross-correlation and it states the following formula to get a normalized cross-correlation:

I was wondering:

since $\sigma_f$ and $\sigma_t$ and are going to be a constant scalar for any given vectors, can I just multiply
$$
\frac{1}{n * \sigma_f * \sigma_t}
$$
to the cross-correlation vector and obtain a normalized cross-correlation vector? Please correct me if I'm wrong here and suggest a way to do it if it's possible.

what can be done if both input vectors are not of the same size? Is zero-padding the shorter vector the only option? Or can the above factor be modified to accomodate both the lengths?


texts:
I am currently working on compressed sensing and sparse representation of signals, specificly images.

I am frequently asked "what is sparsity definition?". I answer "if most elements of a signal are zero or close to zero, in some domain like Fourier or Wavelet, then this signal is sparse in that basis." but there is always a problem in this definition, "what does most elements mean? Is it 90 percent? 80 percenct? 92.86 percent?!" Here is where my question arises, is there any exact, i.e. numerical, definition for sparsity?


texts: Effects of sampling rate approaching the Nyquist frequency? (not undersampling)

texts:
I understand that you need to sample at a frequency greater than or equal to the Nyquist frequency to reconstruct a signal/aliasing etc. I read though that a "more conservative" approach is to sample at 2x-5x the Nyquist frequency (Rampil '98, on EEG processing). Assuming signal bandwidth doesn't extend beyond $F_N/2$ (has been low-pass filtered), are there effects/advantages of sampling at higher frequencies than $F_N$? That is, if I have a signal with no components above 100Hz, is there an advantage to sample at 1kHz vs at 200Hz?

The context is that I'm resampling various signals (EEG, EMG, joint angles) to a common time basis and need to pick the target frequency. Processing time is fast enough to not be a huge concern, but I do want to decrease it somewhat.

Thanks!


texts: signed 2's complement of a negative number for Integer = 3 and Fraction = 9

texts:
I am working on signed 2's complement for my fractions coefficients. Below code can be used for positive inputs. However for a negative 2's complement when I added LSB with 1, then an error pops. I think it is because of overflow. Now How can I convert negative coefficients using 2's complement for I and F of 3 and 9? and how to deal with overflow?
a = 0.7; % coefficient (actually for -0.7)
n = 3;         % number bits for integer part of your coefficient
m = 9;         % number bits for fraction part of your coefficient
% binary number
de2bi = fix(rem(a*pow2(-(n-1):m),2));
% signed 2's complement for negative numbers
negadd = [1];
negadd = [negadd, zeros(1, length(de2bi) - length(negadd))];
flipadd = fliplr(negadd);
magsig = fliplr(de2bi(bi2de(fliplr(de2bi))+bi2de(fliplr(flipadd))));
% back to binary
b2d = magsig*pow2(n-1:-1:-m).';


texts:
I do Fourier Transform for an image, then consider line(slice) in FFT image. When that slice isn't parallel neither x- not y-axis, coordinates are not integer.
E.g. slice can hold indices {(0,0), (0.25,1), (0.5,2), (0.75,3), (1,4)...}.
When using nearest-interpolation, quality of whatever I do is pure.

What techniques can you suggest to improve interpolation in Fourier grid?


texts: Explain the formula of convolution and convolution theorem

texts:
As stated in the title, I have two questions

Why convolution is defined as $(f*g)(x) = \int_{-\infty}^\infty f(t) g(x - t) dt$ instead of just $\int_{-\infty}^\infty f(t) g(x + t) dt$ ? Why we need to flip $g$ ?
Is there any intuitive explanation of convolution theorem (Fourier transform) ?


texts:
so,
I got a time series data. t = array (of regular interval starting from
0)  length of t = n = 2080 dt = temporal spacing = 2.e-10 I have a set
of data at t values E(t) = array
Now, since I want to  covert it to fourier space,
f = sample frequency = array = (np.fft.rfftfreq(n2,dt))
E_f = E(f) = (np.fft.rfft(E))/n
so, here my concern is do I at all need to divide by "n" as mention in
above equation ?
Now, I want to estimate total power in between 30 MHz to 100 MHz
how shall I proceed ?


texts:
Does anyone know what the heck is a coupled-air microphone? I know that they were used for recording internal body sounds in papers like this and this. I googled the term, but I couldn't find any circuitry schema or place where to buy one. Are they some kind of diaphragm, condenser or contact microphone?

Any help would be greatly appreciated.


texts: Spectral analysis of a cross correlation function

texts:
So it's widely known that the Cross Correlation of 2 signals helps us in figuring out the time delay in those signals by analyzing the peak of the correlation coefficient in the time domain.

For something I am working on, due to a short baseline in comparison to the wavelength of the signal in between two of my receivers, the cross correlation of the signals from my two sensors give a peak at zero which makes it hard for me to analyse them.

Which is what brings me to my original question i.e
What if I analyse the fft of this correlation coefficient array? Will I find anything hinting towards the time delay?

If not, is there anyway to figure out how I can find the time delay with such a short baseline (~50m) for a long wavelength (~20km) signal?
Thanks for the help. Any little help would be appreciated.


texts: how can we tell that OTSU binarization is feasible or not.

texts:
OTSU is a very popular image binarization method, and Matlab provides a function to implement this method, see graythresh for details. In this function, it has two outputs, one is the threshold calculated with OTSU algorithm, the other is called effectiveness metric EM, and it claims:

    The effectiveness metric is a value in the range [0 1] that indicates the
effectiveness of the thresholding of the input image. The lower bound is
attainable only by images having a single gray level, and the upper bound is
attainable only by two-valued images.

I think it would be nice if we can use effectiveness metric EM to tell whether binarization is fine or not. If EM value is slow, then we will use different binarization method. It would be very useful in the context of document image binarization. Then, a natural question is how can we set this threshold reasonablly. Any ideas on how EM is calculated?


texts: How to Remove the Periodic Oscillations from a Signal

texts:
The task that I have is to remove the annual and semiannual oscillation from a set of temperature measurements, taken over several years, by means of least squares method.

I found the method described here and since I have to wait for my colleague to first make some analysis on the data and pass them on to me, I decided to make a test run in Matlab, using a signal with two simple sine and cosine functions and random noise.

%% Creating the data

g=2.5;
t=linspace(0,g,g*365*24*60);              %n-years of 1min data
o=rand(size(t));                         %random noise
p=2*sin(2*pi*t)+1.5*cos(pi*t);           %we create two sinusoids
x=p+o;                                     %and add noise to them

%% The method

N=length(x);            %no of data
n=(1:N);
T=g*365*24*60;          %time that the data covers
f1=1/(365*24*60);       %frequency of 1 yr oscillations
f2=1/((365*24*60)/2);   %frequency of 1/2 year oscillations

a1=f1*T;
a2=f2*T;

A1=(2/N)*sum(x.*cos((2*pi*a1*n)/N));
A2=(2/N)*sum(x.*cos((2*pi*a2*n)/N));
B1=(2/N)*sum(x.*sin((2*pi*a1*n)/N));
B2=(2/N)*sum(x.*sin((2*pi*a2*n)/N));

C1=sqrt(A1^2+B1^2);                     %amplitude
C2=sqrt(A2^2+B2^2);

fi1=atan(B1/A1);                        %phase shift
fi2=atan(B2/A2);

v=(C1*cos(2*pi*t-fi1))+(C2*cos(2*pi*t-fi2)); %the reconstructed set of data
                                             for these two frequencies

r=x-v;    %I wasn't sure what was meant by removing, so i just subtracted

%% Visualization

figure                                  %now lets plot the data
plot(t,x)
xlabel('t[min]')
ylabel('Arb. units :)')
title('Data')

figure                           %and, original signal and noise separately
plot(t,p,'b')
hold on
plot(t,o,'-r')
xlabel('t[min]')
ylabel('Arb. units :)')
title('Data separated')

figure                    %and once again data (blue), reconstructed signal
plot(t,x,'b-')            %(green), and the final result afer subtraction
hold on                   %(red)
plot(t,v,'g--')
plot(t,r,'r:')
xlabel('t[min]')
ylabel('w/e')

The problem now is, that the reconstructed signal (v) does not resemble the original signal so much. Even when I remove the noise and work only with the pure sinusoid signal, what I get is not really a good representation of it.
So, what I'm most interested is:

Is this at all the correct use of this method? Am I using the correct equations?
Is there an error somewhere in the code? By error I mostly consider the wrong definition, or calculation of some of the variables.
In this "ideal case" (sinusoid without noise) should the method be able to reproduce the original curve (almost) exactly?

I hope I've laid out my problem clearly and understandably, if anyone has additional questions, please ask.
I know this is rather basic stuff, but my knowledge and experience in this area is very limited (up to non-exsistant), so please bear with me.
Thank you in advance for any help.


texts:
Actually I want to denoise a signal. I know how can I implement FFT in python to denoise it. This is the implementation which I use(From this Kaggle notebook):

But I don't know :

How can I use cepstrum like FFT to denoise signal?

Are there any implementations in python like FFT code?


texts:
How are the amplitudes of FM sidebands calculated?

E.g. when negative frequencies are reflected back and their amplitudes added to any existing positive frequencies at that band, how are the amplitudes of the sidebands (+ and |-|) calculated?


texts: How to calculate the energy in the dirac delta function signal?

texts:
I'm having DSP for the first time, and after some classes I got confused about the following:

Suppose I have a signal which its fourier transform in a frequency band $[ \omega_1,\omega_2] $ is just a delta function with a peak somewhere in that band . What is the energy of the signal in that specific frequency band?

It seems that the answer depends on the integral

$$ \int_{\omega_1}^{\omega_2}|\delta (\omega-\omega^*)|^2.d\omega $$

with $\omega_1 < \omega^* < \omega_2$.

I'd guess this is 1 (maybe 0...), but I don't know how to compute it.


texts: Does horizontal motion blur imply the shape of PSF is rectangular pulse?

texts:
For an image has a simulated horizontal motion blur on it, is it reasonable for someone to say that the suggested shape for the point-spread function resulting in this motion blur is a rectangular pulse aligned in the direction of motion?

If so, what is an explanation for this?


texts: Mean of the product of a signal with its conjugate

texts:
I have to find $E\{s_m\cdot s_n^*\}$, where $E$ denotes mean or expected value; $s$ is a signal at $m \in [1\ldots M]$ elements and $^*$ denotes its conjugate. I am doing it by dividing it into two parts, i.e first finding $E\{s_m\cdot s_n^*\}$ for say $m=n$ and then finding $E\{s_m\cdot s_n^*\}$ for $m\ne n$.

My question is do I need to simply add the values obtained by computing $E\{s_m\cdot s_n^*\}$ for say $m=n$ and $E\{s_m\cdot s_n^*\}$ for $m \ne n$ in order to get the value of $E\{s_m\cdot s_n^*\}$? Would it be correct to add in this way?

I would appreciate any input.


texts:
I am trying to understand low pass filters for image processing, I came across an article that stated that low pass filters effect noise more than the real data due to that the image

  Noise always changes rapidly from pixel to pixel because each pixel
  generates its own independent noise. The image from the telescope
  isn't "uncorrelated" in this fashion because real images are spread
  over many pixels.

Does this mean that the filter effects noise more due to the noise being correlated from pixel to pixel?


texts: Basically I want to perform an FFT to find the frequencies of the sound, then stretch the frequencies (for example a stretch by 2 means copy the value of the fourier coefficient X(n) to X(n/2) then use an inverse FFT. Will this work ?


texts: Finding lossless coefficients to multi-tap feedback delayline

texts:
I have a digital delayline code which looks like this:

poswrite = 1000; pos1 = 750; pos2 = 500; pos3 = 200; pos4 = 100;
...
double input = ...;
double feedback = buf[pos1]*a - buf[pos2]*b + buf[pos3]*c - buf[pos4]*d;
pos1++; pos2++; pos3++; pos4++;
buf[poswrite] = input + feedback;
poswrite++;

(positions wrap back to 0 after achieving buffer's end).

I need to choose a, b, c, d coefficients so that the delayline remains lossless. This is a similar requirement in feedback delay networks. What is the best way to choose these coefficients based on the given "pos" values relative to the "poswrite" value?


texts: Retrieving OFDM-based time-domain data from resource grid data in MATLAB

texts:
I need to simulate an OFDM-based transmit-channel-receive link in MATLAB and obtain a BER vs SNR curve using the received data. I am using functions from the LTE toolbox. I have been following the tutorial given here and the code given below is very similar to what is given there.
The data that I have at the end is in the form of a resource grid eqGrid. Can anyone explain how to compute the BER from eqGrid. Specifically, how do I retrieve the equalized time-domain waveform from the equalized resource grid so I can compute the BER?
%% Initialize cell-wide settings
enb.NDLRB = 50;                 % no. of resource blocks (RBs)
enb.CellRefP = 1;               % no. of transmit antenna ports
enb.NCellID = 1;                % cell ID
enb.DuplexMode = 'FDD';         % duplex mode: fdd/tdd
enb.CyclicPrefix = 'Normal';    % cyclic prefix length: normal/extended

%% SNR configuration

SNRdB = 22;                     % desired SNR in dB
SNR = 10.^(SNRdB/20);           % SNR magnitude

%% Channel model configuration
v = 120.0;                  % velocity in kmph
fc = 4e9;                   % carrier frequency in Hz
c = 3e8;                    % speed of light in m/s
fd = 1000/3600*v/c*fc;      % maximum Doppler shift in Hz

tdl = nrTDLChannel;         % initialize channel object
tdl.DelayProfile = 'TDL-C'; % TDL-C profile
tdl.DelaySpread = 300e-9;   % delay spread 300ns
tdl.MaximumDopplerShift = fd;   % maximum Doppler shift

%% Channel estimator configuration

cec.PilotAverage = 'UserDefined';
cec.FreqWindow = 9;
cec.TimeWindow = 9;

cec.InterpType = 'Cubic';
cec.InterpWinSize = 3;
cec.InterpWindow = 'Centred';

%% Extract grid dimensions

gridsize = lteDLResourceGridSize(enb);
K = gridsize(1);    % no. of subcarriers
L = gridsize(2);    % no. of OFDM symbols per subframe
M = gridsize(3);    % no. of transmit antenna ports

txGrid = [];    % create an empty resource grid

%% Generate payload data

numberOfBits = 2*K*L*M;     % No. of bits = 2*K*L*M (for QPSK)

inputBits = randi([0 1], numberOfBits, 1); % generate random bit stream

inputSym = lteSymbolModulate(inputBits, 'QPSK'); % generate random bit stream

%% Create a frame of data
% for all subframes within the frame
for sf = 0:10

    % set subframe number
    enb.NSubframe = mod(sf,10);

    % generate empty subframe
    subframe = lteDLResourceGrid(enb);

    % map input symbols to grid
    subframe(:) = inputSym;

    % generate synchronizing signals
    pssSym = ltePSS(enb);
    sssSym = lteSSS(enb);
    pssInd = ltePSSIndices(enb);
    sssInd = lteSSSIndices(enb);

    % map synchronizing signals to the grid
    subframe(pssInd) = pssSym;
    subframe(sssInd) = sssSym;

    % generate cell specific reference signal symbols and indices
    cellRsSym = lteCellRS(enb);
    cellRsInd = lteCellRSIndices(enb);

    % map cell specific reference signal to grid
    subframe(cellRsInd) = cellRsSym;

    % append subframe to grid to be transmitted
    txGrid = [txGrid subframe]; %#ok

end

%% Transmission & Reception

% OFDM modulation
[txWave, ~] = lteOFDMModulate(enb, txGrid);
txGrid = txGrid(:, 1:140);  % can anyone explain why slicing is needed here

% pass data through tdl-c channel
rxWave = tdl(txWave);

% calculate noise gain
N0 = 1./(sqrt(2*enb.CellRefP*1024)*SNR);

% create AWGN
noise = N0*complex(randn(size(rxWave)), randn(size(rxWave)));

% add noise to the received waveform
rxWave = rxWave + noise;

% synchronization
offset = lteDLFrameOffset(enb, rxWave);
rxWave = rxWave(1+offset:end, :);

% OFDM demodulation
rxGrid = lteOFDMDemodulate(enb, rxWave);    % perform demodulation

% obtain channel & noise estimate
enb.Nsubframe = 0;
[hest, nest] = lteDLChannelEstimate(enb, cec, rxGrid);

% perform MMSE Equalization
eqGrid = lteEqualizeMMSE(rxGrid, hest, nest);


texts:
This might be an easy one!

Please preface your answer with spoiler notation by typing the following two characters first ">!"

Given the following equation that describes a cosine wave as a function of time:

$$m(t) = \cos(2\pi f t) $$

We know that $t$ is the independent variable for time in seconds, and $f$ as a constant value will be the frequency of the cosine in $\textrm{Hz}$.

What if f is a linear ramp over time?

Given a time domain waveform $m$ with a linearly increasing frequency over time, that starts at $t=0$ with frequency $F_1\textrm{ Hz}$ and ends with frequency $F_2\textrm{ Hz}$:

Provide the expression for $f(t)$ in terms of $F_1$ and $F_2$ and $T$, that would create a function $m(t)$ whose frequency starts at $F_1$ and ends at $F_2$, with the frequency linearly increasing over some arbitrary time period $T$.

The actual spectrum, as in any spreading effect due to the ramp rate, is of no interest to this solution.

Hint:

   The answer is a simple linear equation ($y = mx+b$), with a $y$-intercept $b$ that is a constant dependent only on $F_1$ and value $y$ at time $T$ is another constant dependent only on $F_2$  --- what are those two constants with relation to $F_1$ and $F_2$?


texts:
First post, and this isn't my field of study, but I'm giving this a go anyway:

My latest endeavor is to use a bit of DSP magic to match up various pairs of headphones, at least in terms of their impulse response measured at the entrance to the ear canal. So far I've taken 64 measurements on 3 sets of headphones, in this way:

1) Put on binaural mics

2) Put on headphones

3) Take IR measurements

These are in a nested loop with 4 iterations each, so I end up with 64 measurements. The IRs I get using a program called Aliki, free software in Linux that uses sine sweeps.

My goal is to generate two filters for each headphone pairing (1<->2, 1<->3, 2<->3). Currently I'm eyeballing a "best" IR for each headphone using spectrograms, matching up the position of peaks, padding, then doing FFT division to get a transfer function (which I have read can be a really bad way of doing things). Results are actually not bad sounding, but I wonder if I can do better with a bit more legwork on the data.

So my question is: What's the best way to combine these IRs to get (possibly) better filters?

Thank you.


texts:
I have read that a Wiener filter is a filter used to produce an estimate of a desired or target random process by linear time-invariant (LTI) filtering of an observed noisy process.

Now, my doubt is regarding the use of the term LTI. How does the Wiener filter ensure that the filtering is linear time invariant?

An intuitive explanation would really help.


texts: A question about the Commutativity Property in discrete signals block diagrams

texts:
According to the Commutativity Property of block diagrams, we can place b0 at the entrance or at the exit of the block diagram, it wouldn't matter.

My question is, if we placed it at the entrance, we should have the following difference equation:

$$y[n]=b_0x[n]-a_1y[n-1]$$

But if we placed it at the exit, we should have this difference equation:

$$y[n]=b_0x[n]-a_1b_0y[n-1]$$

Which don't correspond to the same transfer function, can anybody explain to me how it won't matter where to put b0 and that both schematics would lead to the same transfer function.


texts:
In order to find a peak or max response in the fourier domain as in the spatial domain, I have been studying bartlett's method, welch's method, and the blackman-tukey method for more accurate power spectrum analysis after correlating two functions together in the fourier domain as depicted in this document.

But I had a few questions after reading, which I could not find in any book nor online

1) For the Bartlett method (page 11 of the pdf) what determines the value of k, or is it arbitraty. And following that, does the accuracy of the power spectrum analysis go up if k is higher, and vice versa

2) Same question as 1) but for the welch method (page 12 of the pdf)

3) For the blackman-tukey method (page 14 of the pdf), will i get the same result if I window the signal in the spatial domain, but then do the autocorrelation in the fourier domain?


texts: Sequence Length for a Linear Feedback Shift Register

texts: What is the total length for the sequence for a linear feedback shift register generated with a maximum length sequence, before repeating?


texts: Coherence of a single function given a single frequency

texts:
I have a signal sampled from a hardware, s. I would like to compute the coherence of the sampled signal given a single frequency, f. Below are the approaches I can think of.

Base on f generate a synthetic signal and compute the coherence of s and the synthetic signal.
Use SNR similar approach with frequency range [f - a, f + a] to compute the SNR of s as its coherence level, where a is a threshold.

I know both approach are not the right way to do it. There are just the possible solutions come to my mind. I would like to know how to do it right.


texts: What is Typical RTP Packet size for H.264 video transmission

texts:
I am encoding my video using JM reference software. The encoded file is divided into RTP packets. I can set a RTP packet size in bytes using configuration file. But i am unable to find what should be the RTP packet size for H.264 video used in video telephony? I know RTP packet size is variable but there should be some limit.
Any help would be highly appreciated.


texts: Capacity achieving codes for BPSK at low SNR

texts:
I don't know a lot about comm system design.

I have an AWGN channel and low SNR (-3dB).  Bandwidth is constrained to some maximum, B.  I would like to know good choices of modulation and coding to maximize throughput.

I've read that restriction to binary modulation at low SNR does not degrade capacity wrt to log_2(1 + SNR), but that coding is necessary and that B needs to be big.

I've also read that low-rate linear binary codes can achieve capacity.  Is there a particular code family I should use for my scenario?


texts:
I was trying to solve the below system is a Time variant or Time Invariant System:

$y(n)=nx^{2}(n)$

Now for a system to be time invariant the system property should be :

y(n,k) = T[x(n-k)]

OR

y(n,k) = y(n-k)

for all possible values of k.

Coming back to system equation:

$y(n,k) = T[x(n-k)] = nx^{2}(n-k)$ delayed by k sample

And

$y(n-k) = nx^{2}(n-k)$

Hence

$y(n,k) = y(n-k)$

The the system is time invariant, but the solution in book states that the system is time variant. I am not sure where I am going wrong or my understanding is not correct?


texts: Strategy / Method for Implementation of the Fastest 1D Linear Convolution / Correlation

texts:
I am after the method and its implementation of the fastest convolution of 1d signals:

$$ y \left[ n \right] = \left( x \ast h \right) \left[ n \right] $$

Where $ \ast $ is the linear convolution operator.

Let's assume that we have infinite storage or memory but we have finite time. What strategy or algorithm can we use for a faster discrete time convolution operation?

Could someone compare the known methods for implementing convolution: Direct Convolution, Frequency Domain Convolution / FFT Convolution and Overlap and Save / Overlap and Add methods? Is there something even faster?


texts:
I'm working to prepare research article for my project. While preparing for it, I've gone through the topics like Gaussian mixture model and Fourier transform for voice classification problems. I've got sounds from the sources(probably the recorded voice of the different peoples).

Can I perform DFT on those audio files and  pass the points from the DFT to the  the Gaussian mixture to extract the features from the audio files?

Later the weights from the Gaussian mixture model will be used to compare the sounds.


texts: Implementation of CIC filter using floating point

texts:
I am trying to implement a CIC filter and was reading through the literature and found that CIC filter cannot be implemented using floating point. I am unable to understand why that would happen. The reasoning that is given everywhere seems to be that the integrators are not stable when using floating point but I am not able to understand why that would be. Can someone explain how that would happen?
I also found that using polyphase decomposition would allow for floating point implementation but I am not sure how that would happen since the transfer function is still the same. I am not able to find a satisfactory explanation for this. Is this the only way to do floating point implementation?
Also I read that CIC filter is good if the decimation factor is high, but I am looking for a decimation factor of about 5 to 20. Why wont using a CIC filter be a good approach in this case.


texts: Phase response of $H(f)=e^{-j2{\pi}ft_0}$

texts:
Given is the impulse response: $$h(t)=\delta(t-t_0)$$.

I calculated $$H(f)=e^{-j2 \pi ft_0}=|H(f)|\cdot e^{j\varphi(f)}$$.

Now, the magnitude response of $H(f)$ is:

$$\begin{align}
|H(f)| &=\sqrt{\Re\{H(f)\}^2+\Im\{H(f)\}^2} \\
 &= \sqrt{\cos^2(2{\pi}ft_0)+\sin^2(2{\pi}ft_0)} \\
 &= 1 \\
\end{align}$$.

Using: $$e^{-j \theta}=\cos(\theta)- j \cdot \sin(\theta)$$ and $$\cos^2(\theta)+\sin^2(\theta) = 1$$.

But now I wonder about the solution of the phase response. I know that the solution is:

$$\varphi(f)=-2 \pi f t_0$$.

I would be thankful if someone could show me how the phase response was calculated, since following

$$\varphi(f) = \arctan \left(\frac{\Im\{H(f)\}}{\Re\{H(f)\}} \right) = \arctan \left(\frac{-\sin(2 \pi f t_0)}{\cos(2 \pi f t_0)} \right)$$

I instead obtain $$\varphi(f)=-\arctan\big(\tan(2{\pi}ft_0)\big)$$ which differs from the given sample solution.


texts: Why should I zero-pad a signal before taking the Fourier transform?

texts:
In an answer to a previous question, it was stated that one should

  zero-pad the input signals (add zeros to the end so that at least half of the wave is "blank")

What's the reason for this?


texts: Determine the Given system is linear or nonlinear

texts:
Does the following define a linear or nonlinear system?

$$ y(n) -4 y(n)y(2n)=x(n) $$


texts: How is it determined that an adaptive filter has converged?

texts: Is it when the cost function such as the error signal or Mean Square Error (MSE) signal is minimised?


texts: Determining statistically the bandwidth of a signal from a spectrogram

texts:
My question is how to determine the parameters of a signal from a spectrogram statistically.  The most important parameters that I am looking for are the lower and higher frequencies of the signal.  I have hundreds of these audio clips and I would like to perform statistics on them to determine the bandwidth of the signal. What is the best method to use to obtain these values statistically?
Find attached an audio clip and the label of signal that I am trying to analyse.


texts: When might looking at rising edges perform better than cross-correlation?

texts:
A simple question as the title indicates:

Let us assume that we have two signals, measured from two different sensors that are close together. (For this application, the sensors are measuring blood/biological activity at different positions on an animal body).

I am wondering when, (if at all), measuring the rising edges of both signals might offer a better estimate of their relative time delays, VS doing a simple cross-correlation?

When might we expect this to be true, if ever?

I ask because I would like to know if looking at rising edges may indeed be optimal in some sense, instead of it being something 'ad-hocy' and possibly mis-leading in lieu of cross-correlation.


texts: Recommended C/C++ General Purpose DSP Libraries

texts:
I am looking to transition some of my MATLAB algorithms to C/C++ for deployment on target (PowerPC and/or ARM).  Mostly 1D FIR/IIR filter in this instance.

In other domains, there are well-regarded general libraries (both speed and quality) with liberal licencing. For example, Linear Algebra has LAPACK and Eigen (amongst others), and computer vision has OpenCV.

There are well-regarded libraries for specific algorithms, such as FFTW, but what about a collection of general algorithms for 1D signals?

I'm not after DSP-specific libraries, such as for PIC32, CMSIS (ARM Cortex M4), DSPLIB (C64x) or Renesas, but nonetheless has similar functionality.


texts: Interpolation of missing audio signal in a video sequence

texts:
Suppose there is a video sequence and there are some frames for which the audio data is missing. I want to interpolate the missing audio data on the basis of the correlation of the audio signal with the pixels of the frames. Is there any existing research on how to do this effectively?

I was thinking of using the Wiener-Hopf equations, but I can't determine if there is any scalar parameter of the video which is correlated with the audio.

Some insight on this would help.


texts: Deconvolution of signal which is broadened by laser spot size

texts:
I have a signal that I measured by optical means using a focused laser. The laser scans over a microscopic feature (in step size of 0.33 micron) and I have plotted the result of the measurement as a function of distance (x scale is microns):

Signal image:

I am interested in the width of the feature I am measuring, however in this case the width seems on the same order (or even much smaller) than the laser spot size. This results in the signal being a Gaussian shape which could potentially just be the shape of the laser spot. But I cannot know that for sure, because I'm trying to measure the width of this feature. It is entirely plausible that the feature itself gives a Gaussian response, I expect it is not an extremely sharp edge. But I'm trying to determine how sharp the edge is exactly, and the laser spot size is now limiting.

Assuming the feature is extremely thin and sharp, then the measurement would indeed yield this Gaussian shape. However the feature is definitely not infinitely sharp and I believe I can measure more accurately what its shape is by using deconvolution.

I have tried to measure the laser spot size (this would be the system response function, I guess?) by scanning over a feature that IS definitely 100% sharp. If everything was perfect the signal from that would be a step function, but of course due to the large laser spot size I actually get a sort of error function shape from which I believe I can determine the laser spot size:

Sharp edge signal image:

Unless I'm mistaken the parameter C in my fit gives me the 1/e^2 beam width (0.785 micron). I think I can use this to form the system response function, assuming that my laser beam is Gaussian (which is probably not true but that's the best I can do).

The original signal I measured should be a convolution of the actual feature and this Gaussian system response, so I should also be able to deconvolve the signal with this same Gaussian system response and therefore obtain a better measurement of the feature, right?

How would I go about doing this? I have the original signal data (image 1, distance vs signal) and I can assume a Gaussian spot for my laser as the system response function with the known size obtained from the measurement of the perfectly sharp edge (image 2), as far as I understand (not much more than this...) this should be enough to do a deconvolution?


texts: How do I find the fundamental period of the given signal?

texts:
I am having a problem in finding the fundamental period of the signal $x(t)$ given below:
\begin{align}
x(t) &= 2\cos\left(\frac 45 \pi t\right)\sin^2\left(\frac{16}{3} t\right)\\
&= 2\cos\left(\frac 45 \pi t\right)\cdot \frac 12\left[1-\cos\left(\frac{32}{3}t\right)\right]\\
&= \cos\left(\frac 45 \pi t\right) - \cos\left(\frac 45 \pi t\right)\cos\left(\frac{32}{3} t\right)\\
& = \cos\left(\frac 45 \pi t\right)-\frac 12\bigg\{\cos\left[\left(\frac 45 \pi -\frac{32}{3}\right)t\right]+\cos\left[\left(\frac 45 \pi -\frac{32}{3}\right)t\right]\bigg\}
\end{align}


texts: How moving part pixel intensity values of video frames becomes dominant compared to stationary part intensities in reconstructed frames?

texts:
Hello everyone i want to do dynamic texture video sementation using the Fourier transform in MATLAB. I am applying 3-D fft on dynamic texture video frames (using matlab function 'fftn') and reconstructing video frames back from the phase spectrum only (using matlab function 'ifftn').

I have found moving part pixel intensity values becomes dominant
(means its intensity values are increased so much) compared to
stationary part intensities in reconstructed frames of original
frames .(e.g.in waterfall and traffic on road, water part and moving
car's intensity values are increased respectively compared to the stationary background). how does this
happen?
Also What is the relation between time shift and phase change if we take Fourier transform of video frames?
I want know that what changes will occur in magnitude and phase spectrum amongst the frames and can we derive any relation amongst the interframe magnitude or phase spectrum changes?


texts: What is the difference between upsampling and up conversion (done during signal transmission)? Also is upconversion different from modulation?

texts: Up sampling is when you increase the sample rate of a continuous signal. Modulation is when you, by multiplying with a carrier, shift the base frequency of a signal. But what is up conversion? How is it related with the above mentioned terms?


texts: Hello may I know how to convert ofdm symbol generated from ifft block to an OFDM signal for the purpose of transmitting it?


texts: How to add complex WGN to complex damped exponential and compute SNR?

texts:
I am new to the Signal processing domain, So my question might sound basic. I am trying to reproduce the results from the paper Decimative subspace-based parameter estimation techniques by
Geert Morren, Philippe Lemmerling, Sabine Van Huffel.
I would like to first know what is the unit of the model given here, where $a_k$ amplitudes, $\phi_k$ phases, $\alpha_k$ damping factors, $f_k$ - frequencies in Hz and $f_{sample}$ - sampling frequency.
\begin{equation}
    x(t) = \sum_{k=1}^{K} (a_k e^{(j\phi_k)})(e^{\{(j2\pi f_k - \alpha_k)/f_{sample}\}t}) + Noise(t), \quad t = 0,1,...,N-1
\end{equation}
I am adding circularly symmetric WGN to $x(t)$ using the wgn function from MATLAB (shown below in code), which is in dBW unit.  I am not sure whether this is correct, and I am computing SNR also using a snr MATLAB function.  However, I want to use the variance of noise and scaling of noise to determine SNR.  Could someone explain me clearly how to do this?
f       = [0.02, 0.0205];
a       = [1, 1];
alpha   = [0, 0];
phi     = [0, 0];
K       = length(f);
del_t   = 1;
N       = 1000;
t       = (0:del_t:N-1)';
size_t  = length(t);
f_sample= 1/del_t;
Nruns   = 40;
x       = zeros(size_t,1);
SNR     = zeros(1,Nruns);

for iter = 1:Nruns
    noise = wgn(size_t,1,randi(20),'complex');
    for n = drange(1:size_t)
        for k = 1:K
            x(n) = x(n) + a(k)*exp(phi(k)*1j)*(exp((2*pi*f(k)*1j - alpha(k))/f_sample)).^(n-1);
        end
        x(n) = x(n) + noise(n);
    end
    SNR(iter) = abs(snr((x-noise),noise));
end


texts: Simplified equations for FM (frequency modulation) synthesis and PM (phase modulation)?

texts:
Clicking on the links I find on the web it seems many authors don't express them
neatly enough for me or they're even confusing the two. Can someone please clear this up?

Is frequency modulation

\begin{align}
&\rm  \sin((frequency+modulator)time-phase)\\
&\qquad\quad\textrm{or is it}\\
& \rm  \sin(frequency*time+modulator-phase)\quad ?
\end{align}

Ugh!


texts: How to convert dB back to manitude and then to rectangular format

texts:
I am experimenting with audio (wav files) using Short-Time Fourier Transform (STFT) in Python using scipy.signal.stft.
As I understand we get data for freq, time and magnitude + phase in rectangular format.
for e.g. (shortened for illustration)

freq, time, Zxx = scipy.signal.stft(signal, fs=fs , .. and some other parms)

If I take a single value from Zxx , e.g.

x = -0.01224990-0.01877387j ,

I would like to convert this value to dB, do some modification such as

add/reduce few dB's
Also change angle or phase
and reconstruct the value back to x

So far I have,

#Magnitude
m = np.abs(-0.01224990-0.01877387j)
0.022416918717497732

#angle in degrees
ad =np.angle(-0.01224990-0.01877387j, deg=True)
-123.12434072219258

#phase
cmath.phase(-0.01224990-0.01877387j)
-2.1489251349495935

#magnitude in dB
dB = 20*np.log10(abs(p))
-32.988481658150704

#modified magnitude
dB = dB + 10.0

#Modified angle
ad = -123.12434072219258 + 50.0

Now, How do I convert it back to modified x. using above values?

I researched but couldn't find a straightforward solution. Before reinventing the wheel of constructing the complex mathematical functions, i thought I would ask the experts.

The only reference I found was mag2db and db2mag at matlab, but not sure how to access or implement these in python.

EDIT1
Please note: I am not trying to reconstruct original signal (or x value) back. I need to modify Zxx values and hence I know I will get a different signal back using scipy.signal.istft.

Although I can directly manipulate x+jy which affect both magnitude and phase, I would like to modify them individually and Hence this question.
Thanks in advance.


texts:
In the image analysis literature there are a variety of ways people show the usefulness of their method. For example, performance on an ideal signal corrupted by noise, an artificial signal encompassing a range of relevant structures, or real world images.

What are some commonly used test image sets for the following methods?

Line and edge detection
Corner and junction detection
Segmentation
Optical flow
English / Chinese character recognition
Handwriting author recognition
Stereo vision / image registration


texts: Stereo sound separation into three sources

texts:
Whenever we listen stereo songs, one part of the audio like voice hear at the center of the head, and other parts are nearby left ear and right ear. If I represent center part by C, and other parts by L' and R', We may model our original left and right channel as,

L' + C = L    and,

R' + C = R.

As, common part of L and R channel comes in C vector, L' and R' are uncorrelated. Now we can say, (alpha + beta = pi/2)

Is this modelling correct as per the listening scenario for stereo sound?


texts: Time Alignment of 2 Sensors Sampling the Same Signal with Different Hardware Delays

texts:
I have two radios sampling simultaneously, and I am trying to time-align their two signals (they will always start sampling at slightly different times with random delays due to hardware differences). I have a circuit that automatically switches between the antennas and nothing at a set interval, and I'm trying to use the transitions between signal and silence to determine how to time-align the two signals. I tried using cross correlation to find the shift between the two signals, but it's not getting the correct alignment (it's very off). I suspected it was due to the signals being too noisy, so I smoothed them both and tried to make their amplitudes similar, but it still didn't get the right alignment.

Here's a screenshot of an example of the two signals. The image is zoomed in to the region where the circuit switches the radios from nothing to the antennas, and I would like to align the two signals such that these transitions match up.

EDIT:
Here are text files of two more signals that I'm trying to align:
s0.txt   s1.txt. When they're aligned, they look like this:

(note that these are not the same signals in the previous picture). I found the optimal delay to be 1069 for the first signal. I used other methods to find the delay (described in a comment below), but I would like to reproduce this result using cross correlation as I believe it will prove to be more reliable / precise.


texts: How to improve signal quality in SDR-to-SDR TX/RX test?

texts:
I'm have a GNURadio flowgraph with 2 SDR devices directly connected with an SMA cable. It sort of works, but I'm wondering if I can improve signal quality.

On the TX side, clean signal is generated at 10KHz and 50KHz. I then send it through ADALM-PLUTO SDR with LO set to 1GHz as a carrier.

On the RX side, I use RTL-SDR with LO set to 999MHz, 1MHz off from TX carrier to eliminate DC offset. However, at this point, signal quality isn't that good:

I can see the signal at 1MHz mark, but overall, this looks quite noisy to me. Considering that this is over a direct SMA cable connection, I was expecting cleaner result with more distinct signal peaks.
I've been tweaking PlutoSDR TX attenuation and RTL-SDR gain settings, but no parameter configuration seems to improve this.
So my questions are:

Is this a sane result from your experience?
If not, then how can I isolate/identify an issue?
For example, what can I do to tell if this is an issue of TX side or RX side?
What can be the cause of signal degradation in this cable-connected case?

=== Update and resolution ===
Thanks to @Marcus Müller, his advice led me to find that I was wrong on TX attenuator configuration. After fixing it, I get additional 20dB which significantly improved signal quality as shown below:


texts: How to solve ADMM for TV Minimization Problem For Different Sizes $A$ and $x$ in $Ax=b$

texts:
I have matrix $A$ that is $(M \times M)$ square matrix, $x$ $(M \times N)$ matrix, $b$ is $(M \times N)$ matrix. Knowing $A$ and $b$ I would like to get the $x$ from the equation $Ax=b$. $N=p \times q$, so consider $x$ as an $M$ number of $p \times q$ pixel images. These images are sparse when we take total variational $TV(x)$. I would like to solve the following minimization problem for $x$;

Define an operator $g(x)=\parallel x^T\parallel_2,$ or $g(x)=\parallel x^T\parallel_1,$ that maps $M \times N  \mapsto  N \times 1$.

$$\min  \frac{1}{2}\parallel Ax-b\parallel^2_2+k\parallel z\parallel_1,$$ subject to $Fg(x)-z=0$.

$F$ is the difference matrix to take numerical gradient of pixels.

Unlike in the deblurring+denoising problem, my matrix $A$ and $x$ are in different sizes.

The ADMM (Alternating Direction Method of Multipliers) solution to my minimization problem is given as:

$$x^{k+1}=(A^TA+pF^TF)^{-1}(A^Tb+pF^T(z^k-u^k))$$

$$z^{k+1}=S_{t/p}(Fx^{k+1}+u^{k})$$

$$u^{k+1}=u^k+Fx^{k+1}-z^{k+1}$$

When calculating $x^{k+1}$ the matrix dimensions are not compatible in my case. Gradient matris should be applied to total number of pixels $N$, $F$ matrix should have $N$ columns. So the term $(A^TA+pF^TF)$ is not proper way to add 2 matrices.

How can I overcome this and find a solution to my problem?


texts:
I came across this demo by Fox sports:
https://youtu.be/N9SxFf5WCb0
Where they show a player's view in a 360 space. Very smooth and nice.
I was wondering how do they achieve it without any cameras attached to the player?
One approach that came into my mind was using a multi-camera setup and convert 2D images to 3D using a stitching mechanism as a post processin. Is it what they do?! What are other approaches that we can do it?


texts:
How do we prove that $$\int_{-\infty}^{\infty}\bigg|\dfrac{\sin t}{\pi t}\bigg|dt\to \infty$$
This comes in the context of stability of LTI system with impulse response $h(t) = \dfrac{\sin t}{\pi t}$.

Thanks in advance.


texts:
A reviewer has asked me to re-filter my data to remove baseline drift.

Each sweep is 170ms sampled at 1000Hz and the reviewer wants it high-pass filtered at 0.5Hz.  The original bandpass settings on the hardware were 0.15 to 1000Hz

Although this is easy to code in matlab, the epoch is very short compared with the stop frequency.  How does the epoch length affect the filter order selection and is there any point attempting it at all?


texts: Decompose an image into better compressible components

texts:
Our team develops an application that, in some feature, connects to a scanner (via TWAIN or WIA) and scans a document, and makes a PDF file out of it. The application is mostly used to process mail or documents with few images.

We recently noticed that the PDF files generated by our application are four times larger (speaking of file size) than those generated by the scanner software, although similar scanner parameters are used (resolution, color, etc).

So I delved into the generated pdf files and this is what I got:

With MuPDF component mutool.exe I got information about the objects inside the PDFs:

Our PDF contains one image (not surprising, it is made directly from the result of the scan):

[ DCT ]      3302x4668 8bpc DevRGB

The PDF file generated by the scanner software contains two images (aha!, this is more surprising), that differ in size and, that do not have the same color profile:

[ DCT ]      1650x2334 8bpc DevRGB
[ CCITTFax ] 3176x4512 1bpc ImageMask

Still using mutool, I extracted the two images from the PDF generated by the scanner software:

The first image is what we could call the “Background”: here are a thumbnail of it, and a detail at 100% size:

The second image is a pure B&W (1 bit per pixel) layer, with mostly black; here is a detail at 100% size:

So it appears that the software that the scanner comes with uses an algorithm that detects that the document is mostly black and white, and then decomposes the image in two parts that it overlays; the first part consists of small details that can be downsampled (and therefore take less space), and the second part consists of only black or white dots, and with which better compression can be achieved.

My question is: how can we do something similar?

Thanks


texts: Why different smartphones with same Megapixel camera have different quality of image?

texts:
I am image processing student. Nowdays there are different brands of smartphones available. But the common thing is two different big brand smartphones with same Megapixel camera have different quality of image.

Moreover,the Digital cameras with same megapixel resolution have altogether best quality. Why is it so?


texts: doubt of intersection of ROC Z Transform

texts:
dear friends of StackExchange.
I have a doubt of the intersection of two ROC.
I have H(Z), X(Z) and and i have to determine:

$$ \begin{align} Y(Z)= H(Z)X(Z)\end{align}$$
$$
\displaystyle
$$

$ ROC $ H(Z)  $ \cap $ $ ROC $ X(Z)
$$
\displaystyle
$$
poles of $H(Z): p1=  \left |  -\frac{1}{4}  \right | $ ; $p2= \left |  \frac{3}{2}  \right |$
$$
\displaystyle
$$

The system is supposed stable. Ops, sorry i forgot to write it in the initial post, under this assumption
the corresponding $ROC$ of $H(Z)$ is :
$$\begin{align} \quad&\ \left | \frac{1}{4} \right | <z<  \left | \frac{3}{2} \right | \end{align}$$
$$
\displaystyle
$$
  pole of $X(Z): p3=  \left |  2 \right |  $ $$ \displaystyle
 $$
For stability condition:
 $$\begin{align} \quad&\ z<  \left |2 \right | \end{align}$$
The intersection area is:
$$ \displaystyle$$

$Y(Z):  ROC $ H(Z)  $ \cap $ $ ROC $ Y(Z) = $$\begin{align} \quad&\ \left | \frac{1}{4} \right | < \left |  z \right | < \left | \frac{3}{2} \right | \end{align}$$

i see it drawing the circumference and tracing the circumferences related to the poles and their corresponding ROC
 .


texts: Applying a lowpass filter to a noisy square signal leads to a shift of the signal

texts:
My knowledge of analog and digital signal analysis is behind me.. thus I do not have enough confidence in my procedure to analyze my signal, and I do not know which direction to pursue to improve. I'm measuring a noisy square signal at a sampling frequency fs = 1e6 Hz. I can increase this frequency up to 1e9 Hz if needed.
At a frequency fs = 1e6 Hz, I get the following signal:

Above, you can see 2 examples with 2 square waveforms at 2 different amplitudes. As you can see, the signal is prone to overshoot, in the example below, before the square starts; and is also noisy. Thus, I wanted to clean the signal by applying a low-pass filter.
I tried the 2 following: a Butterworth and a bessel filter using the scipy library in Python.
def butter_lowpass_filter(data, cutoff, fs, order=5):
    nyq = 0.5 * fs
    normal_cutoff = cutoff / nyq
    b, a = butter(order, normal_cutoff, btype='low', analog=False)
    y = lfilter(b, a, data)
    return y

def bessel_low_pass_filter(data, cutoff, fs, order=5):
    nyq = 0.5 * fs
    normal_cutoff = cutoff / nyq
    b, a = bessel(order, normal_cutoff, btype='low', analog=False)
    y = lfilter(b, a, data)
    return y

I then call both filters on my data with the settings cutoff = 100000 # Hz, fs = 1e6 # Hz, order = 8. Why those settings? That is my first problem, I don't really know how to choose the cutoff frequency or the order. I simply tried different values, and those seem to be nice.
The result looks like this (left, low amplitude pulse; right, higher amplitude pulse):

The bessel filter seems to work better than the Butterworth, however both have the same problem. The signal is shifted to the right. If I zoom , I observe the clear shift:

The opposite shift seems to be present at the end of the square. Is it possible to correct this shift?
My end goal is to measure both the amplitude and the width of the square. Do you think my approach is correct or would you recommend me another approach?
Thanks for the guidance,
Mathieu


texts: Given some parameters, how do you determine how much of an image sensor an object will consume?

texts:
If I have the details of a scene and a camera, how can I tell how much of my camera's image sensor will be taken by a certain object in space?

For example, if I have a painting that is 1m by 1m, it is straight ahead 10 m away from my camera.  If my image sensor is 5 mm by 5 mm, and I fix the focal length of the camera, how do I determine how much of the image sensor will be taken up by the painting?


texts: (python+opencv) haar cascade training using cloud computing

texts: I will train my own  cascade, using python and opencv. I want it to be as precise as possible, so as I read it is common that training takes one or two weeks to compile. I want to use cloud computing to not wait that long. I research but cannot find a single guide that explains what to do. I have pozitive and negative images, and a python code. How I can compile my code on cloud with least additional efford? (till now I just use my desktop, just wrote and compile scripts. I have no experience on cloud computing.) I found zero answers when searching opencv,python,cloud computing together. topics like this are for permanent web applications, I guess. I just want to run the code and get results, basically.


texts: How do I deepen my voice (I'm a female) to sound like a man in a video for a school project?

texts:
Some extra info. that I think might help or make things clearer:

The video has several other people in it also talking (I don't want
to change their voices).
I have some experience in editing videos(nothing major I've only ever used
Flimora and Imovie)but I've never had to edit someone's voice.


texts:
I am trying to make an ultrasonic flowmeter. The device has two ultrasonic tranducers (resonance frequency of about 200kHz) that sample one ultrasonic signal in the upstream directon and then immediately after one signal in the downstream direction. I know a correlation between the upstream and downstream signals might be enough but the problem is that we don't have a lot of processing power available. We have signals that are 1024 samples long each and a full cross correlation would take too long to process. The maximum sampling Rate is about 6MHz if that helps.
Since I don't come from an audio background, I am also finding it hard to figure out at what point the signal really 'arrives' and how to detect it at the resolution that I need. With the SNR that I have, it seems like the exact startng point would be lost in the noise?
No matter what I try, I seem to end up with too many wrong measurements where the time measured is exactly one wave period away from the correct value.
I know this question is far too vague but I would really appreciate any ideas on how I could understand the problem better!
Here's what the signals look like:

So the main questions are:

What is the exact time of arrival of these two signals at the ultrasonic transducer?
What is the differential time of arrival between both the signals?


texts: What Are the Differences between Super Resolution, Denoising and Deblurring?

texts: In the fields of computer vision and image processing, what are the differences between Super Resolution, Denoising and Deblurring?


texts: How to find the output mean and autocorrelation of a non-linear system

texts:
I need help with this question. I am sure this is the right StackExchange forum for this type of question.
Consider a nonlinear device such that the output is $Y(t) = aX^2(t)$, where the input X(t) consists of a signal plus a noise component, $X(t) = S(t) + N(t)$.
Determine the mean and autocorrelation function for $Y(t)$ when the signal $S(t)$ and the noise $N(t)$ are both Gaussian random processes and wide sense stationary (WSS) with zero mean, and $S(t)$ is independent of $N(t)$.
I know that for a WSS signal, the mean and autocorrelation depends on the time difference, $\tau$ only. Meaning that the mean of $S(t)$ and $N(t)$ is a constant and their individual autocorrelation is not dependent on $t$.
I've been working only with linear systems. I don't know how to solve this problem since $Y(t)$ a nonlinear system. I will be happy if you can help me with the solution
UPDATE 1
I followed the suggestion from @Hilmar and came up with the following:
1. The mean of $Y(t) = 0$ since $S(t)$ and $N(t)$ have 0 mean.
2. For the autocorrelation, I used this formula $R_{yy}(\tau)=R_{xx}(\tau)*h(\tau)*h(-\tau)$.
looking for $R_{xx}$, I used $R_{xx}=E[X(t)X(t+\tau)]$.
I ended up having $R_{xx} = E[S(t)S(t+\tau) +S(t)N(t+\tau)+N(t)S(t+\tau) + N(t)N(t+\tau)]$. Since $S(t)$ and $N(t)$ are independent, $R_{SN} = R_{NS} = 0$
$=> R_{XX}= E[S(t)S(t+\tau) + N(t)N(t+\tau)]$
$=> R_{XX} = R_{SS} + R_{NN}$

$R_{YY} = (R_{SS} + R_{NN})*h(\tau)*h(-\tau)$
Now I am stuck. From the definition of WSS signal, $R_{SS}$ and $R_{NN}$ are constants. i.e. they are dependent only on $\tau$. I can assume their sum to a some constant value, $C$I don't know how to move from here. I will need to find $h(\tau)$ I don't know how to go about it.


texts: For a system to be causal, number of finite zeros <= number of finite poles. Why?

texts:
I read in this pdf that for a system to be causal, the number of finite zeros must be no greater than number of finite poles. Why?

I know that for a system to be causal, $h[n]=0$ for all $n<0$. Can you give an explanation how the statement maps to this? Or why the number of finite zeros are less than or equal to the number of finite poles for a system to be causal?


texts:
Why do we want to minimize the difference between the two signals the original one and the modified one when all we want is the modified constructed signal? What is the purpose of making it the minimization problem? Are we trying to save the phase information as the amplitude is anyway going to be updated if we are doing for example decibel conversion for some normalization method as follows?

Decibel Converted signal = $10*log_{10}\frac{signal}{baseline}$ in time-frequency domain.

What constraints should be applied while reconstructing a signal from the above-modified signal and why?

Thanks for answering in advance.


texts: How to proceed with this convolution problem?

texts:
If
$$\alpha_k = \sum_l a_l \ \ g((k-l)T-l\Delta T)$$
$$s_k = \sum_l \alpha_l \ \ q((k-l)T+k\Delta T)$$

where $a_l \in \pm1$ and $g(t) = \frac {\sin(\pi t/T)}{\pi t/T}$ and $q(t) = \frac {\sin(\pi t/(T+\Delta T))}{\pi t/(T+\Delta T)}$,

can we prove $\forall k, s_k =a_k $?

My attempt:

$$s_k = \sum_l \sum_i a_i g((l-i)T-i\Delta T) \ \ q((k-l)T+k\Delta T)$$
$$  \ \ \ =\sum_i a_i \sum_l g((l-i)T-i\Delta T) \ \ q((k-l)T+k\Delta T)$$
If $k=i$,
$$=a_k \sum_l g((l-k)T-k\Delta T) \ \ q((l-k)T-k\Delta T)$$
Now, is $\sum_l g((l-k)T-k\Delta T) \ \ q((l-k)T-k\Delta T)=1$? How to proceed for $k\not=i$?


texts: How would I find the function given the magnitude plot and the phase response?

texts:
I'm wondering how I'd find the Fourier Transform X(jw) given the following information:

My understanding is that the expression for the continuous time fourier transform (CTFT) is magnitude(CTFT)exp(jw*phase), but I'm unsure how to use this expression here, since the phase is different for different values of w. I tried to do something piecewise:

from (-pi to 0):
X(jw)=rect(w/(pi))*exp(pi/2*j) = j*rect(w/pi)

from (0 to pi):
X(jw)=rect(w/(pi))*exp(-pi/2*j) = -j*rect(w/pi)

This doesn't agree with the answer key:
X(jw)=jrect((w+pi/2)/pi) - jrect((w-pi/2)/pi).

Would appreciate any thoughts on how to better approach this problem, since I'm very confused. Thanks!

***please note, here, j is used instead of i, the imaginary number (sqrt(-1))


texts: Relation between Gaussian derivatives and Gausian-windowed Cosine function

texts:
I am doing some research on UWB radars which transmit a pulse given by:
$$
g(t) = p(t) cos(2\pi f_{c}t) = A e^{(-\frac{t^{2}}{2\tau ^{2}})} cos(2\pi f_{c}t)
$$
In some other papers, the transmitted pulse is also described as a higher order derivative of the Gaussian term $p(t)$, such that:
$$
g(t) = \frac{d^{n}}{dt^{n}} \left( Ae^{(-\frac{t^{2}}{2\tau^2})} \right)
$$
The Gaussian derivatives can be found recursively, which form the Hermite polynomials. Is there a way of showing how the two are equivalent analytically, i.e. without using graphical methods? I am aware of the fact that Hermite polynomials have asymptotic expansions in terms of a cosine function, but this does not help me for my derivation.


texts: How to shift a signal to the center of the frequency domain?

texts:
Let's assume I have a 1024 x 1024 matrix that represents the spatial domain.  After I perform a FFT and center the frequencies, I get the a signal that looks like the following in the frequency domain.  Let's say that this signal is centered around (812, 812).  Now, I want to shift this to the center of the frequency domain.

Now, what exactly qualifies as the center of the frequency domain?  Is it (512, 512), (512, 513), (513, 512), or (513, 513)?  If I perform the inverse FFT to the shifted signal, and plot the phase of the complex signal, I get results that look like the following.

If I shift to other centers (512, 513), (513, 512), or (513, 513), I get a similar slowly-varying frequency in my background.  Whereas in the original signal, the phase of the background is constant.

Consequently, what is the best way to ensure that shifting to the center faithfully represents this constant background phase?


texts: Why do digital modulation when the signal entering the channel is analog?

texts:
I am learning about digital filters and came across the link Why do digital filters work?

In real world communications, I think the input to the channel is in analog after being modulated by digital modulation techniques such as BPSK, Qam etc. These modulation techniques convert the real valued signal to a symbol space. The following questions may seem trivial and can be found in text books, but it is difficult to extract specific information.

I am unable to understand, is the input to the channel real valued numbers or symbols?
Is the modulated signal passed into the channel? IS the modulated signal digital?
If not, Why should we do digital modulation if the signal entering the channel is analog and in which stage do we need digital filters?

An example with a block diagram would be helpful. Thank you


texts: Algorithms for finding fundamental frequency based on ACF result

texts:
I am developing a software for fundamental frequency tracking. For this purpose, I have designed a function which calculates autocorrelation over the signal and a second function which, based on autocorrelation result, finds the peak corresponding to the fundamental frequency.

However the code I have written is not very reliable. What I want to know is: which algorithms are reliable for fundamental frequency peak search?

EDIT

My autocorrelation plot looks as follows so far, when done in MATLAB:

however, I implemented it in C, because my software is in C, as follows:

 91     for(;i < *length;i++) {
 92         for(j = i;j < *length + i;j++) {
 93             if(j > i) {
 94                 sum += 0;
 95             } else {
 96                 sum += samples[i] * samples[j];
 97             }
 98         }
 99
100         result[i] = sum;
101         sum = 0.0f;
102     }

with i starting in 0. I also believe this code to be OK.

Approximating the above plot in MATLAB, I see this, where the marked peak would be my fundamental frequency one (the note I'm testing with is an E2)

as we can see from this plot

the signal I'm dealing with is quasiperiodic and the difference between those peaks actually result in the fundamental frequency for E2 note: the distance between the two is 389 - 193 == 196 (values obtained from drag & drop of MATLAB plot), which, divided by my sampling rate of 16 kHz, results in 0.01225, that would be my wave period. Inverting this value I obtain 81.6326530612 Hz, which is very near to my expected 82.41 Hz for E2.

However I'm having a real bad time trying to locate these two peaks in code, since I'm not sure what to compare to be sure the peaks I found are actually these two peaks.


texts: What is the requirement to reconstruct a spatial domain signal if we sample in the frequency domain?

texts:
I've come across an interesting question with regarding to signal reconstruction.
The sampling theorem states that a signal in the time or spatial domain must be sampled at twice a rate twice the bandwidth in order to perfectly reconstruct it. The only requirement of the input signal is that it has finite bandwith.
However, what is the analog to this if we instead sampled in the frequency domain?
My best guess is that the signal in the spatial domain must also be finite (i.e. image must not be infinitely large). My reasoning for this is that windowing of the input signal causes frequencies to "smear" thus giving them a width in which we can sample. If we were to have an infinite sinusoid input signal, the frequency component would be an impulse which would be impossible to sample.
However, I'm struggling to formal define this frequency sampling interval in terms of the input signal size.


texts: What is the type of each 4 different noise signals that are shown below?

texts:
Dear signal processing experts,

I am looking at four different noise signals.I got them in a time domain and they are different. I went to the frequency domain and found the fft for all four signals.I got differnet shapes but I still cannot recognize which type of the noise(Pink,blue,white brown or what type)[![enter image description here][5]][5]

Could you please help me? what should I do?


texts: Signal Processing/FFT gives very high magnitudes for low frequencies

texts:
The script essentially pulls PCM data from the sound card and stores them in a buffer. Then I apply fft and graph it. I am looking through this blog post for some examples and ideas on how to implement it myself.

Here is the gist of the script:

self.rate = 48100
self.buffer_size = 1024
...
def get_fft(self):
        data = self.get_pcm() #pulls 1 buffer (1024) of PCM data from the soundcard.
        fft = numpy.abs(numpy.fft.fft(data))
        fft = numpy.divide(fft, 10000)
        freq = numpy.fft.fftfreq(len(fft), 1.0 / self.rate)
        return freq[:int(len(freq)/2)], fft[:int(len(fft)/2)]

I am graphing it in a window with PyQtGraph and using a simple tone generator website to produce frequencies.

The frequencies do appear in the correct spot but their magnitude varies quite a bit even though I am not changing the volume or anything. This is especially the case when I slide toward the lower frequencies < 100hZ and the data is much higher in magnitude compared with the rest of the graph.

Am I doing something wrong, and if not, is there a way to dampen the lower frequencies so the entire spectrum appears "equal in magnitude" so to say?

UPDATE 1 (added a window function to the PCM data before FFT:


texts: I have to compress an image using SVD. I did a few things, but all of them produced a black & white image. However, the output must be RGB. How can I compress an image without changing its original format?


texts: How to look at 2KHz to 2.5KHz with a 1024 FFT

texts: I've tried searching for an answer to this, but i don't think i'm looking for the right thing. Lets say i wanted to examine a signal in the frequency domain that's between 2K-2.5KHz. Can i do this with a FFT smaller than 8192, for example 1024? I understand that if i took an FFT of 8192 that i could see the signals in bins 2000 through 2500. Is there a way to take a smaller FFT, or multiple smaller FFTs in order to achieve this. I don't really care what the signal looks like outside of this range. Thanks for any help!!


texts: How does the number of frequency-domain sampling points influence the outcome of an inverse FFT?

texts:
Given some frequency-domain representation of an impulse response.

How does the number of frequency-domain sampling points influence the outcome of an inverse FFT, if I keep the sampling frequency constant?

Example 1
Take x(t) = e^(-t)*sin(t) for t in (0,10). Sample the signal, take its fft. Omit every second point of the fft and on the result do an inverse fft. Here is the result:

So it looks as if the frequency-domain downsampling had removed the second portion of my signal, while dividing the first part by two. (Indeed multiplying the result by two results in a curve lying exactly above the first part of the original signal.)

Why did it remove the second part and not some arbitrary other part? I guess this is related to the second part being nearly zero everywhere, but I can't seem to find the exact reason.
Why is the result divided by two?
How does this generalize to other time signals?

Example 2 (pathological)
Same as above, this time with a signal that is linearly decreasing from 1 to 0.1.

Now what is that?

Edit There was a mistake here: I accidentally used an uneven number of sampling points, which resulted in a complex signal after the ifft. Here is the fixed plot.

I'm interested in mathematical/theoretical as well as intuitive explanations of what's going on, as well as pointers on where to read on. I even had trouble finding a correct term for what I am doing.

Here's the R code that produced the above plots.

# First plot
t <- seq(0.01, 10, 0.01)
z <- exp(-t)*sin(t)
Z <- fft(z)/length(z)
Z2 <- Z[seq(1,length(Z),2)]
z2 <- fft(Z2, inverse=T)
plot(z)
points(Re(z2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))

# Second plot
x <- seq(1,0.101, -0.001)
X <- fft(x)/length(x)
X2 <- X[seq(1,length(X),2)]
x2 <- fft(X2, inverse=T)
plot(x)
points(Re(x2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))


texts: Delayed impulse does not delay spectral response

texts:
Inspired by Dr. Sarwate's answer to the question  How replicas are formed in Frequency domain when a signal is sampled in Time Domain? , I decided to see for myself the underlying concept.

I interpreted Dr. Sarwate's answer that sampling was a sequential activity. All one needed to do was to multiply an impulse with the signal meant to be sampled. And this needed to be repeated with delayed/shifted versions of the impulse.

Multiplication in time domain is convolution in frequency domain and vice-versa. I thought that with the impulse shifting by every sample, its spectral response would also undergo a similar shift in frequency domain. But it seems not to be the case.

I wrote a toy program in octave and the plots of the frequency response havent brought any joy. What have I misunderstood here?

## Num Samples
N = 10;

## Row vector representing samples (all zeroed out)
x = zeros(1,N);
y = zeros(1,N);
z = zeros(1,N);

## Undelayed impulse (For lack of a better word)
x(1) = 10;

## Delayed by 1 sample
y(2) = 10;

## Delayed by 2 samples
z(3) = 10;

## Obtain spectrum of undelayed impulse
s_spectrum_x = fft(x);
s_spectrum_abs_x = abs(s_spectrum_x);

## Obtain spectrum of impulse delayed by 1 sample
s_spectrum_y = fft(y);
s_spectrum_abs_y = abs(s_spectrum_y);

## Obtain spectrum of impulse delayed by 2 samples
s_spectrum_z = fft(z);
s_spectrum_abs_z = abs(s_spectrum_z);

>>disp(s_spectrum_abs_x);
10 10 10 10 10 10 10 10 10 10

>>disp(s_spectrum_abs_y);
10 10 10 10 10 10 10 10 10 10

>>disp(s_spectrum_abs_z);
10 10 10 10 10 10 10 10 10 10

Shouldn't the initial bins of y and z be 0?


texts: About output signal digital band pass filter

texts:
I try to use the butter worth pandpass filter to retrive the OSC from signal y showing in Fig3.

The output signal is as in Fig4. We can see from Fig4 that I have retrived the OSC successfully.

But in the output signal(Fig4), there is noise signal from sample number 0 to sample number 100. I want to know which caused the problem? How can I remove the noise signal or where can I start?

The Octave code is as following:

%###################################################

% freq:the sample rate

% sinNum:Ignore it, not used.

%###################################################

function [y] = DigitalFilterAppliedProb(freq, sinNum)
    close all;

    x1 = (0:1/freq:1);
    x1 = x1(1:end-1);
    i = 0;

    lenOfX1 = length(x1);
    y1 = zeros(1, lenOfX1);

    %for i=1:sinNum
    %   y1 = y1 + sin(i*2*pi*x1);
    %endfor

    y1 = y1 + sin(20*2*pi*x1);

    y2 = [zeros(1, freq) y1 zeros(1, freq)];

    lengthOfY2 = length(y2);

    x0 = (0:1/freq:lengthOfY2/freq);
    x0 = x0(1:end-1);
    %y0 = 2*ones(1, lengthOfY2);
    y0 = -10*x0+10;

    y = y0 + y2;

    %Plot
    figure 1
    subplot(2, 2, 1)
    plot(y0);
    title("Fig1.Source signal(y0 = -10*x + 10)")

    %figure 2;
    subplot(2, 2, 2)
    plot(y2);
    title("Fig2.Source Signal(y2=sin(20*2*pi*x))")

    %figure 3;
    subplot(2, 2, 3)
    plot(y);
    title("Fig3.Source Signal(y=y0+y2)")

    %Low pass filter
    [b, a] = butter(8, [5/(freq/2) 45/(freq/2)]);
    yf = filter(b, a, y);

    %figure 4
    subplot(2, 2, 4)
    plot(yf);
    title("Fig4.Filtered Signal")

    figure 2
    freqz(b, a);

endfunction


texts: Find Preamble (pattern) in signal, using Corelation

texts:
I have a signal which always has the same preamble (4x 0xAA - 10101010...).

I also have a signal with additive noise, and I want to find my preamble in that a noisy signal using corelation.

U used xcorr, but I was a little confused by that. Can you help me? It looks like that signal was too noisy so that no preamble was found?

I have just used

corel=xcorr(preamble(:,2),u_noisy(:,2));


texts: CUDA vs FPGA for Image Processing; which is better

texts:
Is there anyone with Image Processing background who can suggests which one is better for Image Processing algorithms among CUDA and FPGA. I'm specifically looking to write code for Wavelet Transform and Discrete Cosine Transform and eventually writing code for Quantization and Arithmatic coding, but i am confused which hardware programming language should i focus on among CUDA and FPGA.

Here are few questions i want to ask,

Which one is better for Image Processing like compression, watermarking etc ?
Which one is Faster ?
Which one is easy to    implement ?


texts:
I am using an array of 4 microphones in a square formation. My goal is to estimate the direction (azimuth only) of incoming speech sound.

The array looks like this:

I have recordings from the array to test my code with.

To estimate the delays between two microphone signals, I use cross-correlation method. This step is working for me and I've tested it somewhat thoroughly.

I am currently using delay values between $x1$ and $x2$, $x2$ and $x3$, and $x3$ and $x4$.

From the delays in samples, I calculate the azimuth angles of incoming sound between two microphones each using the arcus sine and the distance between the microphones. I get angles between $\pm\frac{\pi}{2}$. I am somewhat certain this step is working correctly too.

The next thing I do is mirroring the angles of either the first ($x1,x2$) or the third ($x3,x4$) combination based on whether the second angle (from $x2,x3$) is positive or negative.

From this, I should have the directions of the incoming sound, relative to the direction of $x2,x3$ being the front (right side of array in the picture).

To get the result of my DoA estimation, i add 90 degrees or $\pi/2$ to the second and 180 degrees or $\pi$ to the third angle. Now, all angles should point somewhat into the same direction, in my opinion, but it is not working.

Where is my mistake? I would really appreciate if someone could point out my error(s).


texts:
I am trying to understand the LidarBoost algorithm as explained in this paper (PDF warning).

I don't understand how they take the original depth-images $Y_k$ and transform them into the up-sampled images $D_k$. I get how optical flow is used to align the $Y_k$ into a chosen reference frame, but is the transform between $Y_k$ and $D_k$ just a standard image up-sampling with nearest neighbors for the "interpolation" step? If that's the case, can someone explain how they get the term $W_k$ in their data term of the energy function? They say this about it, but I don't understand how to construct $W_k$ for each $k$:

  $W_k \in \mathbb{R}^{\beta_n \times \beta_m}$ is a banded matrix that
  encodes the positions of $D_k$ which one samples from during
  resampling on the high-resolution target grid

I'm trying (so far frustratingly ineffectively) to get enough of a sense of the algorithm to try to implement it.


texts: Remove a known wav file from recorded file

texts:
I looked at many similar questions but still cannot find an answer to my problem.

I'm playing an audio file N, while recording a man talking (b).
The problem is that the microphone gets the played sound N together with the man talking, b. so actually I have y=N*+b in my recording, where N* is the played sound with a short time delay and a bit noise (due to the recording and the phone speaker).

My goal is to totally remove the N* from the recorded file. It seems like an easy problem cause I have the original played file N, but I find it more complicated.

What I tried:

finding the delay between the N and y, invert N and add to y. Seems like it's not working and the result is even worse probably because N* has different amplitudes and a phase shift.
Tried the same thing but subtracting in the frequency domain between y and N. Still no good.

Any suggestions?


texts: GNU Radio - PSK Mod block - unexpected constellation diagram

texts:
I am simulating a QPSK modulation in GNU radio. Here is the flowgraph:

.

The source is a binary stream coming from the Random Source block. There are 4 PSK Mod blocks configured identically (4 constellation points - a QPSK modulation, Grey coding and Differential encoding turned on, excess bandwidth set to 0,35). The modulators differ in the parameter samples/symbol (sps), which is set to 2, 4, 8, and 16. The constellation sinks are configured identically. What is expected to be shown on the constellation diagram is a plot with 4 constellation points that could be the tips of a square or 4 clusters of points that are concentrated around those 4 points as a certain amount of noise or imperfection of the system is added. Instead, we have the following:

Constellation diagram when sps is set to 16:

Constellation diagrams for sps 2, 4 and 8 look the same but with less points on the sides of the rhombus and less points around tips of the rhombus that look like the extensions of the rhombus sides.

The question is why constellation diagrams look like this - why additional points are added and there are more and more of them as we increase the samples per symbol parameter so the diagram with sps 16 looks more like a rhombus than a 4 clusters of points? Why significant number of points appear around 4 tips of the rhombus looking like extensions of rhombus sides?


texts: intuitive interpretation Fourier Transform of two different Rectangular pulses

texts:
From my understanding of Fourier transform, a Fourier transform of a signal in time domain will give the different frequency components of the signal in frequency domain, specified by their contributions(energies) in the original.

The Fourier transform of rectangular function is a sinc function

If I take Fourier transform of two different rectangular pulses, with width w1 and w2, with w1>w2, the sinc function of one width w1 is narrow and has large peak as compared to the one with width w2(wider and smaller peak). How do I intuitively understand this behavior?


texts: Measurement of frequency deviation in FM signals

texts:
Is there any way to measure frequency deviation in a recorded frequency modulated time domain data? The little research i have done on net mostly concerns with frequency deviation measurement using spectrum analyzer in real time i.e. data continuously received on spectrum analyzer while measuring deviation in carrier frequency.
If i record FM data using some digitizer and i know the carrier frequency, is it possible to measure frequency deviation using some fft technique on recorded data offline?
Thanks


texts: Self-correlation vs Digital frequency: figure from paper

texts:
In the paper, is discussed a MIMO-OFDM system over the frequency self-correlation of i.i.d. Rayleigh
channels and subcarrier grouping. in this paper is shown the following figure.

it shows the self-correlations of different fading environments.
Questions:

It is shown autocorrelation function in this figure, isnt?
What conlusion can I do accroding to this figure?


texts: Sine Wave "Lobes" (Basics, and probably a dumb question)

texts:
I am beginning my journey on trying to understand a little deeper on signal processing. I wonder if the effect I am seeing is worth any spit or is there a deeper level of understanding is apparent I do not grasp.
I was initially using Jupyter Notebook to make some examples of Aliasing so that I could see the frequency foldback, and give myself a workspace to intuitively understand this concept. And after playing around with drawing sine waves, If I didn't create a sine wave at frequencies based on power 2 of my "sampling rate" then I would create what looked like lobes in my sine wave.
My initial code looks like this
# Aliasing Example
import numpy as np
import matplotlib.pyplot as plot
import math

%matplotlib qt
plot.ion()

# Number of samples
N = pow(2,14) # 16,384 Samples

# Sampling Frequency
Fs = pow(2,14) # 16,384 Samples/second

# Sampling Frequency
T = 1/Fs # 1 second of data

# The amount of sampling time
time = np.linspace(0.0,(N-1)*T,N)

#Nyquist Frequency
Fn = (Fs/2)

# Number of lobes
num_lobes = 4

#Signal 1
f1 = 4096 - num_lobes/4
str1 = "Sine Wave @" + str(f1) + "Hz"
w1 = 2*math.pi*f1
sig1 = np.sin(w1*time)

fig1 = plot.figure()
ax = fig1.add_subplot()
ax.plot(time,sig1)
ax.set_title(str1)
ax.set_xlabel('Time')
ax.set_ylabel('Amplitude')

The plot of the above graph looks something like
It looks like there is an accumulation of phase difference based between my "sampling frequency" of 16384 Hz and the signal frequency 4097 Hz. I don't think I have explored if this actually means anything? Does this have any real-world implications on how I capture data? On a relationship I need to try to satisfy to correctly recreate/capture data? That if I run an FFT or get any other signal information, am I still getting the correct value on the power of the spectrum?
I guess I am looking at this thinking if I were to capture this on a scope I would think I am getting multiple signals going on at once, but it's only a single wave. And that I don't have proper understanding of setting sampling for my signals of concern?


texts: Normalized autocorrelation of a sum of two signals

texts:
I obtained the autocorrelation function of a sum of two signals:

as

but I want to know what is the normalized autocorrelation of above equation?


texts: Spectral effects of multiplying a signal by itself?

texts:
This has to do with creating the synchronization circuit for MSK in a DSP as described in "Minimum Shift Keying" by Subbarayan Pasupathy published in IEEE Communications Magazine.

At the beginning of the circuit he shows signal passing through a "squarer".  The explanation reads:

  "Although the MSK signal $s(t)$ has no discrete components which can be
  used for synchronization, it produces string discrete spectral
  components at $2f_+$ and $2f_-$ when passed through the squarer. (The
  squarer, in effect, doubles the modulation index and produces an FSK
  signal with $\delta_f = 1/T$, known as Sunde's FSK.  Sunde's FSK has 50
  percent of its total power in the line components at the two
  transmitter frequencies.)"

$s(t)$ consists of a signal containing components at $\pm 300 \mathrm{Hz}$ around the carrier frequency.

I'm confused by this because when I multiply the signal by itself it doesn't seem to produce a signal with components at twice the offset frequencies.  Is squaring a signal different than multiplying it by itself (sample by sample, not convolution with itself)?

Thank you


texts: What are the minimum knowledge required to begin the study of Digital Signal Processing?

texts:
I am a student of computer science (not the university but technical school).
I am interested in the world of DSP, and I saw that it is closely connected with mathematics. I noticed for example that a lot is based upon the Fourier I'm slowly trying to learn.

I also want to buy the book "Understanding Digital Signal Processing", but I do not know what I would go against it, and if I can understand it. What I want to know is a short list of topics needed before we can deal with such a study that one should know, is listed for reference material.

Let me give you an example of what I mean (to be taken only indicative, since we do not know almost nothing of DSP)

Mathematics: Integral
Physics: Pressure
Science: Anatomy of the human ear, Anatomy of the human eye.

I know most of you are engineers with years of work experience and master behind it, but somewhere we must also begin ;)


texts: Sampling rate in Wifi 802.11 -> 20 MHz enough with a BW of 20 MHz?

texts:
In a Wifi 802.11n context, I'm looking to find the sampling rate to perform some processing on the signal and I've something I cannot understand : in the book Next Generation Wireless LAN's: 802.11n and 802.11ac, I would like to know the meaning of this sentence :

  In 802.11a, the fundamental sampling rate is 20 MHz, with a 64-point
  FFT/IFFT. The Fourier transform symbol period, T, is 3.2 μs in
  duration and F is 312.5 kHz.

Why is the sampling rate « 20 MHz » ?  The bandwitch of the Wifi 802.11 is 20 MHz so my first idea would be to double this value to validate the Nyquist-Shannon criterion. In addition, the guard interval is not included ?


texts: Why Wavelet developed when we already had Short-time Fourier transform

texts: If we already had Short-time Fourier transform for better analysis of a signal than Discrete Fourier Transform, then what was the need that leads to development of Wavelet Transform ?


texts: Transferring data over sound with QAM / QPSK

texts:
Been working on a FSK Modem in the last few weeks and have gotten it to work with 400bps, very reliable, atleast over a virtual audio cable, but it also works when playing a sound directly into a microphone.
Now I've shifted my focus to other Modulation techniques that could be used, such as M-QAM (16, 64, 256) and was wondering if anyone has any experience in that direction.
Would QAM be viable for the transfer of data over audio? What concerns me is the complexity of the signal detection when it comes to QAM, or even QPSK. I am trying to do this, same as the FSK, in purely Python, with .wav files as the intermediate medium of storing and playing the signals.
Would appreciate any kind of information or tips.


texts:
Why is it that we Z-transform a difference equation to get a the transfer function of an digital filter?

How come a digital filter is given in the Z-domain, and what is the Z-domain?

And for that sake, why do analog filters operate in the S-domain, and what is the S-domain?


texts:
Lets say. I have an image of 100 samples, and I want to find the presence of smaller image of 24 sample using cross-correlation in the fourier domain. I use Bartlett's and Welch's method for PSD, where I split up the original 100 samples into 4 segments of 25 samples.

Now I want to find the maximum or peak response,

Do I look at all 4 segments to find the maximum response?


texts: Welch’s Algorithm of Averaging Modified Periodograms

texts:
I am second year Undergrad student in computer engineering . I have a homework problem where I needed to compute Power Spectral Density . I'm using MATLAB as I noticed that it has good documentation and also a function to that.
I'm going through this page to understand using dsp.SpectrumAnalyzer System object™
https://www.mathworks.com/help/dsp/ug/spectral-analysis.html
I used this object to get my results , but i failed to understand how it is doing so. I vaguely understand the concept of PSD that it is computed by Fourier transform of AutoCorr of discrete sequence as FT cannot be applied directly to the random processes.
I'm stuck and confused on this point itself

If I have "m" samples and I need to compute PSD , Is this the correct procedure as described in POINT 1

Divide m Samples into N point segments . --> this results in total of m/N segments (true ?)

Each segment which has N points is further divided into L overlapping segment having M points .

And these M points might have D overlapped points
Is my understanding correct ?

Thanks for taking time to read my question.


texts: Gaussian Pyramid - How is Subsampling Rate Related to Sigma?

texts:
I found a gaussian pyramid implementation in a MOPS paper (feature detection). They use sampling rate $s=2$ and $\sigma=1$ - i.e. to generate a new level of the pyramid, the current level is smoothed with Gaussian blur of that sigma and then subsampled. The same parameters are used to build each new level.

However, I need to use smaller sampling rates, e.g. $s=1.5$, to get more pyramid levels (non-integer sampling rates would be achieved by interpolation).

How to choose appropriate sigma, knowing the sampling rate?

My first guess is to use $\sigma=\sqrt{s/2}$, since the variance of the gaussian filter is half the sampling rate (radius) and sigma (standard deviation) is square root of that quantity. But I am not sure if that's correct.

In another words: Given a sampling rate, I need to pick gaussian blur sigma preventing aliasing.


texts:
Interleaving is often encountered in digital communication systems. I have seen interleaving between codewords in a single OFDM symbols as follows

Assume the bits are denoted by

$$\{c_o,c_1,c_2,\cdots,\} $$

And assume we use 16-QAM and we have many codeword each of length $N_{CW}$. Then to perform interleaving we do the following, the first 16 QAM symbol (first subcarrier) in the OFDM symbol is from  $$\{c_o,c_1,c_2,c_3\} $$ The second 16 QAM symbol in the OFDM symbol is from $$\{c_{N_{CW}},c_{N_{CW+1}},c_{N_{CW+2}},c_{N_{CW+3}}\} $$

The mapping is easy to understand, I don't understand how this helps in an OFDM system. Essentially we are mapping non adjacent bits to one OFDM symbol? What are the benefits over mapping adjacent bits to non adjancent OFDM symbols?

Thanks


texts: I am trying to understand adaptive filters as I want to implement a denoising algorithm based on them. Do we need to train all thee adaptive filters before they start their actual process? For the training phase, wouldn't we require the desired signal values?