texts: How to determine brown noise variance from samples?

texts:
To be correct I want to determine variance of white noise before integration (brown noise is white noise after integration). For example, I have a following model (in MATLAB) of noises acting on my sensor:

How can I determine variance (power) of 'white noise 2' from samples (total noise)?

Of course noises are band-limited. I have to take into account following noise model of my sensor in my project but I got stuck on this.

\begin{align}
\tilde \omega(t)&=\omega(t)+\beta (t)+\eta_v (t)\\
\dot \beta(t)&=\eta_u(t)
\end{align}

Can I use power spectral density or Allan variance plot for this (how)?


texts: OpenCV - What type of a result does cv2.goodFeaturesToTrack() return?

texts:
Dear citizens of Stackexchange,

I am a 3rd grade Electrical and Electronics Engineer student, who is working on an image processing project using OpenCV 3.2 and Python 2.7.

What we would like to accomplish is to build up a system which can compensate the camera using Lucas Kanade's Optical flow method.

On the sample that was presented on the OpenCV's website, one of the inputs of the function calcOpticalFlowPyrLK() was cv2.goodFeaturesToTrack.

I wanted to change that input to an output I have acquired from my another function. But the outputs of those two functions are mainly different in type.

What I would like to ask is, what type of topology is the following output format (matrix, array, etc.) that we get from cv2.goodFeaturesToTrack()?:

[[[ 582.  408.]]
 [[ 453.  373.]]
 [[ 483.  395.]]
 [[ 447.  298.]]
 [[ 589.  371.]]
 [[ 436.  358.]]
 [[ 624.  370.]]
 [[ 624.  413.]]
 [[ 470.  395.]]
 [[ 635.  378.]]
 [[ 630.  417.]]
 [[ 498.  395.]]
 [[ 427.  354.]]
 [[   6.  325.]]
 [[ 566.  381.]]
 [[  20.  323.]]
 [[ 532.  400.]]
 [[ 568.  374.]]
 [[ 457.  321.]]
 [[ 460.  413.]]
 [[ 471.  317.]]
 [[ 524.  399.]]
 [[ 586.  417.]]
 [[ 251.  184.]]
 [[ 289.  428.]]
 [[ 435.  342.]]
 [[ 635.  393.]]
 [[ 590.  387.]]
 [[ 160.   20.]]
 [[ 431.  296.]]
 [[ 449.  324.]]
 [[ 439.  371.]]
 [[ 466.  372.]]
 [[ 481.  465.]]]


texts: Why is the $G_{rx}=\sqrt{\frac{N_{rx}}{\hat{N}_{rx}}}S^T_{rx}\tilde{U}^H$ ? How does author calculate it?

texts:
I search for some information about Null Space Projection,and saw some information from this pdf: http://taneli.riihonen.fi/presentations/C027slides.pdf
,in the page 16,the author begin explaining something about Null Space Projection,however,there is something important formula that i can't understand.

Here is the figure about Null Space Projection

Why is the $G_{rx}=\sqrt{\frac{N_{rx}}{\hat{N}_{rx}}}S^T_{rx}\tilde{U}^H$ ? How does author calculate it ?

I saw something clues:https://ieeexplore.ieee.org/document/5757642  about the the explanation of formula ,but still i don't understand how does the author calculate it.

$\mathcal E\{||\Delta \tilde{H}_I||^2_F\}=\epsilon_H^2||\tilde{H}_I||^2_F=N_{rx}N_{tx}\epsilon_H^2$

$R_t=\mathcal E\{\Delta \tilde{t}  \Delta \tilde{t}^H\}=\epsilon ^2_t \frac{tr\{R_{\tilde t}\}}{N_{tx}}I=\epsilon ^2_t \frac{P_{tx}}{N_{TX}}I$

$H_I= \tilde H_I+\Delta \tilde H_I ;t= \tilde t+\Delta \tilde t $ ,and they are both matrices

$\tilde H_I, \tilde t $ are the side information available ,and $\Delta \tilde H_I, \Delta \tilde t $ are the respective unknown errors


texts: Fir filtering operation? Also convolution?

texts:
While reading signal processing first

I came across a concept which indicated that fir filtering operation is also convolution
As shown in attached photo

In figure caption line,convolution is written in bracket after fir filtering

If yes?then what about IIR filtering operation? Is that also convolution?


texts: Relation between Power Spectral Density and RMS of the signal

texts:
I have a pressure signal at two locations (r=1 and r=1.3). I found the Power spectral density (PSD) and the Root Mean Square (RMS) of the siganl. My question is why at r=1 the PSD is higher than the PSD at r=1.3 while the RMS at r=1 is less than RMS at r=1.3.

I mean is there any relation between PSD and RMS of the signal?


texts: I want to find the first period $T_0$ in a signal $x[n]$ and save it to a vector?

texts:
I want to find the first period $T_0$ in a signal $x[n]$ and save it to a vector $\hat x$?  $x[n]$ is read in by the command:

[x, fs] = audioread('Data/sample1.wav');

First of all, I have calculated the main frequency of the signal x[n]. I did it by

[x, fs] = audioread('Data/sample1.wav');
N = length(x);
f = (0:(N-1))*fs/N;
xdft = fft(x);
[~,index] = max(abs(xdft(1:length(x)/2+1)));
freq = 0:(fs/length(x)):fs/2;

Ok. freq is now my main frequency. As a next step, I want to calculate T_0.

T_0 = 1/fs;

And now I have to find this sequence, but how to do this? If I guess the signal in the wave is sines or cosines, but I do not know how to check this.


texts:
I'm trying to change this filter transfer function to state space representation

$  y_t=\frac{1+b_1 z^{-1}}{1+a_1 z^{-1} +a_2 z^{-2}}u_t  $

I tried writing it as time series

$  y_t+a_1 y_{t-1}+a_2 y_{t-2}=u_t+b_1 u_{t-1}  $

Here is where I am not sure how to continue, I wrote an expression

$ x_t=\frac{1}{1+a_1 z^{-1}+a_2 z^{-2}}u_{t-1} $

such that

$ y_t=(1+b_1z^{-1})x_{t+1}=x_{t+1}+b_1x_t  $

and

$ (1+a_1 z^{-1} +a_2 z^{-2})x_t=u_{t-1}$

The idea was to get:

$ x_t=u_{t-1}-a_1x_{t-1}-a_2x_{t-2} $               $ (1)$

$ x_{t+1}=u_{t}-a_1x_{t}-a_2x_{t-1}  $              $(2)$

renaming

$ x_{t+1}=x_{a,t+1} $

$ x_{t}=x_{b,t+1}  $

and write my state equations as

$ \begin{bmatrix} x_{a,t+1}\\ x_{b,t+1}\end{bmatrix}=\begin{bmatrix} -a_1 && -a_2\\ 1&&0\end{bmatrix} \begin{bmatrix} x_{a,t}\\ x_{b,t}\end{bmatrix} +\begin{bmatrix} 1\\ 0\end{bmatrix}u_t$

from (2) my states are

$ x_{a,t}=x_t $

$ x_{b,t}=x_{t-1}  $

But my problem comes when I want to state my output equation, which is

$ y_t=x_{t+1}+b_1x_t  $

but   $ x_{t+1} $    is not one of my states so I'm not being able to express my output equation in terms of $x_{a,t}$ and $x_{b,t}$

I would appreciate any hint on where I am making the mistake, thanks for your help.


texts: Given a spectrogram, how do I calculate loudness over time?

texts: I want to calculate the loudness of a given sound over time (like, in a graph) from its spectrogram. Can I do this from the spectrogram or is it better to do from the raw sound?


texts: Techniques for recognizing white rectangular labels in these pictures? (Ideally OpenCV)

texts:
I need to recognize these two types of labels.
zBar does recognize some of the barcodes sometimes, but I'd need to catch the ones that it doesn't and detect the label, so I can try and straighten up the label, maybe enhance it with thresholding or other techniques, and more importantly, being able to cut the pieces of the label to send them to OCR so I have a fallback method for unreadable barcodes.
Any suggestions?

I'm using OpenCV 2 and Python 3.6


texts: A very fundamental question about average normalized power of noise

texts:
If I have a average normalized power spectrum of noise is like this
$W(f)=N_0$ while frequency is $-B$ to $B$.

Why the average normalized power is $1/4 N_0 (2B)$ insteat of $N_0 (2B)$?


texts: "Time To Lock" in Bit Timing Synchronisation

texts:
In the context of bit timing synchronisation in digital communications, what is meant by the requirement that says the "Time to lock to a sampling point should be no more than X symbols"?

There seems to be no information about this issue online.


texts: How to find Cutoff frequencies (f1 &f2) for a narrow band pass filter for a particular central frequency?

texts:
This is a basic filter question I think.
I want to define a narrow bandpass filter's cutoff frequencies (f1 & f2) for a particular central frequency (fc) in iir filter
I think in this case
fc=(f1+f2)/2

But simply taking the average will give infinite possibilities of cutoff frequencies.
So how would I select the f1 & f2 in particular?
Based on -3dB cut off frequencies? In that case, is there a definite formula to consider this -3dB drop in the gain?


texts: Does MatLab's `ftt` function gives a Fourier Transformed signal in terms of frequency $f$ or angular frequency $\omega$?

texts:
When we use MatLab's fft function to Fourier transform a time signal, do we obtain a Fourier space signal in terms of frequency $f$, or angular frequency $\omega$?

Let say we have

tDelta = 0.1;
tMax = 8;
t = 0:tDelta:tMax;

sigFreq = 3*(2*pi);
s = sin(sigFreq*t);
s_FT = fft(s);

Here's what I think is going on, please correct me if I'm wrong:

It seems that tDelta = 0.1 seconds means that the sampling rate is 1/tDelta = 10 Hz.
And then when we Fourier transform the signal $s(t)$ with ftt MatLab gives us the spectrum $\hat{s}(f)$ with the frequency $f\in[-5,5]$ Hz.
To convert this to angular frequency $\omega$ we must multiple $f$ by $2\pi$.
So finally, in terms of angular frequency we have $\hat{s}(\omega)$ with $\omega\in[-5*(2\pi),5*(2\pi)]$.

Is this correct or have I have misinterpreted how fft works? I'm really not certain about when we have are dealing with frequency $f$ and when we are dealing with angular frequency $f$?


texts:
I am quite new in the dsp and trying to learn How to identify the vocal folds in a mel spectrogram image?
My image data looks like this.
How to find the vocal folds in this image? I am using Praat software to visualise the mel spectrogram, that gives me format frequencies, but how I can find out vocal folds?
Thank you!


texts: I have a DS-CDMA system and the chip width is fixed but every user have a different spreading code length. I want to have a simulation of signal to interference noise ratio (SINR) VS. bit error rate (BER). If I assumed that SINR is given like -25:0 dB. How can I calculate noise power (it is thermal noise)  and the interference power?


texts: Matched filter - do I need to know the signal I am trying to find?

texts:
I need to identify a matched filter, and so have gone through the mathematics to do this as listed here https://en.wikipedia.org/wiki/Matched_filter which derives the optimal filter $h$ to apply to a time series $x$, where that time series is assumed to comprise a desirable signal $s$ and some noise $v$. This suggests the optimal matched filter is:
\begin{equation}
    h = \frac{1}{\sqrt{s^{\mathrm{H}}\mathbf{\mathrm{R}}_v^{-1}s}} \mathbf{\mathrm{R}}_v^{-1}s
\end{equation}
and this should be applied to produce the filtered series $y$ thus:
\begin{equation}
    y\left(n\right) = \sum_{k=-\infty}^{\infty} h\left(n-k\right)x\left(k\right)
\end{equation}
however, I don't know $s$.  How, therefore, do I use this method (if at all)?


texts: How to get sensor covariance matrix from CSI values?

texts:
I try to use musicdoa() function in Matlab to estimate the direction of arrival of the paths of signals received by the receiver in a wireless link. The function needs sensor covariance matrix as one of the arguments.

I have a matrix of Channel State Information (CSI) that is obtained from a WiFi card. The CSI values come in a matrix shown below:

$C=\begin{bmatrix}c_{1,1} & c_{1,2} & ... & c_{1,30}\\
 c_{2,1} & c_{2,2} & ... & c_{2,30}\\
 c_{3,1} & c_{3,2} & ... & c_{3,30}\end{bmatrix}$

In which, $c_{i,j}$ is the CSI value for $i^{th}$ antenna on $j^{th}$ subcarrier.

How can I get the sensor covariance matrix using the C matrix?


texts: Why do Dyadic filterbanks downsample the high pass signal portions?

texts:
I'm currently programming a dyadic filter bank and have a question. I notice in all of the visual representations:

(from here (Dyadic Analysis Filter Bank)), the high pass filtered output for each stage is downsampled. That is, when the signal is split into two subbands, the low pass band is downsampled and so is the high pass band.

The question: why does every representation insist on downsampling the high pass subband?

I understand that you've just halved the frequency content (by half banding the signal), thus we can downsample by two and still satisfying the sampling theorem (sample rate $\ge$ $2\times$bandwidth). However, what confuses me is the fact that we've still aliased the high pass signal such that the frequency content is 'mirrored' around Fs/2. Essentially all of the high frequencies in the highpass subband now correspond to low frequencies in the aliased signal, and all the low frequencies in the highpass subband now correspond high frequencies.

Doesn't this make the analysis more difficult? As in, when you want to apply a highpass filter to the highpass subband, you are now required to apply a lowpass filter to the downsampled aliased version?


texts:
This is more of a conceptual question, so apologies in advance if this is not the correct forum for such questions.

I am trying to find a repeatable and consistent method for removing the baseline of a large number of independently acquired spectra. After an extensive literature search, I am well acquainted with the various methods for baseline removal - including the favored ones for the particular spectra I am dealing with.

However, the method I have used so far (asymmetric least squares) requires me to set some hyperparameters which do not produce consistently good results across the entire dataset. I have tried variations of lambda and p, some of which produce better results on certain spectra, but no combinations as yet produce consistently good results throughout the dataset (>10,000 spectra). The application of the modelling project is such that manual tuning of these hyperparameters for individual spectra is not an option when putting these models into production.

Does the community have a view on a baseline removal approach that is more appropriate for my application?


texts: log-likelihhood function for N sample of data

texts: if $x(t)=b A e^{ j\omega t} + e(t)$ for $t= 1,2,...,N$ where $b$ is a parameter, $A$ is a vector $M \times 1$, $e(t)$ is a white Gaussian noise with covariance matrix of $Q$ theh what is log-likelihood function for that?


texts: extrapolate turning points for a sine weighted moving average?

texts:
On a stationary signal a sine-weighted moving average is calculated (SWMA: the coefficient vector looks like the first (>0) part of a sinusoid). The SWMA looks like this: very smooth:

The future is unknown, but what would be the best way to anticipate the next turning point if you are at the first blue arrow? How would you anticipate the next turning point at the next blue arrow in real time/online analysis? Polynomial extrapolation? A cubic Bézier curve? A simple cubic function?
Similar to this image: it is pretty intuitive to continue/extrapolate the red curve into the dotted green curve (in off-line analysis), but how do you do that in real time?

The SWMA is calculated like this:


texts: Sampling Frequency and Spectral Regrowth

texts:
Sampling a cosine wave of 10 Hz at Fs = 64 and number of samples Ns = 256
I setup my time vector for the cosine wave as n=(0:Ns-1)*(1/Fs)

If I change the sampling frequency from 64 to 64.0005 I get imaginary spectrum coming up from the quantization noise and actually having significant amplitudes. I also get this at 65, 66, 67, etc but not at powers of 2, ie Fs=128,256...

I thought it was because the signal was truncated, but I substantially increased the number of samples (Ns) and this had little to no effect in removing the imaginary components of the cosine.

Can someone please advise what the link here is?


texts: Does MSAA make sense in audio / 1d data streams?

texts: In graphics, MSAA is a technique where  you take multiple samples of something per pixel and then average the values to get the final pixel value. The image quality improves as a result, and its considered a form of anti aliasing.  Does this technique have an equivalent in audio samples or other 1d data streams?


texts:
Is there a simple to follow explanation of how to do second order motion compensation for range migration algorithm?

The one described in Carrara et al is for the ideal case. For the Extended Omega K algorithm, how does one relate the deviation in platform position to the amount of phase compensation to apply in terms of kx?
Is it a scaling by $ 2\pi/\delta x $ where $ \delta x $ is the deviation along the azimuth, and the slant range deviation is assumed to have been compensated away via a mix of phase compensation and/or interpolation and/or pixel shifts?


texts: How do we detect presence of background noise in audio?

texts:
The problem I am facing to solve is detect background hissing or humming sound in any audio stream. The audio stream can be of any type ranging from movies to talk shows.  The background noise is mostly introduced due to issues in recording environment or process of digitization.

In Audacity tool, there is option to remove noise from audio. The process is first to manually single out region of background noise for profiling and then remove profiled noise from the whole file.

Based on this, the initial idea I have is:

Single out low level frames in audio.
Based on spectrum or some other feature, somehow find out if noise is there in low level frame. Find the profile of the low level frame.
If the profiled noise is present in other portions of file, the background noise is detected.

The exact method of steps 2 and 3 are still not clear to me and thats where I need help. Is there any other method for detecting background noise in stream?

Any pointer towards right direction would be highly appreciated.


texts:
I can see, from my apartment, a cell tower.

From what I have learned, in a time division duplex system the uplink and downlink communication are kept separate in time. Uplink from some time, then downlink, then uplink, and so on. I have also learned that during uplink all of the mobiles transmit simultaneously to the base station.

So this leads to my question:

in a TDD system, how do all of the mobiles keep track of time so that they are all in synch?

For example, from what I know, my mobile and my neighbors mobile both are transmitting to the base station during the uplink time slot, but how do they keep their timing in synch with each other?


texts:
I have found in the literature a "time-variant signal" term , but I could not understand what that's mean. I know that there is "time-variant systems", but this is the first time, which I see a time-variant signal term. Any one has an idea what this term means ?   Some suggests that this term is related to non-stationary signal, which it's spectrum changes over time. Is this right?

P.S: I have added the  EEG tag because this term, is used widely to describe the EEG signals


texts:
The situation is as follows. I am generating a white noise voltage signal with a certain power spectral density amplitude of choice, from 0 to some cutoff frequency, for example 200 MHz. This proceeds as follows: first I make my white noise in Mathematica. I use a technique in which I convolve unit white noise (with variance = 1) with a self made FIR filter based on the amplitudes I want the real noise to have. This gives me a time trace, which corresponds to the desired spectrum very well after analysing it with periodograms. I then load the time trace into an arbitrary waveform generator (AWG). The AWG then produces the pattern, and I look at it through a spectrum analyzer. This helps me verify if the noise is as desired.

Now, there are a number of difficulties in this of course, but the main one turns out to be the finite sampling rate of the AWG. The one I use produces signals at 1.2GSamples, and thus cannot be expected to produce signals at over 600 MHz (the Nyquist frequency). However, a priori this is not a big deal; my cutoff is at 200 MHz anyway. But in practice, the AWG doesn't just produce perfect noise up to 600 MHz. When producing white noise there is a downward trend in the spectral density for increasing frequencies, which is undesired.

My question, is how I can postprocess my data knowing the downward trend in the spectral density to make it more flat. Of course 100% flatness will never be achieved, but I am sure that one could somehow mitigate the decline in some way, getting it better than what it is right now. I have to my disposal a theoretical spectrum that I want, a digital time domain trace that would produce this spectrum if perfectly executed, and the analyzed spectrum realized by the AWG. Is there some way I can combine this information to achieve my goal?

To clarify what I mean, below is a plot of the measured PSD, overplotted with the PSD that was to be produced. The part after the cutoff is simply the noise floor of the spectrum analyzer, which is not a problem.

Note that the low frequency point that deviates can be ignored, this is due to the spectrum analyzer.


texts: Discrete-time sampling of filtered white noise

texts:
I am trying to understand how I can relate a discrete-time random process to a continuous-time random process sampled at discrete times.

Suppose I have a noise source $N_\tau(t)$ which is derived from unit-amplitude additive white Gaussian noise N(t) that is fed through a single-pole low pass filter $H(s) = \frac{1}{\tau s +1}$.

I understand that the power spectral density of $N_\tau(t)$ is $S_{N_\tau}(\omega) = |H(\omega)|^2 = \frac{1}{(\omega\tau)^2  +1}$. So far so good.

Now I want to sample $N_\tau(t)$ at regular intervals $T$ to obtain a signal $n_\tau[k] = N_\tau(kT)$ -- how would I figure out the standard deviation and spectral density of the discrete samples $n_\tau[k]$?


texts: Beamforming and AoA with a small number of elements

texts:
So I have an antennae array with only three elements. I want to know what kind of beamforming and AoA estimation I can do with such a small number of elements.
I understand that there are lots of different approaches, eg. MUSIC, simply TDOA, ESPIRT etc, but I don't know how well they work when the number of elements is small. I think this problem is pretty common in the industry, so I'd like to get some feedback and learn from the community's experience with this type of problem.
Given such a small number of elements, what kinds of beamforming and AoA estimation procedures would be most appropriate/accurate?

More details:

Each element has a pretty standard cardioid pattern.
Their mainlobes overlap overlap such that the sum of their responses is close to unity.


texts: Kalman Filter Estimate vs ACF Least Squares Estimate

texts:
I am currently reading Chapter 5, Applications to the Gas Markets, in Stochastic Modelling of Electricity and Related Markets by Benth, Benth and Koekebakker, World Scientific, 2008.

In the subchapter 5.3.1 Kalman filtering they assume that the detrended and deseasonalized logarithmic spot price dynamics for gas follow the process $X_1(t) + X_2(t)$ with
$$dX_i(t) = -\alpha_i X_i(t) + \sigma_i dB_i(t)$$
for $i=1,2$ with two independent Brownian motions $B_1, B_2$.

They cite Barlow, Gusev and Lai, 2004, which have shown that the confidence bands on the mean reversion estimates are quite wide. For this reason, they are proposing to use the empirical ACF to estimate the mean reversion parameters, assuming stationarity.

The stationary ACF of $X_1(t) + X_2(t)$ is given by
$$ \rho(\tau) = \hat{\omega}_1 e^{-\alpha_1 \tau} + \hat{\omega}_2 e^{-\alpha_2 \tau}$$
with the lag $\tau$ and the coefficients
$$\hat{\omega}_i = \frac{\frac{\sigma_i^2}{2\alpha_i}}{\frac{\sigma_1^2}{2\alpha_1}+\frac{\sigma_2^2}{2\alpha_2}}$$
for $i=1,2$. Using least squares they arrive at the values $\hat{\omega}_1 = 0.73$, $\hat{\omega}_2 = 0.27$, $\alpha_1 = 0.02$, $\alpha_2 = 0.28$. Using
$$\sigma_i^2 = 2\alpha_i \times \text{Var}(X_1(t)+X_2(t))$$
for $i = 1,2$ and estimating $\text{Var}(X_1(t)+X_2(t))$ to be $0.11$ they get as a starting point for the Kalman filter $\sigma_1 = 0.057$ and $\sigma_2 = 0.129$, which then yields $\hat{\sigma}_1 = 0.065$ and $\hat{\sigma}_2 = 0.573$.

How can the difference between the Kalman filter estimates $\hat{\sigma}_1$ and $\hat{\sigma}_2$  and the implicit least squares ACF values for $\sigma_1$ and $\sigma_2$ be explained? Where does it come from and why would the Kalman filter estimate be the right one in contrast to the ACF least squares estimate? In general, is the difference large?


texts: Errata Corridge in Gabor Filter Documentation and Frequency Response

texts:
I have a really simple question regarding this tutorial I found on Gabor filters.

Check the very beginning section, equations (1), (2), (3) and (4).  Is there any chance that equation (4) is missing an = and should be written as follows?

  e^jθ * s(t) = e^j(2πfot+θ) = [sin(2πfot + θ), j cos(2πfot + θ)]

          ^
          |
          |

this is the missing =

And furthermore, why is the right hand-side of the equation written with the imaginary j multiplying the cosine and not on the sine as in Euler's Formula?

Finally can anyone please help me interpret the frequency response of this filter (Sections 1.1 and 1.2)? What does it mean in terms of its frequency response that its Fourier Transform is the one of equation (8)?

Thanks in advance for your help!


texts: If we take Z-transform of a signal & find its ROC. How to use this ROC? There are ∞ signals in ROC, suppose we choose any signal what to do with it?

texts: If we take Z-transform of a signal & find its ROC. How to use this ROC? There are infinite signals in ROC, suppose we choose any signal from ROC, what to do with it?


texts: Why look at power spectral density for stochastic processes?

texts:
I have been told that for deterministic signals, it makes sense to look at their respective Fourier transforms/spectra.

For stochastic processes on the other hand, I am supposed to work with power spectral density in terms of qualitative analysis.

Why?


texts:
Suppose that $\theta_t$ is an exogenous variable with known Gaussian process. Next, suppose that for any index $i\in [0,1]$,
$$ a_{i,t} = (1-\beta)\mathbb E[\theta_t|\mathcal I_{i,t}]+\beta \mathbb E[a_t|\mathcal I_{i,t}],$$
where $a_t=\int_0^1 a_{i,t} di$, and
$$\mathcal I_{i,t} = \{\dots,\theta_{t-1}+\epsilon_{i,t-1},a_{t-2},\theta_{t}+\epsilon_{i,t},a_{t-1} \}.$$
Finally, for all $i$ and $t$, $\epsilon_{i,t} \sim \mathcal N(0,\sigma^2)$.

I am trying to find an algorithm to numerically approximate the stochastic process for $a_t$. I have tried many different ways of applying the Kalman filter to do this but none of them converge.

  Is there an algorithm that is likely (or better yet guaranteed) to converge?


texts: When deriving the power spectral density of stochastic processes, why does taking an expectation allow the $T\rightarrow\infty$ limit to be taken?

texts:
I am following the arguments presented in the paper AN-255 Power Spectra Estimation, from Texas Instruments, to learn how to derive the power spectral density for a stationary stochastic process, and do not understand one of their steps. I am looking at Page 4 only of the the document for the purposes of this question.

The derivation is done by considering only a single realisation (sample function), denoted by $x(t)$, of the stochastic process. Then they do the usual thing of only considering a truncated version of this signal $x_T(t)$, which allows the Fourier transform of it to exist, denoted by $X_T(f)$ (because one of the requirements for FT to exist is absolute integrability, which isn't satisfied for random signals).

I am confused with how they justify taking the limit $T\rightarrow\infty$ in the right hand column of page 4, shown here:

$\hskip2in$

$\hskip2in$

I understand that you cannot take the limit $T\rightarrow\infty$ directly on the truncated sample function's Fourier transform $X_T(f)$, because it is not defined in that limit (indeed, that was the reason for doing the truncation in the first place).

I also understand that $X_T(f)$ results from a single realisation only of the stochastic process, and if you were to repeat the experiment again you would obtain a different $X_T(f)$. As such, this function is actually a random variable itself (at each frequency $f$), and therefore it makes sense to do an ensemble average over many realisations, and consequently motivates taking an expectation.

What I don't understand is why the expectation solves the problem, and allows you to take the limit $T\rightarrow\infty$ after you have taken the expectation:

$\hskip2in$

What is it about the expectation of $X_T(f)$ that means the limit $T\rightarrow\infty$ can then be taken? I'm having a hard time seeing it... Could someone spell this out plainly for me?


texts: Angle harmonic distortion in FM modulation

texts:
As you know the output form of FM modulator is something like this:
$$s(t)=A_{C}\cos(2\pi F_{c}t+\beta \sin(2\pi F_{m}t))$$
where $\beta$ is the phase deviation. I want to know why in this book the write has mentioned that narrow-Band FM modulation has angle harmonic distortion?

enter link description here

Because the phase changes is related to $\theta(t)=2\pi F_{c}t+\beta \sin(2\pi F_{m}t)$ and it isn't related to $\beta$(even large or small enough)(Any harmonic distortion? No). However, In complex base-band form we can write $\theta(t)=2\pi F_{c}t+\arctan(\textrm{Quadrature-component}/\textrm{In-phase component})$ and it shows the harmonic distortion.

why do we use complex base-band form for FM phase rather than
$\theta(t)=2\pi F_{c}t+\beta \sin(2\pi F_{m}t)$?  and what does complex base-band form exactly do?
why can't we accept
    $\theta(t)=2\pi F_{c}t+\beta \sin(2\pi F_{m}t)$ as phase deviation?


texts:
Could someone please provide a method for inverting random fixed point numbers.
I have as an input both positive and negative floating point numbers that should be converted into fixed point and then be inverted.

An example could be 1/0.2453 where floating-point 0.2453 is converted into a Q18 fixed point format and then inverted to 4.07664.
Thanks a lot!!


texts: ORB Implementation, Scale Pyramid, rFAST

texts:
Reading this ("ORB: An efficient alternative to SIFT or SURF") paper, I am not certain how they use the scale pyramid.
It says it is created and FAST feature detectors are employed at every level. Then what? What do they do with these new keypoints found on each level of the pyramid?


texts: Objeckt tracking - filter training (MOSSE)

texts:
For a project I'd like to set up an easy to implement tracker. I read several papers and chose to go for the mosse (minimum output of squared error) tracker from Bolme et al.

The  formula to obtain the mosse filter is (equation 5 in the paper):

H* = sum(Gi x Fi*)/(sum(Fi x Fi*) +e)

Where Gi is the fourier transform of the desired output, a 2D gaussian shaped peak centered on the target in the training image.
Fi is the fourier transform of the training image.
x denotes elementwise multiplication.
the asterisk indicates that it is the conjugate of the fourier transform.
e = 0.1, is a regularisation parameter that induces noise for enhanced noise tolerance.

To generate training images I took the first frame and applied small affine transformations to it.

But somewhere I made a mistake. Since my filter looks nothing like the one in the paper.

mine looks like this.
on the left the input image and on the right the obtained filter.

I even checked if the transformation to the training images and the desire output are faulty. However, they look fine to me.

Unfortunately I have no background in signal processing or linear algebra.
So I would be really grateful if you could help me.

Below I added the Matlab code for my failed filter.

% get variables to store the numerator and denominator
sum_numerator = zeros(size(filter));
sum_denominator = zeros(size(filter));

for a = 1:numberOfTrainingImages
    Fi = fft2(image);
    Gi = fft2(desiredOutput);

    % sum_numerator is the correlation between input and desired output
    sum_numerator = sum_numerator+ ( Gi .* conj(Fi));

    % sum_denominator is the energy spectrum of the input
    sum_denominator = sum_denominator + ( Fi .* conj(Fi));

    % Generate a training image and a according desired output
    [image, desiredOutput] = generateTrainingImage (OriginalImage);
end

% elementwise division to get the filter
H = sum_numerator ./ sum_denominator;


texts: Which Transformation, Or Similarity Metric, Is Rotation, Shift and Scale Invariant?

texts:
I have an algorithm to to detect copy-move forgeries in images. I used block matching to detect regions of an image that were forged with copy-move forgery and highlighted the alleged areas. For block matching, I took the DCT of each block and normalized with an extended 16x16 quantization matrix.

The problem:

this approach does not work if the copied region is rotated or scaled.

My question:

What transformation/similarity metric would be invariant to rotations, shifts, and scaling? (Alternatively, is there another method available for solving this problem?)
Additional points if the method is already available in MATLAB.

Thanks for the help.

The code for this project is available here: copy-move forgery detection.

Edit: I am aware of the Radial Gradient Transform, but I don't think it is invariant to all three.


texts: Why do the OFDM training (and payload) symbols have silent sub-carriers (aka virtual carriers)?

texts:
I am examining an OFDM signal.

Training symbol:

The first two OFDM symbols are training symbols, they are 2PSK modulated (within the subcarriers).
In the first OFDM symbol the $(0+18N)^{\rm th}$ subcarriers are silent ($N$ is integer).
In the second OFDM symbol the $(9+18N)^{\rm th}$ subcarriers are silent.

Payload:

In the first payload symbol, i.e. in the $3^{\rm rd}$ OFDM symbol, the $(6 + 18N)^{\rm th}$ subcarriers are silent.
In the second payload symbol, i.e. in the $4^{\rm th}$ OFDM symbol, the $(6 +9 + 18N)^{\rm th}$ subcarriers are silent.
In the third payload symbol, i.e. in the $5^{\rm th}$ OFDM symbol, the $(3 + 18N)^{\rm th}$ subcarriers are silent.
In the $4^{\rm th}$ payload symbol, i.e. in the $6^{\rm th}$ OFDM symbol, the $(3 +9 + 18N)^{\rm th}$ subcarriers are silent.
The payload symbols are QPSK modulated.

Then this pattern seems to repeat.

Pattern:

So to summarise, the offsets are : $0, 9, 6, 6 + 9, 3, 3 + 9, 0, 9, \ldots$

Questions:

How does this make sense ?
What purpose does such a unique silencing of subcarriers serve ?
I suspect it has to do with equalizations , but why is silencing useful ?
And why this odd way of silencing the subcarriers ?
Is this (way of silencing subcarriers) somehow connected to the Schmidl and Cox method ?

EDIT: Google gives this on "OFDM silent subcarriers"

EDIT2: The signal has been emitted by a MIMO system.

EDIT3: This is the Google search for "OFDM virtual carriers".

EDIT4: This is a 1024 carrier OFDM signal.


texts: ADC noise can affect the overall noise performance of a receiver. The noise is partially quantization noise and partially thermal noise and as a general rule it extends up to the Nyquist frequency = Fs/2 . A simplification or assumption in receiver overall noise performance is to consider the noise spectrum to be flat or white. Are there any general rules or situations in terms of sampling rate (or anything else) that make this assumption grossly wrong?


texts: Delay filters in Python using for loop and $\tt lfilter$

texts:
I have these two filters as given in recursive form:
\begin{align}
y_1[i] &= y[i] - y[i-d] + 1.2y_1[i-d] - 0.8y_1[i-2d]\\
y_2[i] &= y[i] - 2y[i-d] + y[i-2d]
\end{align}

where $d$ is an integer for setting the delay. I wanted to have a look and see how such filters change input signals depending on the value of $d$, but I faced the problem with implementing the actual filters in Python: I tried iterations and scipy.signal.lfilter, and each method was giving me different results. Let me show you the code:

import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import lfilter
# The test signal is just a sine of the length l, constant amplitude of 1
# and varying frequency w
l = 1024
x = np.array(range(l))
w = x/l
y = np.sin(w*x)
d = 4

# Let's caclulate the signals filtered with IIR filter
## First using forward iteration
y11 = y.copy()
for i in range(2*d, l):
    y11[i] = y[i] - y[i-d] + 1.2*y11[i-d] - 0.8*y11[i-2*d]
## Second using backward iteration
y12 = y.copy()
for i in reversed(range(2*d, l)):
    y12[i] = y[i] - y[i-d] + 1.2*y12[i-d] - 0.8*y12[i-2*d]
## Third using lfilter
y13 = lfilter([1, 0, 0, 0, 1], [1, 0, 0, 0, -1.2, 0, 0, 0, 0.8], y)

# Let's caclulate the signals filtered with FIR filter
## First using forward iteration
y21 = y.copy()
for i in range(2*d, l):
    y21[i] = y[i] - 2*y[i-d] + y[i-2*d]
## Second using backward iteration
y22 = y.copy()
for i in reversed(range(2*d, l)):
    y22[i] = y[i] - 2*y[i-d] + y[i-2*d]
## Third using lfilter
y23 = lfilter([1, 0, 0, 0, 2, 0, 0, 0, -1], [1], y)

# Let's start the figure and plot the signal in the top row, then the filtered
# signals below it
fig = plt.figure()
ax1 = plt.subplot(421)
plt.title('Test signal')
plt.plot(x, y)
ax2 = plt.subplot(422)
plt.title('Test signal')
plt.plot(x, y)

# The left column is for the IIR-filtered signals
plt.subplot(423, sharex=ax1)
plt.title('Forward iter.')
plt.plot(x, y11)
plt.subplot(425, sharex=ax1)
plt.title('Backward iter.')
plt.plot(x, y12)
plt.subplot(427, sharex=ax1)
plt.title('lfilter')
plt.plot(x, y13)

# The right column is for the FIR-filtered signals
plt.subplot(424, sharex=ax2)
plt.title('Forward iter.')
plt.plot(x, y21)
plt.subplot(426, sharex=ax2)
plt.title('Backward iter.')
plt.plot(x, y22)
plt.subplot(428, sharex=ax2)
plt.title('lfilter')
plt.plot(x, y23)

plt.tight_layout()
plt.show()

And here's the resulting figure:

Judging by the look of the plots in rows 2 to 4 one can see that each calculation produced different results except the 2nd and 3rd plot in the right column where backward and forward iteration worked out similarly. Normally I would rely on the results from Scipy's lfilter, but there I'm not sure if I specified the coefficients correctly. Somebody please take look and point out the mistakes.


texts: What Do Skewness and Kurtosis Represent?

texts:
I understand that the question could mean a lot of things but I am thinking specifically to image processing. For example, I know that the mean can be a basic texture feature that represents the average pixel value of the image. That is, it is useful for determining an image background. Then I know that the standard deviation can be an indicator of how spread is the histogram and is useful for indicating what other pixel values also belong to the background.

In similar terms to this, what do Kurtosis and Skewness represent? I have read about them in various posts but I can't find anything related to what they represent in terms of what I have explained above.

I am not sure if I have came to the right place but if I haven't feel free to point me in the right direction.


texts: Highest frequency component in 2D Fourier transform

texts:
I was trying to understand the 2d dft(discrete Fourier transform) and discrete spatial Fourier transform (dsft) of images.
But while understanding the graph i didn't understand that how come ($\pi,\pi$) is high frequency component and
not ($2\pi,2\pi$) is the highest frequency component.


texts: I am working with Gabor filter with level set method here. As you known, gabor filter gave many filter output. Some of them is not necessary. Could you suggest to me some method that can choose best filter ouput that satisfy maximum the difference between object (zebra) and background that are separated by a contour (white circle)as figure. Thank you. Now, I am working in image segmentation, hence, these best filter outputs will give more accuracy


texts: Non Local Means Filtering Technique Compared to Gaussian Blur and Total Variation Denoising

texts:
How does the Non Local Means Filter different from other approaches such as:

Gaussian Smoothing.
Total Variation Denoising.


texts: How to turn Morlet wavelet into second generation wavelet?

texts:
I have a very specific application which requires to use the complex Morlet wavelet (or Gabor wavelet, if that's the name you use). I currently use the convolution theorem to compute wavelets transforms, but I'm reading everywhere that direct wavelet transforms are more computer efficient, because of the lifting scheme.

On the other hand, I searched for lifting scheme, and it's so much of a different paradigm that I have no idea how to use it with my wavelet, or whether it's even possible.

My question is: is it possible to use the lifting scheme with the Morlet wavelet in 1D and 2D? If so, can you recommend some litterature explaining the algorithm?


texts:
I am trying to upsample a video by existing frame interpolation techniques. In the process, I realize that I also need to interpolate the audio signal for the new frames so that the audio signal is in sync with the frames of the new video.

The new upsampled video should have the same frame rate as the original input video, and will be a slowed down version of the input video.

Is there any way I can proceed to do the part of the audio interpolation?
If the frame rate is F and the audio sampling rate is Fs, then Fs/F audio samples are associated with each frame of the original video.

Any insight on how to proceed regarding this idea would be helpful.


texts:
A very naive question... A signal with bandwidth of 20 MHz is modulated using a carrier of 1 GHz. What will be the sampling frequency?
I was asked this question during an interview. I answered 2 GHz but the interviewer said it will be 40 MHz. Can anyone explain it?
Thanks.


texts: Optimising an input signal for a system to minimise distortion of output signal

texts:
I have a discrete time-series signal which I am able to process before passing it through a system which distorts said signal. This system cannot be altered and is non-linear, but a signal can be passed through as many times as is needed (for iterative optimisation algorithms, for example). I would like to optimise the signal so that the output of the system is as similar to the original input signal as possible.

I'm currently unclear on exactly what problem I'm trying to solve is and would appreciate advice on potential approaches? I understand the concept of system identification, which gives me insight into what the system is doing, but am unsure how to apply this to the signal to try and counter these effects.


texts: Designing the filtering for a time domain data acquisition application

texts:
I want to filter sensor signals for a data acquisition application on an ATmega microcontroller. The interesting parts of the signal are in the range 0-5Hz, and I'd like to leave these mostly unchanged, but strongly attenuate 50Hz power line hum and anything above that.

The signal will later be evaluated in the time domain, especially the time and amplitude of large peaks (typically lasting well over a second), and the area under those peaks.

Since the signal is generated by a different device with its own power supply, I expect to see some power supply hum as well as general noise.

In order to minimize hardware components I plan to use a simple RC filter (-3dB at 18Hz) for antialiasing, combined with a fairly high sample rate (> 1kHz), and then apply digital filtering. The signal will then be sent on to a PC at a much lower sampling rate (probably <10Hz). However, I'm not very experienced with filtering, so I'm a bit overwhelmed with the choices available.

Given the fast sampling rate and very limited CPU power, filters that require many floating point operations would at best be a good deal of work to implement. I played around with filter design tools a bit and looked at the properties of Butterworth and Bessel filters or just chaining several first-order filters in a row (since they can be implemented very efficiently), and finally found an interesting section about the humble "moving average" filter on dspguide.com.

After playing around in Octave a bit, it seems to me that by chaining four moving average filters, two with 1/50s and two with 1/60s window, would give me

around 0.5dB attenuation at 5Hz, the outer limit of what might still be interesting signal
over 100dB attenuation at both 50Hz and 60Hz, even if the frequency is 1% off
over 80dB attenuation for anything above 100Hz
linear phase shift in the signal band, for a fixed delay of <40ms

This looks very promising, but since I only started playing with all of this very recently, I'm not completely sure my results are valid. Is this a good filter for my task, or would you recommend something else?

There might also still be noise left in the range of 5Hz to 50Hz which would cause aliasing when the signal is sampled at 10Hz by the PC. Then again, I don't expect to see much noise in that range and don't want to needlessly distort the signal. Should I just send the latest sample, or perhaps take the average of all samples between two "PC sample points"? What would you recommend?

Edit to address Oscar's questions:

I don't think there will be much signal above 5Hz and the SNR should be pretty good without any filtering already, but I'll try recording some examples soon. Different environments and different source equipment for the signal could also look quite different, though.

At the moment, a different device that we use for the same purpose samples the input at only 2Hz without extra filtering after the A/D, but the A/D module in that device seems to filter quite a bit already. Trying to get the requirements, I got the "at most 5Hz" figure from a colleague (though I'm not even sure if he meant samplerate or nyquist frequency), so I adjusted the sample rate up in order to remain consistent.

I'll probably have to handle four channels sampled at 12 bits, and the filtering is the only CPU-intensive task the controller has to perform. The number of cycles per sample is a tradeoff against sample rate (ammount of aliasing) and code maintainability (perform calculations while communicating with the ADC?), but I think 400 cycles would be a pretty good result.

I can't push the full sample rate to the PC, but 100-200sps per channel should be ok.


texts:
Suppose I want to encrypt the voice data before sending using a ham radio, for example this unit.

Assume the encryption is simply AES encryption/decryption using predefined fixed key.

I am thinking of the following implementation:

1) Between the radio's transmitter/receiver and its logic unit, I'll place my circuit.
2) Low pass filter the signal then ADC it (with 10-bit accuracy, but this is irrelevant) with sampling frequency identical to that used by the radio. Ideally, this rate will already be higher than the max. freq. so as to avoid aliasing.
3) Apply the AES algorithm to each 128-bit segment of data.
4) DAC.

Going forward, I would implement some digital signature methods, thus signing the hash of the data, every 100 128-bit segment (or any other number). This will add 512-bit of data every 100*128 bits.

My question: 1) Is there any comment on the implementation, from a signal processing / communication point of view? 2) The added 512-bit signature will decrease the bit rate by (12800-512)/12800 => 4.16%. Is this a problem?


texts: historical context of impulse response-convolution

texts:
Hi All: I have zero background on the history of LTI systems so I was wondering when the concept of LTI and the fact that an LTI signal can be be completely described by its impulse response came about. I ask because, in econometrics, there are models called auto-regressive distributed lags (ARDLs). A specific ARDL called the koyck distributed lag came out in the early 1950's and was a pretty big deal in the econometrics community.

https://www.reed.edu/economics/parker/312/tschapters/S13_Ch_3.pdf
( koyck is on page 12 ).

But, now that I understand LTI, impulse response and convolution, my guess is that the explanation and theory behind the Koyck ADl could have been much more easily explained and understood using the LTI framework ( by using the impulse response and convolution). Yet, as far as I am aware, an explanation of the Koyck distributed lag using this approach does not exist. That's very odd to me since the LTI framework makes the understanding of the Koyck ADL so much clearer and easier to understand. Thanks for any historical context of the LTI concept.  If  it's after the 1950's, then it's understandable that Koyck didn't know about it yet. If it was well known before the 1950's, then my guess is that he was unaware of it. Otherwise, he would have explained his Koyck model using that approach.


texts: DSP with 8+ inputs for simple beamforming

texts:
Does anyone know of a DSP that is cheap and has 8+ inputs (8 I2s mics) and that can perform beam forming calculations? I'm super new to circuit design so preferably one thats beginner friendly.

Thanks

edit: We are students who were kind of thrown onto this project for a class with little prior experience and one of the requirements is more than 8 microphones.

Details on our actual school project:
This is a sponsored senior design project, where a professor and one of his PhD students asked us to build a large (8+) microphone array that can be worn on a person's body. This array would collect data and store it in some data storage device that our sponsors can later access and run algorithms on. How we accomplish this was left open. The larger the array the better, our budget is unknown but likely $100-200 range.

For our class we have to add additional requirements so we decided to attempt to use the data collected and run a beamforming algorithm on it to amplify noise in a particular direction relative to the person wearing the device. Essentially our demo would be someone wearing the device and pointing it at different sound sources and hearing the amplified audio through headphones.

Essentially for the class we need to demo the device well but also build the device in such a way that our sponsors could use it for their own purposes after the class is over.

We all have some 300 level DSP knowledge but it is all "textbook" knowledge and no hands-on hardware knowledge so we are attempting to learn it as we go.

So far we have a microphone picked out here (ofc this can be changed) and are attempting to determine what DSP to use so that we can play additional parts of the device such as how we are going to transfer data to the headphones and data storage. It is also important to have some hardware component in the project which is why Arduinos and Raspberry Pi's are discouraged generally.


texts:
I am trying to understand whether to use the indirect method(with Parzen as our window) or the direct method to better estimate the bispectrum of X(k).

I get the following plot for the indirect method with Parzen window.

I get the following plot for the direct method.
Any ideas of which estimation method gives us the better results(better estimation)?


texts: How does BER performance depend on gray or natural binary?

texts: I read that BER performance would be improved if Gray code is used in 16 QAM rather than natural binary coding.  I think that it should not depend on the coding used.  16 QAM simply assigns to each of the 16 combinations of 4 bits, one particular sinusoidal signal with fixed frequency but different amplitude and phase.  When this is transmitted and detected properly at the receiver we can get the 4 bit group transmitted.  The error depends on the detection capability and the noise in the system.  Any arbitrary assignment between the signals and the group of 4 bits should give the same BER as long as the detection performance is the same.  Where am I going wrong?


texts: Why is the continuous time Fourier series of DC signal an impulse?

texts: In case of continuous time Fourier transform(CTFT), I can easily calculate the Fourier transform of DC signal by using Fourier duality or inverse CTFT. But I don't know how to calculate the continuous time Fourier series(CTFS) of DC signal. Some people say "One point in the frequency domain which includes the energy of all time should be an impulse." and many textbook says "the CTFS of DC signal is an impulse." But I think the inverse CTFS of an impulse is not DC signal by my calculation. I think I should consider a periodic function that converges to DC, calculate it's fourier series and then take the limit. But all my attempts failed. Who knows correct solution to this problem?


texts: Convolution - Massive spike in noise section

texts:
I am computing the correlation with MATLAB using the convolution fonction with a signal flipped before feeded into the function. Here are the results.

The first plot is the actual signal, the second one is the signal I am trying to find in the first signal and the third one is the convolution results. On the first plot, we can see at $n=3000$ and more  that the signal we are searching for is there and it is confirm by the spike in the third plot at $n = 3370$. However, there is massive spike in the beginning of the convolution (plot #3/ $n < 3000$) even if the beginning of the first signal is noise (plot #1/ $n < 3000$) . Why is there such spike in the convolution plot.


texts: Fast Fourrier Transform of real measurements in Matlab

texts:
I am trying to perform the fast fourrier transform to non uniformly sampled data . The output is in the following image

It was obtained using the following code in MATLAB

%% x is the sampled signal
%% t is the sampling instances
L=size(x,1);
t_new = linspace(t(1),t(end),L);

% Performing interpolation to obtain a uniformly sampled signal
x_new_cubic = interp1(t,x,t_new,'cubic');
x_new_pchip =interp1(t,x,t_new,'pchip');
x_new_spline = interp1(t,x,t_new,'spline');

NFFT = 2^nextpow2(L);
X = fft(x_new_cubic,NFFT)/L;
F=1000*linspace(0,1,NFFT/2+1);

figure;

subplot(121);
plot(F,20*log10(abs(X(1:NFFT/2+1))));
xlabel('Frequency[Hz]');
ylabel('|X|[dB]');
w =  hamming(L,'periodic');
x_win = w.*x_new_cubic(1:L)';
X_win = fft(x_win,NFFT)/L;

subplot(122);
plot(F,20*log10(abs(X_win(1:NFFT/2+1))));
xlabel('Frequency[Hz]');
ylabel('|X|[dB]');
title('Hamming Window')

It seems that I can't trust such result, but I am not sure too. Can any one give me some advice?


texts:
White, pink, brown...? In general, to what category does it subscribe the spectrum of city noises, like traffic noise, ambulance/police siren, alarms, etc, put together?

If the question is too broad, then, what is the color for particular noises, like traffic?


texts: Enlarging a picture by adding pixels in matlab

texts: I was wondering is there a way(some code or functions) to convert an image with specific number of pixels into a picture with more pixels in matlab(enlarging the size or the number of the picture)?


texts: Microphone Array null steering unexpected results after IFFT

texts:
I am writing an open source microphone array simulation program:SharpEar.
When I give uniform weight to microphone array elements, the result in the angle is a sinc function as expected. There are 41 elements in array, all equally weighted. Room is  20*20 meters.

Red point in the picture below is a 1000Hz sin wave.  The black areas are filtered by the result of beamforming.

Now I am trying to achive null steering. What I understand from null steering with my computer science brain is: Microphone array will work as a spatial filter.  Fft of the weights of the array will be reflected in angle. That is why result of the uniform weighted microphone array is like the picture above. Now lets say I know there is a noice in -30 degree and the sound that I want to focus is at 0 degree(Angle considered to middle of microphone array red point was at around 0 degree ). And array interests in 90 degrees from -45 to 45. Because I don't want to get anything I am adding a null at -30 degree. And I am having a data like:

0.5, 0.5 , ... , 0 , 0 , 0 , 0.5 ....1, 1, 1, 0.5, 0.5 , 0.5 ...
|                    |                  |
-45              -30 degrees         0 degrees

I believe if I take the inverse fft of the data above and use as weights in my microphone array. I should achive a better focussing in angle domain. But my results are terrible.

I want to ask if my understanding of null steering is correct or am I missing anything?

Ps: Please forgive my lacking descriptions since DSP is not my profession, I am network programmer and trying to run this project in my free time.


texts: Why does White Noise in images imply noise in adjacent pixels are independent?

texts:
My professor said in the class that for "Additive White noise, the noise in pixels adjacent to each other are independent". How?

This is what I have got so far: White noise implies that PSD (Power Spectral Density) is flat which implies Covariance matrix is an impulse function i.e.

$$\begin{bmatrix} 1 & 0 & 0 & \cdots & 0 \\ 0 & 0 & 0 & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & 0\end{bmatrix}$$

How does this imply that noise at adjacent pixels is independent? At max, this says that noise is uncorrelated.

This question asks the same thing, though that part of the question is unanswered.


texts: Does the inverse-CTFT exist for a dirac delta?

texts: Does the inverse continuous time Fourier transform exist for a Dirac delta (A single causal/non-causal spike)?


texts:
I want to write code in matlab to find a characteristic scale of an image patch.
I have an image patch X, I need to maximize function F(X,sigma) so that sigma is the characteristic sigma.

For my experiments, F can be the laplacian of the image, sigma is the "power" of a gaussian filter on the image. F(x,sigma) should return for each x (image patch) its response over scales of increasing sigmas (i.e. a discrete value for each X and sigma).
My questions are:

The laplacian is obtained by convolving laplacian kernel with the image, where
does the sigma takes place ? (is it by smoothing the image before (the laplace) with G(sigma)?)
How can I define F(X,sigma) to return discrete value (X is nXm), ? i.e. what does this function do exactly.

Dima and Jean, Thank you for answers, the reason I'm asking this question is because I need to do something similar on 3D data (probably/maybe with some other normalized derivatives), and I first want to see how it works with 2D data (i.e. image).
I understand now what I need to do for constructing the scale space, there is still one thing I'm not sure of and it is finding the local maxima over F. For each image (x,y) and σ - F is actually the derivative of the image. What does is mean local maxima of F over x,y and σ ? look for local maxima(s) at each scale ? there are several local maxima at each scale, are these local maxima correspond (in position) over all scales? if so, I understand that for each such position I need to find the σ that gives best maxima over all scales..
Is this is what you meant guys ?
I'm sorry if I'm going to much into details, I just want to make sure I completely understand,
THANK YOU !


texts:
I am analyzing sounds of daily activities recorded by a smartphone. For example walking, getting up from bed, falling, running etc.. (one at the time).
Let’s take one them. My goal is to

convert from time domain to frequency domain and then
divide it in bins of 10 Hz wide
calculate the average FT magnitude in each of these bins.

Questions:

When I use fft Matlab function, Do I have to choose NFFT>N and power of 2 (Y = fft(signal,NFFT)/N;), or can I just use Y = fft(signal); ?
In my case, is signal = detrend(signal); necessary before doing FFT?
In order to have 10 Hz wide bins, using 4096 Hamming Window is the way to do so?
Do my plots need further processing in order to achieve my goal?

[signal,fs]=audioread(filename); % fs = 44100
N = length(signal); % N = 94144

%% Amplitude Spectrum

Y = fft(signal);
Y_mag = abs(Y);
Fbins = ((0: 1/N: 1-1/N)*fs).';
figure;
subplot(4,1,1);
plot(Fbins,Y_mag);
title('FFT MAGNITUTUDE REPONSE');
xlabel('FREQUENCY (HERTZ)');
ylabel('MAGNITUTDE');

%% Single-Sided Amplitude Spectrum
NFFT = 2^nextpow2(N);
Y_NFFT = fft(signal,NFFT)/N;
f_NFFT = fs/2*linspace(0,1,NFFT/2+1);
subplot(4,1,2);
plot(f_NFFT,2*abs(Y_NFFT(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')

%% Pwelch defaut values
subplot(4,1,3);
pwelch(signal,[],[],[],fs);
title(sprintf('Pwelch defaut values'));

%% Pwelch Hamming Window 4096
len = 4096; % different sizes of Hamming Window
subplot(4,1,4);
pwelch(signal,len,[],len,fs);
    title(sprintf('Pwelch Hamming Window Size :: %d',len));

Thank you very much


texts: How do you reduce $H\left(e^{j\frac{\pi}{2}}\right)$ further according to a textbook solution

texts:
I want to know how I could get from the first line to the second. I've been trying to figure it out for a while with no luck. Thank you in advance!
\begin{align}
H\left(e^{j0.5\pi}\right) &= \frac{1 - e^{-j0.5\pi}}{1 - 0.25e^{-j\pi}}\\
&=1.13e^{j\frac{\pi}{4}}
\end{align}


texts: How to recover complex values (downconvert) from FM modulation (composite signal)?

texts:
How does one recover the complex IQ data from the output of a FM modulator.  I have combined my signals correctly and performed FM modulation on them, now I'm looking for a way to find the IQ values that correspond to each sample output of the FM modulator?

I am writing a modulator for my signal to test the performance of my demodulator and my demodulator depends on complex samples it would receive from a radio.

In other words, how do I perform the down conversion that happens within a tuned radio to produce IQ data?


texts: How many different filters are needed for in an iterated filter bank?

texts:
I'm trying to implement an iterated filter bank as described in the Subband coding chapter of the Really Friendly Guide to Wavelets. However, the text seems to suggest that

  The advantage of this scheme is that we have to design only two filters, the disadvantage is that the signal spectrum coverage is fixed.

My understanding of filter design is that their frequency response is relative to the Nyquist frequency (so the sampling frequency too), so if I design a lowpass filter that halves the spectrum, simply applying it again will just increase the effective order of the filter.

So did the text perhaps leave out a decimation step? I could imagine that this would work if I decimated the lowpassed signal with a factor of 2 and then applied it again.

However, I don't want to perform decimation in my application (something like wavelet analysis, but just with IIR filters), so my present understanding is that I'll have to design $n$ filters to get such $2^n$ subbands.

Preferably, I'd like to implement it in Python using the scipy.signal module. It will be applied to discrete signals with a constant sampling frequency.

Edit: As discussed in this answer to a related question, it seems I can create the highpass signal by subtracting the lowpass signal from the original, because I'm using forward-backwards application (Python function scipy.signal.filtfilt) that results in zero phase delay.


texts:
With a DFT lets say I had a signal occupying 0Hz to 2048Hz and i am using 2048 bins.

Can a DFT by design (say FFTW) only calculate the responses in a Sub Band like 768Hz to 1280Hz or -64Hz to -256Hz with the same number of bins?

To put in a context im using FFTW for a project.


texts: Efficient parallelized polyphase decimation FIR filter

texts:
I am struggling to derive a parallelized polyphase decimation FIR filter structure. I wonder if anyone can point me to some references?
Normally a polyphase decimation FIR filter's decimation factor (denoted $M$) equal to number of decomposed shorter filters (denoted $K$). When $K=M$ the solution is a typical polyphase FIR decimator. But in my case, I wish to do a efficient parallelized polyphase structure, and $K > M$ .


texts:
This question follows from an answer to this other question: Conceptual question on FFT and chirp signal

I wrote a code starting from the spectrogram to compare it with the FFT result.

% Chirp generation
t = [0 0.5 1.0 1.5 2.0]; % time breakpoints
f = [0 200 100 150 300];  % instantaneous frequency breakpoints
p = polyfit(t,f,4);
dt = 0.001;
t = 0:dt:2;
y = chirp(t,p);
L = length(y);

% FFT
NFFT = 2^nextpow2(L);
Y = fft(y,NFFT)/L;
Fs = 1/dt;
f_plot = Fs/2*linspace(0,1,NFFT/2+1);

% Spectrogram
figure()
specgram(y,128,Fs,128,120); % 2D time-freqency display

[S,F,T,P]=spectrogram(y,128,120,128,1E3);
figure()
surf(T,F,10*log10(P),'edgecolor','none')
axis tight

This is what I obtain.

My qyestion is: shouldn't the spectrogram and the FFT have the same amplitude variation? Whereas the spectrogram does not seem to have amplitude variation (the red line is red at the same way everywhere).

Second question, why in the FFT I have high peaks at $100$ and $200 Hz$ only?


texts: Why is a wavelet transform implemented as a filter bank?

texts:
The mother wavelet function $\psi(t)$ must satisfy the following:

$$\int\limits_{-\infty}^{+\infty}  \frac{|\psi(\omega)|^2}{\omega} d \omega < +\infty,$$
$$\psi ( \omega ) \bigg|_{ \omega =0} =0,$$
and
$$ \int\limits_{-\infty}^{+\infty}  \psi(t) \ dt = 0$$

To serve as the wavelet basis for wavelet transform
$$ \gamma (s, \tau ) = \int\limits_{-\infty}^{+\infty} f(t) \ \psi_{s, \tau }(t) \ dt$$

where $ \psi_{s, \tau }(t) \triangleq \psi\left( \frac{t-\tau}{s} \right)$.

While I understand that the wavelet must be an oscillatory function having no frequency component at $\omega=0$ and effectively have a band pass filter like spectrum, from the equation of wavelet series or wavelet transform can you tell me why is it that the wavelet transform is implemented as a filter bank? What is the intuition behind it? What makes it possible?

I am asking this question since the fact that practically the DWT is implemented as a filter bank means that it is not a DWT anymore, it is just a set of low pass and high pass filters. It is mind bogling.


texts:
I am searching for a software that will translate speech to text but if it does not recognise a word, it will simply write a close resemblance to a word only misspelled, for example, if I say the word house, but it does not recognise house, it will write something like hause but not a different word all together. I considered perhaps trying to match spoken words to a dictionary of a different language (i.e, using a French dictionary when saying words in English) however, it will only write the closest words it finds in French which does not benefit me.

Thanks in advance.


texts: eigen values and eigen vectors of signal

texts: What does the Eigen values and Eigen vector of a signal or function represent? What is its physical significance? I know about basis vectors of a signal which constitute the orthogonal planes where signal projections are represented. Are basis vectors and Eigen vectors same thing? Can we reconstruct signal using these Eigen vectors?


texts: Multi-Stage digital FIR filter vs Single stage FIR filter. Which is better?

texts: Can anyone provide an insight to select a filter structure out of multi-stage and single stage FIR filter?(it will be great help if references are also provided) Let's say I have to make 50 tap filter. So, is it better to design it using two cascaded filters each with 25 tap then 50 tap single filter only or both are same ? Thank you.


texts:
Which window has better performance for higher order filtering?

A. Rectangular window
B. Hamming window
C. Kaiser Window
D. Hann Window

Can anyone please answer this with explanation.


texts:
I am trying to understand one simple thing in wavelets and I searched a lot, but did not get any idea.

I need to perform Multilevel 1-D wavelet decomposition on my signal. I have arrays

signal[] and time[]

( time[x] corresponds to the time at which signal[x] occurs ) . After I perform

wavedec(signal,level=1,'wname'))

I need to plot cA1 vs the time signal. But how do I know which time points should I select. If i change the 'wname' , I get different length cA1.

For example, for a signal of length 9285, when I do

[cA1,cD1]=pywt.wavedec(signal,db1, level=1,mode=pywt.MODES.zpd)
length of cA1=4643

[cA1,cD1]=pywt.wavedec(signal,db2, level=1,mode=pywt.MODES.zpd)
length of cA1 = 4644

How can we determine the variation of cA1 and how can we select the corresponding time. I use pywavelet


texts: Determine the type of filter from the transfer function

texts:
i got that system $x_n \to x_n-x_{n-1}$, so $h_n=[.....,0,1,-1,0,...]$, with $h_0=1$ and $h_1=-1$, so the transfer function given by:

$$\sum_{i=-\infty}^{\infty} h_ne^{-jwn} = h_0e^{-jw(0)}+h_1e^{-jw(1)}=1-e^{-jw}$$. How to knwo the type of filter, if it is HPF, LPF, etc.

I appreciate your help.


texts: What is the difference between a'mixer' and a ' multiplier' used in modulation process?

texts: I am not sure if it is valid to conclude that a mixer produces a difference/sum of frequencies at output ,while multiplier produces multiples of frequency at its output. I am keen to know how far I have got it right. Is there something else that I should know? please post with simple e.g.


texts: In FMCW RADAR, how to use signal difference to calculate the position of a new object entered a clutter

texts:
Radar setup:
FMCW radar with 1 TX and 2 RX both have IQ channel. So a single (stationary) object's range and angle can be calculated.
Problem:
If two objects are at about same distance but different angle, looking at the snapshot spectrum alone, we cannot differentiate these two objects. It will looks like one object at certain angle (as a combine effect of 2 objects)
Potential solution:
If we have a signal snapshot of the scene (containing many objects) at time A, and then another signal snapshot at time B, and we assume there is only one object entered the scene that caused signal changes. Can we use the change of signal to compute the exact location of the new object entered the scene? (even if the new object's location is about the same range of some existing objects). The new object's range and angle would need some calculation:
$\displaystyle a\sin(x+\theta _{a})-b\sin(x+\theta _{b})=c\sin(x+\varphi )$
where new object signal's amplitude c and phase φ would be:
$\displaystyle c=\sqrt{a^{2}+b^{2}-2ab\cos \left(\theta _{a}-\theta _{b}\right)}$
$\displaystyle \varphi =\arctan({\frac {a\sin \theta _{a}-b\sin \theta _{b}}{a\cos \theta _{a}-b\cos \theta _{b}})}$
And then finally, new object's angle will be calculated using phase difference between two RX channels.
Also if an object that was part of the clutter leaves the scene, we can see a change in spectrum and calculate its previous location. (Just switch the snapshot, the problem is rephrased as object enter the scene)
Question:
Is this a well solved problem? Any paper or source code for reference? (I googled, but haven't found anything, maybe I am not using the right keywords as I am new to the field and knows nothing.)


texts:
I am reading the paper Adversarial Attacks Against Automatic Speech
Recognition Systems via Psychoacoustic Hiding here. In Section III-F, they explained how they keep perturbation below the masking threshold.(means every time they modified the wav they kept the extra changes made in the wav below the threshold)

I am not able to understand how the author did this? Any insights appreciated.


texts: Trouble understanding an article about MFCC

texts:
I'm willing to apply the same audio preparation that this article page 3.

However, I don't understand the final part :

The final 28-D output feature vector consists of the 13-D vector output from the DCT plus
the log mean energy to account for volume, and their first temporal
derivatives

Can someone tell me what's exactly in this final vector and why did the authors chose to use such a method ?


texts: What is Label Refinement in the Context of Image Segmentation

texts:
I have been reading the paper entitled Measures of Similarity by Unnikrishnan and Herbet, in which they discuss some metrics to evaluate image segmentation. They use the word refinement of labels/segmentations/images in different places. However, it is unclear to me what this means, and an online search for "image refinement" does not bring much enlightenment.
I hope someone can elaborate a bit on the meaning of refinement in the context of images, or more specifically if possible, in the context of image segmentation.
Thank you in advance!


texts: What Information does the phase of a cross power spectra give me?

texts:
I obtain the cross power spectra by the following steps:

compute the FFT of signal A and B
Multiply A with the conjugate of B store it in C (cross power spectra)
Now looking at the Phase of this cross power spectra C, what all information can I deduce about the two signals A and B?


texts:
My audio DSP algorithm processes input sound file (45 seconds, 16 kHz, mono). After simulation is done, gprof profiler tells me:

Cycles: total = 6846310893.

My target DSP processor is 600 MHz and executes 1 instruction per cycle, meaning it is 600 "MIPS" (millions of instructions per second).

How much will this algorithm (runnig real-time) take out of those 600 MIPS?
Can this at all be calculated using above data?


texts: How to use deconv() instead of roots() on MATLAB to find roots to a polynomial

texts:
I recently read that for polynomials of degree 5 or more, when executed with the roots() command on MATLAB produces an error. The documentation said as follows:

As a substitute, using the deconv() in-built function was recommended. How do we find accurate roots to a polynomial using deconv()? I can't seem to figure it out


texts: Is it necessary that cross power spectrum (CPSD) should always be between power spectrum (PSD) of individual signals, irrespective of the method we compute it? The images are shown below.


texts: Intuition behind cost aggregation functions in stereo correspondence problem?

texts:
I don't seem to understand the concept of a cost aggregation function like a Fixed window or an Adaptive window, etc. Why do we need this additional step, and why can't we just calculate the disparity map using WTA optimization right after finding the matching cost function?
Also, when we use a simple cost aggregation like Fixed support region, what exactly are we doing?


texts: non-standard error function for adaptive filter

texts:
I want to create an adaptive filter. Its coefficients have this general shape:

When the input signal for the filter is a sine wave, the filter behaves the desired way if the look-back window is set to a length equal to 1/4th the period of the sine wave. I can somehow understand why this is so because a sinusoid is essentially 4 times the same piece of data, flipped and mirrored: this becomes obvious if you split it at multiples of pi/2:

When I say "the filter behaves the desired way" I mean that it turns together with the sinusoid:

.. now the question is: when the adaptive filter is placed on a sinusoid of unknown frequency, what error criterion should it use so it automatically will select a window length of 1/4th the period of the sinusoid, and behave in the same nice way as the image above? No matter where the starting point of the calculation is (so also if it does not start calculating at those "pretty" pi/2 multiples).

The goal would be to find the right length of the window. To do this, you need to go through lengths of i.e. 2->100, and always calculate the same error function, but on a longer and longer input window (going back from the current period to the left: further and further "back in time").

So we take the filter coefficients, multiply them with a piece of sinusoid, and then on this we calculate the error function: for 2 periods, for 3, for 4 etc. all the way to i.e. 100.

What is the ideal error function to use for this?
Some sort of sinusoidal mean squared error type of thing..
All help appreciated.


texts: Detect lines transitioning to blobs in images

texts:
I have the following images (in high resolution, uncompressed). When the process starts, the left image is displayed and it ends something similar to the right image.

The first image shows labyrinth-kind-of strucutres with sometimes only bright borders, sometimes dark borders and sometimes both. The second, middle image shows the transition to the last image: The lines are getting shorter and disconnect. In the end nearly all of the lines will be gone and little circles will be present.

My goal is to detect the transition from lines to blobs, so basically the center image. I need to know when the lines are vanishing or when the blobs are appearing (let's say there are more than 5). The detection doesn't have to be super precise, I just want roughly to know when the first bubbles start coming. Also the detection should be as fast as possible.

What I have tried so far

I am very new to signal processing, so I'm not very sure how to start. I am using python.

My own solution (doesn't work)

In my naive way I thought "These contrasts should be easy to detect.". So I played around with blurring the image a little bit (to remove noise, even though there is very few noise) and then comparing each pixel value to a threshold. I encountered three problems:

There is a (varying) gradient in the background.
The contrast of the top left lines compared to their environment is a different than the contrast
of the lines on the bottom right (because of the gradient)
The lines are bright or dark

I then tried to somehow get the "local" contrast, so to compare the pixel value to the pixels around. I created a mask that selects only parts of the image, but this was (in my implementation) super slow. So I stopped with this way.

In addition I think it is harder to detect vanishing lines than appearing bubbles (?).

Blob detection

I found a blob detection page on scikit-image.org. I tried to use their algorithm and it is pretty good. I get the following result:

I used the transition image (the middle one of the top three images). The Difference Of Gaussian seems like what I want. But it is still detecting bigger "blobs" as you can see on the bottom right of the image wich I don't want. Also I'm not sure if this is the "default way to go" or if there are a lot better things which I'm just not thinking of.

Edit: The blob detection is very slow on my original data. So this is not an option except it can be speeded up a lot.

Canny edge detector

I tried to use the canny edge detector method as mentioned in the comments. But after some trying around I didn't get any good results. I end up with either way too much edges or no edges. Even after playing around and trying to smooth the image before or subtract, divide or multiply a smoothed image. But that may also just be because I don't know exactly how to do this. Out of my very limited knowledge I would say that the contrast is not good enough. But I don't know how to fix that.

So, to conclude: What is the best method to detect those blobs? And maybe, in addition: Is there a best python module to use? And if so, which one is it?


texts:
I am new in the signal processing. I hope I can get help. I want to ask a question regarding IQ modulation work .

Why can’t I simply multiply a complex base-band signal with a cosine to modulate it?


texts: Sampling with an alternating phase offset

texts:
Suppose, I sample a signal $z=\mathrm{e}^{\mathrm{i}\omega t}$ alternatingly in $I=\mathrm{Re}(z(t))$ and $Q=\mathrm{Re}(\mathrm{e}^{\mathrm{i}\alpha}z(t))$. Thus my data array contains
$$\texttt{data =} [I(t_0),Q(t_1),I(t_2),Q(t_3)] \quad \mathrm{with} \quad t_n = n \Delta t = n/f_s$$
For $\alpha=\pi/2$, the Q component is kind of a quadrature component. If I do a Fourier transform of that array, I get 4 peaks in the double sided FFT, one peak at $\omega$ and one at $\frac{f_s}{2}-\omega$ (and in addition the signals at negative frequencies).
If $\alpha$ is not $\pi/2$, I get peaks of different strength.

For $\alpha=0$, I get only two peaks at $\pm \omega$, for $\alpha=\pi$, I get only the peaks at $\pm(\frac{f_s}{2}-\omega)$.
Unfortunately, $\alpha$ is unknown in my case and can take any value. However, it is constant. Is there any good operation that reduces the Fourier transform output to that output that I would get if I would sample with $\alpha=0$ for all time points?
EDIT: After being pointed out in the comments below, I have to admit that the term "quadrature components" might be misleading in this case. It kind of resembles properties of these definitions, although it is not a "true" quadrature component splitting.


texts: smooth noisy irregularly spaced data containing peaks

texts:
I've got a set of scans of an object (human body) from different angles, which are being combined to reconstruct a 2D-representation. The raw measurements (blue plot below) contain a fair amount of spikes, which I reduce by using a median filter (result in green plot below). Afterwards I filter the result with a FIR lowpass filter to further remove noise (red figure below).

This produces at least visually appealing results, though I don't know if it is the best possible solution. Are there any pitfalls, when chaining median and linear filtering?

Another problem is, the samples are not evenly spaced. The distribution of samples seems to be somewhat $1/x$-ish, though I don't take this into account when smoothing the data.

Can this be ignored for simple smoothing? If yes, why? If no, how can I factor in the irregular spacing?


texts: peak limiting/audio compression formula needed

texts:
I'm looking for a formula to effectively compress an audio waveform to limit peaks.  This isn't an "automatic volume control" application where one would control amplifier gain to maintain a volume level, but rather I want to limit ("soft" truncate) individual peaks.  (I know this introduces harmonics, but I'm trying to analyze the data, not listen to it.)

My (very crude) formula so far is:

factor = (10 * average / level) + exp(-sqrt(0.1 * level / average))

Where level is the instantaneous sound level, average is the historical average sound level, and factor is a multiplier used to produce the "adjusted" level (factor times level).

Further, this multiplier is only applied if it computes to a value less than 1.  Otherwise level is left unadjusted.

The intent is to limit the adjusted level to some multiple (about 15x with this formula) of the historical average.  This formula is sorta what I need, but exhibits a "dip" as the numbers get larger.  That is, the adjusted level (ie, factor times level) increases up to a point with increasing unadjusted level but then, rather than going asymptotic, begins to actually get smaller.  (In fact, the first factor was added primarily to prevent the formula from going to zero with extremely high values.)

(The reason for wanting to limit the values this way is primarily so transient noise doesn't seriously upset the running average of the sound level.  But when you're analyzing snores "transient noise" is quite significant, so I can's simply squelch it.)

So, can anyone suggest something better?  (It seems that asymptotic behavior is easy to produce when you don't want it, but hard when you do.)


texts: What is the benefit of using symmetric kernel in Fourier transform?

texts:
In image processing, a forward transform of an $M\times N\text{-}$pixel image $f$ from spatial domain coordinates $(x, y)$ to transform domain coordinates $(u, v)$ can be defined as [1, p.12]:

$$T(u,v)=\sum_{x=0}^{M-1}\sum_{y=0}^{N-1}f(x,y)\cdot r(x,y,u,v)$$

The transformation kernel $r(x, y, u, v)$ is said to be symmetric if [1, p.13],

$$r(x, y, u, v) = r_1(x, u) \cdot r_1(y, v)$$

The forward kernel in discrete Fourier transform is [1, p.35]:

$$r(x,y,u,v) = e^{-j2\pi\left(\frac{ux}{M}+\frac{vy}{N}\right)}\\(u=0,1,\dots,M-1,\,v=0,1,\dots,N-1)$$

My question is, What is the benefit of using symmetric kernels in Fourier transform?

I know the benefits of separable kernels, already.

[1]: "Fourier Transform" Slide set, George Bebis (UNR). Based on Ch 4 of “Digital Image Processing”, Gonzales and Woods. http://www.cs.umb.edu/~duc/cs447_647/spring13/slides/FourierTransform.pdf (archived copy)


texts: in TD-PSOLA, what rate to use for analysis frames of unpitched audio?

texts:
First post here, apologies if this is a bit long...
I'm working on a real-time implementation of the TD-PSOLA technique:

I'm processing frames that are sized consistently according to 2 * the period of the minimum detectable frequency. (ie, the max possible input period)
Then for each frame of audio, I'm doing pitch detection using ASDF-based autocorrelation
For pitched frames of audio, I'm extracting analysis grains of length 2 * period, centered on the points of maximum signal energy in each period

My OLA process is pretty standard, overlapping the output synthesis grains at the rate of the new desired period.
My question is, in most of the papers on TD-PSOLA I can find, it simply says something along the lines of "analysis grains are evenly spaced for unpitched frames"... so does this basically mean that if a frame is determined to be unpitched, I can use the same peak-picking & OLA code, but just choose an arbitrary value for the analysis grain length?
const int periodThisFrame = frameIsPitched ? currentInputPeriod : unpitchedGrainRate; // if frame is unpitched, just lie to my code and make up an arbitrary value that's the "period" of the unpitched audio???

grains.getGrainOnsetIndices (indicesOfGrainOnsets, inputAudio, periodThisFrame);

for (auto* voice : voices)
    if (voice->isVoiceActive())
        voice->renderNextBlock (inputAudio, outputBuffer, periodThisFrame, indicesOfGrainOnsets, windowToUse);

If this is indeed what I'm supposed to do with unpitched frames, what kinds of static values would you recommend for the unpitched "period"?
Thanks everyone!


texts: What does poles in unit circles center mean?

texts:
Suppose i have all my poles in unit circle center. What kind of information this gives me?
Can i determine if this filter is IIR or FIR?


texts: What are the differences in overtones for hard vs soft materials?

texts:
I've been researching Physical Modeling lately, and so far pretty much everything makes sense from a physical/logical perspective.

The one thing that I haven't yet found a proper explanation on is the difference in overtones between soft and hard materials.  I've seen it mentioned in a few places that this stiffness is the parameter which defines the difference between metallic and nylon string on a guitar, for instance.  I've also caught that one of the two directions (hard vs soft) "spreads the harmonics."  But that's all I've got.

So, what are these differences in overtones for rigid materials?  They seem to be more spread out, I've come to recognize metallic sounds as being rather comb like.  But I'm trying to eventually write code to synthesize these sounds, and need to know some details as to the way they are spread.

Also, here's a great video in which most other aspects of physical modeling are pretty well explained, as well as the mention of more spread out overtones for harder materials (though I don't remember at what time): https://www.youtube.com/watch?v=dUcNzPhZdwk


texts: Pros/Cons to using Spectral and Diffusive Graph Wavelets

texts:
As I understand, there are two major methods of constructing wavelets on graphs. Spectral wavelets, from David K Hammond et. al, and diffusive wavelets from Coifman and Maggioni. I can't quite parse out any advantage one construction has over the other, which applications each is more suited for etc.
The Hammond paper states:

The  largest  difference between their (refering to Coifman) work and ours is that the diffusion wavelets are designed to be orthonormal.  This is achieved by running a localized orthogonalization procedure after applying dyadic powers of T at each scale to yield nested approximation spaces, wavelets are then produced by locally orthogonalizing vectors spanning the difference of these approximation spaces.  While an orthogonal transform is  desirable  for  many  applications,  notably  operator  and  signal  compression,the use of the orthogonalization procedure complicates the construction of the transform, and somewhat obscures the relation between the diffusion operator T and the resulting wavelets.

But this feels like a very fuzzy and unclear argument. I'd be curious if anyone has experience working with either one and can speak to advantages/disadvantages for graph signal processing (ie whole graph classification, node feature regression, graph generation, etc).
Thanks!
EDIT: Perhaps one way to analyse this is via the difference between a graph Fourier transform and a random walk? Afiak, computing a full fourier transform of a graph is expensive, since it requires diagonalising the normalized graph laplacian. So, we instead use a first order approximation with Chebychev polynomials (ie  David K Hammond et. al). Then, instead of using what are essentially Fourier features, we could use features derived from a random walk (ie Coifman and Maggioni), along the lines of something like node2vec.
Is boiling down the difference between these two methods to Fourier features vs random walk a valid interpretation/understanding?


texts:
I have two colored lines, which can be thought of as functions I1,I2:[0,1]->R. I want to check whether I1 and I2 'topologically' represent the same object. In other words, if I stretch some parts of I1 and squeeze some other parts, I want to get I2.

Obviously they have to have the same colors and 'in the same order'.

Is there a metric that measures this kind of similarity?


texts:
This is a bit of a weird question. I have a bunch of IQ data. Its a very big file that i cant upload on here. Im working through a few exercises trying to analyse the data. I have plotted the signal envelope and the instantaneous frequency of the signal over the 25s period. The match the expected graphs that i should be getting. They correspond to Fig.1 and 2. Then i have a Fig.3 and a short description but ill be honest im not sure where to start. This is the description that goes with Fig. 3
Figure 3 shows the frequency domain representation of the doppler shift sequence. The phase noise plus thermal noise output of the frequency discriminator is observable in the output sequence.  For a white noise input to the frequency discriminator, the noise output would be a parabolic function of frequency.   We are observing the square root of the power spectral density which should be a linear function of frequency.  The observed frequency discriminator output noise is approximately linear with frequency. In addition, there is a large spurious sinusoidal spectral component present at 2 MHz, and this indicates that either the transmit or receive local oscillator is being FM modulated with a frequency of 2 MHz.  The phase noise increases with increasing frequency until approximately 4 MHz. It should be noted that the magnitudes of both the spurious sinusoidal FM modulated signal and the noise are significantly larger than the magnitudes of the low frequency signals of interest.
My initial approach was to do an fft on the original data to try and get the plot. But i keep getting something that is nowhere near fig.3. If anyone could help me i would really appreciate it.


texts: Efficient FFT (or SFFT) for adjacent parts of signal with overlap?

texts:
Imaging we have a signal $x$, which is segmented to 50% overlapped vectors $x_1,x_2,..,x_m$ , and we intent to compute FFT of each segment. Is there anyway that we can reduce computation of FFT of each block. I mean, if FFT of $x_1$ has taken and we know $x_2$ has a 50% overlap with $x_1$, so half of $x_2$, have already went through some FFT process.

Is there any method or modification that reuse this information to reduce computations of FFT of each segment based on information of the previous segment?


texts: Digital implementation of first order analog filter using bilinear transformation

texts:
I'm trying to create a digital filter from a first order analog filter with transfer function
$$H(s)=\frac{1}{1+\tau s}$$
with time constant $\tau=.1\text{s}$, and  sampling rate $f_s=1000\text{Hz}$.

Applying the bilinear transform in Matlab however appears to yield a filter with the a different 3dB point than expected. I expect the 3dB point to be at $\frac{1}{\tau}=10\text{Hz}$, but it appears to be around $1.6\text{Hz}$. Any idea what I could be doing incorrectly?

Matlab code:

fs = 1000;
tau = .1;

num = 1;
den = [tau, 1];
[numd,dend]=bilinear(num,den,fs);

[h, f] = freqz(numd,dend,4096, fs);

figure(1); clf();
subplot(211); semilogx(f,20*log10(abs(h))); hold on
plot([.1, 1000], [-3 -3],'r');
grid on; ylim([-40,1]); ylabel('gain (db)'); xlim([.1, fs/2]);
subplot(212); semilogx(f, angle(h)*180/pi);
grid on; ylabel('phase(rad)'); xlim([.1, fs/2]); xlabel('frequency(Hz)');


texts: Keyword spotting - constant phoneme length

texts:
I wish to implement a keyword spotting algorithm (in speech), on the basis of what was published in this article (Apple's Machine Learning Journal).

The article describes a neural-network-based method for keyword spotting, in which a network is first trained to identify twenty phoneme-classes and is triggered if the the sequence of phonemes that were inferred by the network correspond to Apple's 'Hey-Siri'.

It states that:

  The microphone in an iPhone or Apple Watch turns your voice into a
  stream of instantaneous waveform samples, at a rate of 16000 per
  second. A spectrum analysis stage converts the waveform sample stream
  to a sequence of frames, each describing the sound spectrum of
  approximately 0.01 sec. About twenty of these frames at a time (0.2
  sec of audio) are fed to the acoustic model, a Deep Neural Network
  (DNN) which converts each of these acoustic patterns into a
  probability distribution over a set of speech sound classes: those
  used in the “Hey Siri” phrase, plus silence and other speech, for a
  total of about 20 sound classes

What is puzzling to me is the bolded line.
It seems that the network is fed a constant number of frames (MFCC features) without taking into account that phonemes are uttered differently (the length varies) even by the same speaker (let alone by different ones).

Do I understand it correctly?
What would be (or is), a good way of dealing with the variations in length of phonemes?


texts: What exactly hidden markov model does in speech recognition process? I read it is the representation of phonemes as states? What exactly is a state? Any detail article on HMM role in speech recognition process will be helpful.


texts: Prove that convolution with a separable filter is equivalent to convolution on each 1D filter

texts:
I would like to prove that convolution of an image $I \in \mathcal{M}_{m_1 \times n_1}$ with respect to a separable 2D filter $F$, (i.e., $F = F_1 F_2$, where $F \in \mathcal{M}_{m_2\times n_2}(\mathbb{R})$, $F_1 \in \mathcal{M}_{m_2\times1}$, and $F_2 \in \mathcal{M}_{1\times n_2}$) is equivalent to convolution with respect to $F_1$ and then $F_2$. If $A*B$ represents convolution of an image matrix $A$ under a filter matrix $B$, then we need to show that $I*F=(I*F_1)*F_2$.

We define convolution as such: $(I*F)_{(m,n)} = \sum_{i=-m_2/2}^{m_2/2}\sum_{j=-n_2/2}^{n_2/2}F[i,j]\cdot I[m-i,n-j]$, or $\sum_{i=-m_2/2}^{m_2/2}\sum_{j=-n_2/2}^{n_2/2} I[i,j]\cdot F[m-i,n-j]$.

Here's what I've tried starting with the left side (using the matrix indexing notation [m,n]):

$((I*F_1)*{F_2}){[m,n]} = \sum_{j=-n_2/2}^{n_2/2}(\sum_{i=-m_2/2}^{m_2/2}{I{[m-i,n-1]}} \cdot {{F_1}{[i,1]}}){[m-1,n-j]}{F_2}{[1,j]}$

Now, I notice that the terms ${F_1}{[i,1]}$ and $F_2[1,j]$ as placed in the summations can be combined to yield $F[i,j]$, however, we are indexing this entire term, so I don't believe we can combine these two terms as such. Additionally, the I don't see how to get terms involving $I$ to become $I[m-i,n-j]$.

Any advice would be much appreciated.


texts: Design the coefficients of Wide-band FIR filters

texts: It will be a great help if someone could share a content/tutorial about how to design the coefficients of Wide-band FIR Filters.


texts:
It is possible to do IQ demodulation by using a zero crossing detector and a timer to take 4 samples of a sine wave if a reference signal is present. When there is no phase difference between the signals the 4 samples are taken at exactly 0, 90, 180 and 270 degrees by using the timer.

Does this subset of lock-in/synchronous dectection have a special name? How can I best search for articles and information that has to do with this technique?


texts:
If I have an ideal high pass filter as the one in the picture:

And I downsample it by 2, e.g. $h_{new}[n] = h[2n]$, is my understanding correct that the resulting filter would look like this in the frequency domain:


texts: Why averaging in Spectral magnitude domain not in complex domain to estimate spectrum of a process

texts:
Consider we need the magnitude spectrum of the signal. Signal is recorded in $N$ trials to a certain stimuli. Signal varies from each trial because of noise. So, to estimate the actual magnitude spectrum, there are two approaches:

Avg. in temporal domain: Average out trials in temporal domain to obtain signal of less noise and then take its fourier transform to obtain signal's complex frequency content. Visualize magnitude spectrum. The output would be the same, even if we average the fourier transforms(complex), as it is a linear operator.
Avg. in magnitude spectrum domain: Compute fourier transforms of each trial, get magnitude spectrum and average this across trials.

According to me, approach (1) is correct as we are not neglecting any of it. Averaging has to be done in linear domain, which is real and imaginary parts of the complex output (Fourier transform). Whereas the second approach neglects phase spectrum of each trial, i.e. averaging in Polar representation of complex number individually. Many of my friends, even a professor approve the second approach (2). Their argument is that, because the requirement is the magnitude spectrum which is random, because of noise in each trial, so averaging the required output (Fourier transform) over many trials to obtain its estimate is a reasonable step. I am not convinced with it, as spectrum consists of both phase and magnitude and just neglecting one of it to get an estimate individually, by linear approaches, (here Arithmetic mean) is not proper, as the true underlying magnitude spectrum, getting modulated by noise, may be some form of non-linearity (function mapping temporal signal to magnitude spectrum). Thus, averaging magnitude spectrum out won't null out the noise. So, please help by providing opinions of what may be correct and why ?