texts: Understanding the definition of mean/autocorrelation

texts:
I was studying about the definitions of mean, expected value and autocorrelation. I wanted to verify my understanding the evaluation of mean, expected value and autocorrelation. At the same time to verify the definition of autocorrelation as the convolution of the signal with this delayed copy mathematically which I was not able to.

Here is my analysis:

Basically, I see mean as an average of all values in a population. For example, consider an experiment where we measure the outcome of the random variable that can go anywhere between $[1,100]$. By performing the above experiment $50$ times, we get $50$ outcomes:$a_1, a_2, \ldots, a_{50}$ which has values ranging from $1$ to $100$.

The mean of the above random variable is given by:
$$
\mu = \frac{a_1 + a_2 +\ldots + a_{50}}{50}
$$

The expected value is given by:
$$
E(x)=(1*\textrm{probability of getting 1})+(2*\textrm{probability of getting 2})+\ldots+(100*\textrm{probability of getting n})
$$

which can also be represented as:
$$
E(x)=\prod_{k=1}^{100} kP_k
$$

where $P_k$ is the probability of getting $k$. Now taking the actual definition of an expected value which is:
$$
E(X)=\int_{-\infty}^{\infty} xF_x(X)dx
$$

The above seems somewhat satisfying as we could relate the above with the example - taking $x$ as one of the outcome and $F_x(X)$ as the probabilities (actually it's a probability density function to be accurate).

For a random process, the above expands to (at time $t_1$):
$$
E(X_{t_1})=\int_{-\infty}^{\infty} x_{t_1}F_{X_{t_1}}(x_{t_1})dx
$$
Similarly, expected value can be computed at several time instances since the random variable changes every time instant.

Now, lets take a Strict-Sense Stationary Random Process where expected value (mean) is constant and autocorrelation depends up on the time difference. So, the definition of Autocorrelation is given as per wikipedia:

  $$
R_x(\tau)=\frac{E\left[\left(X(t_1) - \mu\right)\left(X(t_1+\tau) - \mu\right)\right]}{\sigma_{t_1}\sigma_{t_2}}
$$

The above is with Normalization. Taking out the normalization, we have:

  $$
R_x(\tau)=E\left[X(t_1)X(t_1+\tau)\right]
$$

Till now it's pretty clear. Now applying the definition of an expected value in the above expression:
$$
R_x(\tau)=E\left[X(t_1)X(t_1+\tau)\right]=\int_{-\infty}^{\infty} x_{t_1}F_{x_{t_1}}(X_{t_1})x_{t_2}F_{x_{t_2}}(X_{t_2})dx\quad\text{where}\quad t_2 = t_1+\tau
$$

But in Wikipedia, it's given as:

  $$
R_x(\tau)=E\left[X(t_1)X(t_1+\tau)\right]=\int_{-\infty}^{\infty} x(t)x^*(t-\tau)dt
$$

This is where I am stuck at - I am not able to match the last two expressions. I am very well aware that autocorrelation of a random process is convolution with itself at a time lag of $\tau$ but I am not able to relate the expressions mathematically. I am stuck here for several days.


texts:
Synchrosqueezed STFT paper defines STFT phase transform as:
$$
w(u, \xi) = \xi - \frac{\partial_tS_{g}f(u, \xi)}{j2\pi S_gf(u, \xi)}
$$
which differs from synchrosqueezing original paper's (per CWT) two-fold:

The $\xi\ - W$, where original's is simply $W$
The $2\pi$, absent in original's

Why the differences; what motivates STFT's definition? And why use 'modified' STFT?


texts: Limiting bandwidth by adjusting sample rate

texts:
I have an SDR that is capabple of 2.4Ms/s.  I am using it to measure the power of signals.  Right now I am setting the sample rate to 2M, collecting a burst of samples, and calculating the average power using

10 * log10(sum(abs(sample)**2 for sample in samples) / len(samples))

This gives me the average power over 2MHz, I think.  I'd like to limit that.  One approach is to use a filter.  But it would be simpler just to sample less frequently (sample at my target bandwidth).  But will the output measurements be as accurate?


texts: What does energy of the difference between two DFT's $X$ and $Y$ being 0 tell us about their corresponding signals $x$ and $y$?

texts:
I think that would mean that the energy of difference between the signals $x$ and $y$ should also be 0, but how can I prove this?
Does this also mean $x$ = $y$?


texts: Multiple short-range impulse responses aggregated to simulate a long-distance impulse response

texts:
I'm a biologist and I was thinking of ways that impulse responses could be used to simulate how an animal sounds over various distances in different types of forests.
Ultimately, if a tool was constructed that would allow scientists to simulate animal sounds over various distances, this would be a pretty useful research tool.  Specifically, I'm interested in simulation of the reverberation effects, hence why I'm interested in impulse responses.
Process-based modelling an impulse response is not trivial, however, as an empiracle approximation I was wondering:

If I record an impulse response at 50m from a source in a forest, if I were to convolve a source signal twice, would that result in a reasonable approximation of what the sound would be at 100m distance?

The idea is that if I can accurately measure impulse responses over short distances in different forest types, these could be used to simulate reverberation over a large distance, including sound passing through multiple forest types.  Currently, I can't think of why this would be a bad approach... but I'm a biologist, so I'm hoping others can tell me if this seems like a flawed concept.


texts: Interactive Multiple Model Likelihood Calculations

texts:
I'm writing an Interacting Multiple Model tracking filter for the first time. I understand that the reported state is a blending of the states of the individual states of the individual filters based on the likelihood that each filter is producing an accurate result. How are those likelihoods calculated and how are they combined? I suspect there is some joint PDF involved, but I'm not sure where to begin. Are there any papers that provide this insight for a newcomer that can get me going with an implementation (rather than just giving me an overview of the subject or drowning me with math)?
Also, in the interacting part, the state  and state covariance outputs are blended and fed back to replace the sate of each of the filters. Are the weights for this blending different from the weights used to calculate the blended state used as the output? (I imagine because the properties represented by each filter's state are different from the other filters, the calculations might involve different weightings.)


texts: Suppose there are two linear devices (containing some multi-physics but the details don't matter here), and these devices are given to us as two black boxes that can be studied experimentally. Black box #1 takes signal X as input and produces signal Y as output. Black box #2 takes signal Y as input and produces signal X as output. It is conceptually similar to a microphone converting an acoustic signal to an electric signal, and a loudspeaker converting an electric signal to an acoustic signal. If these two black boxes get connected to each other then an instability can probably arise. The question is what measurements on the two black boxes would produce all necessary and sufficient information to assess whether the coupled system would go unstable, and at what frequency. Would the right approach be to study the response of each black box to a sinusoidal input? Or the response to a delta-pulse input? What is the criterion for instability for the coupled system, and what measurements and calculations would be needed for assessing it?


texts: I know the basic filtering techniques available in signal processing.Does audio signal specifically have any different filtering method?.My application is to filter out the background noise in speech signal which is higher than the speech signals.Can anyone suggest me some


texts: Multi Scale Shape and Detail Enhancement from Multi Light Image Collections

texts:
I have been working on a practical implementation in Matlab of the algorithm Raanan Fattal suggested in the following paper.

I couldn't understand the meaning of eq. 11 on page 5:

\begin{equation}\begin{array}{llllll}
U^{(i, j)}=g_{\sigma_{d}} * e^{\left(\left|D^{(i, j)}\right|-C^{(i, j)}\right)}.&&&&&(11)
\end{array}\end{equation}

g is a gaussian, 1D function (See section 4.1, page 3).
While in this equation no parameters are given.
$D(i,j)$ is a matrix and $C(i,j)$ is a number.

Could anyone explain what it means in case it is just a writing method I don't recognize?

Thanks


texts: How to Estimate the Input for a Convolution Given the Filter (Impulse Response) and the Output of the Convolution

texts:
I understand how to find the output from the input with an impulse response, but how can I go about finding the input if given the other two?

I have $y[n] = [-1, -1, 11, -3, 30, 28, 48]$ and $h[n] = [-1, 2, 3, 4]$

How can I go about finding $x[n]$?

I know very little about signal processing, so if you don't mind giving an easy explanation, then I appreciate it. Or, if it's possible to do an example, that's better.

EDIT: I think that if I know $y[n]$ I can guess what $x[n]$ would be by multiplying and summing the results, but I'm not sure how to figure out the length of $x[n]$.


texts: Why does speeding up audio files with VLC Player not match with doing the same thing with RPG Maker or Audacity?

texts:
When I speed up 150% an audio file with VLC Player, why doesn't it match the higher-pitched version I get when I speed the same file 150% with RPG Maker VX Ace's Sound Test?

When I speed up with VLC Player, I don't get a pitch increase

When I speed up with RPG Maker or Audacity, I do...

How would their methods of speed increase differ, such that that happens?

Also, I'm on a Windows, if that matters at all...


texts: Otsu Thresholding : Why 'minimum within class variance' gives the optimum threshold?

texts: I was trying to understand the Otsu thresholding algorithm in image processing. For that purpose I found a useful link. I got the algorithm flow, but a fundamental doubt arises. Why 'minimum within class variance' ${\sigma_W}^2$ (notation given in the link) gives the optimum threshold? Please can someone clear my doubt?


texts: Eigenvalues and eigenvectors of a 3D image Laplacian

texts:
I need to compute the eigenvalues and eigenvectors of a 3D image Laplacian. I'm trying to evaluate the heat kernel on the 3D uniform grid (the uniform structure generated by the voxelized image) at different time values, to implement a Volumetric Heat Kernel Signature (please see the "Numerical computation" section). The domain I'm working on is not rectangular, so I have 1s on some grid points and 0s on other points, producing a binary 3D shape. I've been reading about this for 2D: in 2D, the laplacian of every grid point is calculated and the eigenvalues and eigenvectors of the resulting matrix are then calculated. How can I do this for 3D?All the information and examples I have read are for 2D images. The specific questions are:

How can I obtain a matrix from the 3D image I obtain after applying it a (3x3x3) discrete Laplace operator?
If there is no way to obtain a matrix, then I should compute the eigenvalues and eigenvectors of a 3D structured grid. What is the simplest way to do this? Could you recommend me any soft for doing this?

I would really appreciate any hint.

Thanks in advance.


texts:
I am supposed to implement some analyses for the customer including NB, WB, Time Domain etc. This is in the audio signal processing domain. The scope of work also includes "Audio Analysis". Can anybody throw more light on this? Nothing much available in public domain. Is it STFT??

Thanks and regards
VV


texts: Adapting Richardson Lucy (RL) Deconvolution for Shot Noise Limited Coherent Imaging

texts:
I am an experimental physicist who is collecting a series of coherent imaging of trapped gas. If you are familiar with phase contrast imaging, you may understand what I mean by coherent imaging. The information about the sample is retrieved as interference between a phase-shifted version illumination and light scattered by the sample. The light I am using is monochromatic. Since the imaging technique is coherent, the point-spread function (PSF) I need to use is $J_1(x)/x$ instead of the usual $(J_1(x)/x)^2$ for a circular aperture. This means that PSF has both positive and negative values. (It may be even complex in real-life situations.) I will describe the details of what I actually observe in an image below.
Also, since I am working with a low light-level condition, I thought it is best to use the Richardson-Lucy (RL) algorithm, which seems tailored for deconvolving images with Poisson noise. My understanding of the RL algorithm is based on Gordon Wetzstein - Stanford EE367/CS448I: Computational Imaging and Display - Lecture 10 (slide numbers 26-30). The algorithm assumes that you have an input $\vec{x}$, which goes through a linear operator $\hat{A}$ (convolution with PSF), and the output is a Poisson random variable $\vec{b}$ with average $\langle\vec{b}\rangle = \hat{A}\vec{x}$.
The assumptions used for the RL algorithm are consistent with typical incoherent imaging, where the PSF and the image are everywhere non-negative, but they are not in general for coherent imaging which may have negative values (because negative values wouldn't make much sense for a Poisson distribution).
Question: would there be a way to adopt the RL algorithm for coherent imaging, or more in general, PSF with negative values?

More detailed description of a typical image. $I$ denotes intensity. $E$ denotes complex electric field, and $I = |E|^2/2$.
$$
\begin{align*}
I_{\text{image}} &= \frac{|E_{\text{scattered}} + i E_{\text{illumination}}|^2}{2} - I_{\text{illumination}}\\
&= I_{\text{scattered}} + \mathrm{Im}(E_{\text{scattered}} E_{\text{illumination}}^*)\\
E_{\text{illumination}} &= \text{plane wave}\\
E_{\text{scattered}} &\sim\text{spherical wave focused to a spot}\\
|E_{\text{scattered}}| &<< |E_{\text{illumination}}|
\end{align*}
$$
the last condition allows us to ignore $I_{\text{scattered}}$ and focus on the $\mathrm{Im}(E_{\text{scattered}} E_{\text{illumination}}^*)$. Since $E_{\text{illumination}}$ is more-or-less flat, you could say we are imaging a magnified version of $E_{\text{scattered}}$ times its relative phase shift $\phi$ (small) with respect to the illumination.
$$
\begin{align*}
E_{\text{scattered}}  &= E_{\text{illumination}} (e^{i\phi_{gas}}-1)\\
&\approx E_{\text{illumination}}i\phi_{gas}\\
I_{\text{image}}[x,y] &\approx |E_{\text{illumination}}|^2\cdot\phi_{gas}[x,y]
\end{align*}
$$
Here is a sample image that shows fringes.


texts: Proof of complex conjugate symmetry property of DFT

texts:
According to the Proof :

  \begin{align}
X_n &= \sum_{k=0}^{N-1}x_ke^{-j\frac{2\pi k n}{N}}\\
X_{N-n} &= \sum_{k=0}^{N-1}x_ke^{-j\frac{2\pi k (N-n)}{N}}\\
&=\sum_{k=0}^{N-1}x_k e^{-j 2\pi k}e^{j\frac{2\pi k n}{N}}
\end{align}

  Using $\exp(-j2\pi k) = 1 \quad \forall \ k$

  \begin{align}
X_{N-n} &= \sum_{k=0}^{N-1}x_k e^{j\frac{2\pi k n}{N}}\\
\end{align}

How is $\exp(-j2\pi k) = 1 \quad \forall \ k$ true ? Doesn't it mean $-j2\pi k = 0$ ? But that's not possible right?


texts: Concept of Orthogonality and Orthonormality

texts:
Please explain me the concept of Orthogonality and Orthonormality. I understand that the mathematical definition of orthogonality between two vectors is that their dot product is zero. It means that there is no correlation between the two vectors. And in case of Orthonormality the vector length would be 1.

I am unable to understand the concepts clearly. Please explain me the concept of Orthogonality and Orthonormality in terms of Image Processing.


texts: Measuring distance of periodic structure in biological sample with FFT in MATLAB

texts:
I have pictures, taken with a microscope, of biological samples that exhibit a periodic pattern. Previously, I have used ImageJ to manually rotate the image perpendicular to the pattern and plot its grey value profile. Doing FFT in MATLAB I can determine the distance between two peaks of that pattern via its spatial frequency. But this all depends on how (well) I rotate the sample. So my goal is to actually use fft2 in MATLAB to directly transform the image regardless of sample angle. Somewhere I have read about calculating the rotational average (after fftshift) of the resulting spectrum, but I don't know how.

Is this the right approach anyway?
Or is there an easier way to calculate the (average) distance between two units of a periodic pattern in an image without having to adjust the angle beforehand?


texts:
I am doing some tests about local/global contrast algorithms and need a simple equation to define an arbitrary S-shaped contrast curve. It's simple if the turning point is assumed to be (0.5, 0.5), but couldn't find a straight equation if the turning point has to be arbitrarily set.

These are the typical contrast curves I achieved for turning point in the middle (0.5, 0.5):

And the simple equations follow this rule:

y = x^2*2 for x<=0.5

y = 1-(1-x)^2*2 for x>0.5

I would like to be able to allocate the turning point to any (x,y) position and still have a smooth S-shaped curve where the slope is continuous on both sides of the turning point. I would like to keep the equation as simple and straightforward as possible, avoiding the use of splines or any other more complex math.

Any ideas? I tried to google I found some equation like this.

y = [ (1-s)x + sa*(x/a)^E ] ^ ( log(b)/log(a) )

Parameters:
(a,b): turning point

s: slope at ends

E: contrast strength

But it does not work like this

Would you please let me know how do I make the equation like above.


texts: How to 'interpret' the Fourier Transform (specifically, of a convolution kernel)

texts:
As part of a homework assignment, I had to take the Fourier transform of the kernel I was using to convolve a signal.  The kernel was a constant rectangular function, that was 1 within the square $(-1, -1)$, $(1, 1)$ and 0 everywhere else.

I was wondering what this result really means.  What have I gotten once I take the Fourier transform of this function?


texts: narrow band frequency response creation and general FR question

texts:
i need some guidance with understanding frequency response characteristics.

i have the a signal A with is played on speakers and recorded via microphone which is signal B.
then i apply a window function, shift both signals to frequency domain and analyze the magnitudes,
but the peak for the most dominant frequency is not at nearly the same index. it jumps.

to do further analyzation of the signal my plan was to create the frequency response of my audio system, multiply my frequency domain signal A with the FR and the peaks should align.
am i roughly right with this?

if yes, additional question:
as my processing power is limited i want to analyze only a certain frequency band.
what would be the best approach to generate an frequency response for a certain frequency band? and if i consider only a few frequencies, is it possible, that other frequencies outside my "scope" affect my observed ones and make my results unpredictable again?

thanks for any help in advance!
cheers


texts: Why discrete wavelet transforms use sampling rate 2 and need signal length to be a power of 2?

texts:
I know Fourier transforms but new to wavelet transforms. I can understand Haar transform needs signal length a power of 2, since the filters have 2 taps and down-sampling and up-sampling in the pyramid algorithm form binary tree structures, so it is efficient to implement if signal length is a power of 2.
But higher-order transforms (e.g. DB2) or other kinds also use sampling rate of 2 and need signal length a power of 2. Is it also for efficient implementation? Can the sampling rate be other small prime numbers 3, 5 like in FFT?


texts:
Antipodal Signalling has a bit error probability of $P_b = \frac{1}{2} \mathrm{erfc}\big(\sqrt{\frac{E_s}{N_0}}\big)$ and on-off-signalling has a bit error probability of $\frac{1}{2} \mathrm{erfc}\big(\sqrt{\frac{E_s}{2 N_0}}\big)$. Why does this correspond to a higher SNR of 3 dB which we need for on-off-signalling to achieve the same bit error probability as with antipodal signalling?

I know that the factor 2 corresponds to 3 dB. But the complementary error function does not decrease by a factor of 2 but by a factor of $\sqrt{2}$


texts: Tracking a Sine Wave with Kalman Filter - How to Account for Offset (DC Signal)?

texts:
I am attempting to create a Kalman filter to track a sine wave (I am using a linear Kalman filter example assuming I already know the frequency of the sine wave) - the example I am using is derived on pages 194-196 of "Fundamentals of Kalman Filtering: A Practical Approach" 2nd edition by Paul Zarchan and Howard Musoff.

It is working to track the AC part of the signal, however the offset of the sine wave from the $x$-axis is not correct, it seems to be tied to my value of $R$, I'm guessing it is because in the derivation of the model no offset is included but I cannot see where an offset term should be inserted, how should I go about this?

The matrices describing my system are like so:

$$\mathbf \Phi_k = \begin{bmatrix} \cos(\omega T_s) & \dfrac{\sin(\omega T_s)}{\omega} \\ -\omega \sin(\omega T_s) & \cos(\omega T_s) \\\end{bmatrix}$$

Where the state matrix is:

$$\mathbf X = \begin{bmatrix} x \\ 0 \end{bmatrix}$$

And I have set $\mathbf Q$ and $\mathbf P$ like so:

$$\mathbf Q = \begin{bmatrix} \dfrac{T_S^3}{3} & \dfrac{T_s^2}{2} \\ \dfrac{T_s^2}{2} & T_s \end{bmatrix}, \quad\mathbf P =  \begin{bmatrix} 9999999999999 & 0 \\ 0 & 9999999999999 \end{bmatrix} $$

I am now attemping to use this to track a generated signal of a noisy sine wave of amplitude and frequncy $1$ with an offset of $300$.

If $R$ is set to $0.1$ I get the following output of my filter:

Which is offset by $300/20$, as can be seen from this plot where I add an offset to the Kalman filter output:

Changing $R$ changes this offset (as one might expect as $R$ denotes the uncertainty in your data).

How can I add this offset into my model such that my Kalman filter can tracking the sine wave correctly regardless of offset?

EDIT: I've been thinking more about my question and realised that in a real signal with noise this offset could be considered a separate constant signal with frequency $0$ which could be extracted by using a Kalman filter fitting a constant value (or simply a moving average filter) and that the offset is not inherently part of the sine wave.

In which case how might I remove the offset in the Kalman filter output entirely? (e.g. if I used a bandpass filter no offset would be present).
Since my model does not include an offset I might expect no offset at all but I do see an offset of $300/20$, as discussed. Why does this occur if there is no such offset parameter in my model?


texts: What can we deduce about variance when we are given the noise spectral density?

texts:
Given the noise spectral density ${N_0\over 2} = a$, what can be deduced about the variance?

In the case of a two-symbol canal(/cable), and when $T_0 = 1$.

Is it that, $\sigma_X^2 = {N_0 \over 2} *T_0$?


texts: How to calculate the magnitude of frequency response from Pole zero plot

texts:
I have checked the theory to calculate the magnitude of frequency response from the pole-zero plot from the previous posts. As far as I understand(and I hope I am correct), the magnitude can be calculated from this formula.
|$H(z)| = \frac{|\prod_{n=0}^{n=\infty} (z-z_n)|}{|\prod_{n=0}^{n=\infty}(z-p_n)|}$
So, for this question, (no 11, fig. a),

To visualize the frequency plot, I wrote the following Python code,
w = np.linspace(-np.pi,np.pi,100)
z = np.exp(1j*w)
cof1 = (0.9+0.1j)
cof2 = (0.9-0.1j)
eq = z**2 - ((cof1+cof2)*z)+(cof1*cof2)  //to find the equation from the roots
num = (z+1)**3
den = (z-0.8)*eq
y = num/den
plt.plot(w,np.sqrt(y.real**2+y.imag**2))

The code is not great but it kind of works (I think so). And, I took some approximate values for coefficient of poles. Anyway, I got the following output,

which is wrong. The correct output is,

I don't understand, where I went wrong. Why is there a significant gap in the magnitude between my output and the correct answer? I used the same code to calculate some other plots and it worked fine. But in this particular question, it didn't work. I hope my code is not wrong. Could anybody help me with this? I am trying to play around with the poles and zeros to see its relation with the magnitude of the frequency response curve.


texts: Frequency dependent phase difference between signals arriving at two microphones

texts:
I wish to calculate the time difference between a signal (may or may not be periodic), arriving at the right and left channel of a stereo microphone pair kept at a distance of about 30 cm. I am doing so to localize the acoustic source.

I compute the FFT of the left channel and the right channel, and then find the values of the FFT at a particular frequency bin of interest. I then divide the (complex) values to get the phase difference in radians. I then convert the phase difference to a time difference ( time difference = phase difference / 2* pi ) and use this to calculate the angle of arrival of the acoustic source.

What are the ambiguities that could occur in this method of calculating the time difference, as compared to a cross-correlation method of finding time difference?

I am using this method rather than cross-correlation due to the frequency dependence of the phase difference.


texts:
I have signal containing a large amount of mains noise. I'm trying to feed this back into my signal to actively cancel it from future measurements, but I'm having trouble getting it to work. I have tried taking the fft bin with the maximum mains noise, generating a sin wave of the function:

bin.real * Sin ( bin.frequency * 2 * PI * T + bin.phase)

where bin.frequency is calculated to be the mains noise at the time of measurement (~$50\textrm{ Hz}$).

When I subtract this from my original signal it still looks very noisy, albeit a different kind of noisy. If my sample rate is $250\textrm{ Hz}$, I'm thinking I need to increment T by $1/250$ to correctly generate the signal.

What is the correct way to go about this?


texts: Stability of system with poles inside unit circle - conflict with differential equation

texts:
I am trying to understand why a system with a single pole inside the unit circle is stable. For example, take a system with one pole at $z=\frac{1}{2}$. The literature says the system is stable. As a Physics major with not that much intuition for pole-zero plots I first tried to solve the differential equation that this transfer function represents:

$\frac{Y(z)}{X(z)}=H(z)=\frac{z}{z-\frac{1}{2}}$

Which, I re-write to find

$Y(z)\cdot\big(z-\frac{1}{2}\big)=X(z)\cdot z$

Which I transformed to the time domain giving

$\dot{y}-\frac{1}{2}y=\dot{x}$

For the impulse response $\dot{x}=\dot{\delta}(t)=0$, so the solution to my equation looks like

$y_{\delta}(t)=c_1e^{\frac{1}{2}t}$

And this looks quite unstable to me!

Of course, I also tried doing the same by doing a long-tail division of the transfer function, so I got

$H(z)=\sum\limits_{n=0}^{\infty}2^{-n}z^{-n}$

The inverse transform of this gives

$y_{\delta}(t)=2^{-t} = \big(\frac{1}{2}\big)^t$

This, I agree, is a stable system.

I've tried looking all over but I haven't found an example of how to go from the differential equation to a stable system. I have seen that some other questions had answers that included something like "look at the characteristic equation, when $\lambda < 1$ then the system is stable. I suppose I would disagree there - since $e^{\lambda t}$ would only be stable for negative $\lambda$.

What am I missing?


texts: Red Color selection in Python and Skimage

texts:
I'm trying to load an image from the disk and then to extract just the red channel of it and display it in grayscale with grey colormap but I don't know what I'm doing wrong.. The image should be displayed as an rgb color, but if I'm using convert_colorspace it doesn't work.. This is my code:
# Import skimage and matplotlib
from skimage import io,color
import matplotlib.pyplot as plt

# Image loading
img = io.imread('lena.png')
# Displaying the original image
plt.figure(),plt.imshow(img)

# Grayscale conversion
converted_img = color.convert_colorspace(,'RGB','RGB CIE')
# Data type of the grayscale image
# taking the red channel
#red_channel=[:,:,2]
plt.figure(),plt.imshow(converted_img)


texts:
This might be a stupid question but is it possible to convolve two real-time signals together? I know that generally for running convolution you have the IR and the block of the real time signal and then you convolve them both, making sure you have zero-padded, and then you overlap and add these, but would it be possible, theoretically, to convolve two real-time signals? Like, have a block of one and the block of the other and convolve them real-time, and if so, would the process be fast enough to create something musically dignified?

Thanks

Gabe


texts: Converting frequency from $\textrm{Hz}$ to radians-per-sample

texts: In MATLAB I have to pass cut-off frequency for designing a filter. But this Cut-off frequency is in radians-per-sample. How do I convert my analog Cut off frequency in $\textrm{Hz}$, into the required radians-per-sample for MATLAB?


texts: When do you use a minimum-phase filter over a linear-phase filter

texts: Q1) I have understood that linear-phase filters have more delay time whereas minimum phase filters implement a lesser delay time but introduce phase distortion artifacts which linear-phase filters avoid. For which applications in real-time DSP is minimum phase more useful than linear phase.


texts: I have a discrete audio stream $x$ that needs to be processed in real-time. Specifically, as the each new sample is received, I would like to compute a Fourier transform of the last $n$ samples of the signal. So, for example, upon receiving the $i^{th}$ sample, I would like to compute the Fourier transform of the sequence $(x_{i-n+1}, x_{i-n+2}, \dots, x_{i-1}, x_{i})$. However this means that when I receive the $(i+1)^{th}$ sample, I will be computing the Fourier transform of $(x_{i-n+2}, x_{i-n+3}, \dots, x_{i}, x_{i+1})$, which is almost identical to the first sequence. So my question is, having already computed the Fourier transform of the first sequence, is there some way to compute the new Fourier transform from that, instead of having to recompute it from scratch each time?


texts:
I have a signal collected via an RTL-SDR at 2.4Msps.  I want to narrow in on a small signal within this (an FM broadcast station, for example).  I am multiplying my signal by a complex exponential to shift to the target frequency.  Now, I'd like to narrow in.

I see two ways of doing this.  The first is to decimate the signal down to the target signal's bandwidth.  The second is to filter.  In my experiments filtering takes much longer to perform.  Is there any reason to prefer one technique over the other?


texts: PSD of randomly positioned dirac delta train

texts: Let $s(t)= \sum_{i=0}^{T} \delta(t-\tau_i)$, where $ \{ \tau_{i} \}$ are random integers between $0,1,\cdots, T-1$. What is the power spectral density of the signal $s(t)$?


texts: What is the difference between 'de-noising' and what we commonly know as filtering methods to remove noise?

texts:
Pretty simple question - I am trying to figure out what exactly is different between 'de-noising' a signal, and simply filtering it (as we commonly know) to remove noise. Is this a case of lexical overlap or is there something fundamentally different? Why is it called 'de-noising'?

Edit: Perhaps crucially, when we talk of filtering a signal to maximize its SNR, we usually mean AWGN in the colloquial context. So is the 'noise' being referred to in de-noising also AWGN, and if so, is de-noising simply a different way of removing it, or is it a different type of noise (non-gaussian, colored, etc) to begin with?


texts: Matlab: plotting magnitude and phase response

texts:
I've got the frequency response $H(e^{j\omega}) = \frac{2 + 3.125e^{-2j\omega}}{1-0.9e^{-j\omega}+0.81e^{-2j\omega}}$, and I'm trying to figure out how to plot the magnitude response and the phase response in Matlab. Is there a simple way to do this?

Thank you in advance. This is my first post here, so please tell me if there's anything I forgot to add.

Hal


texts: How can I objectively measure train noise from a sound recording?

texts:
I have made an audio clip of some local train noise, and run it through a spectral analyser:
https://youtu.be/ily4VEoEuSc
Here's a screen-capture if you can't view that:

As I watch the graph while listening, I can see three or four lines at the bottom, which are between 500Hz and 4000 Hz, that start and finish when my brain subjectively says the sound is annoying. About two thirds in there's a high pitched line (around 10K), that's much less annoying but also of interest.
I am trying to come up with some objective identification and measurement of this to help monitor the problem. I'm a software engineer with an engineering background, but I don't have much DSP knowledge, and that's what I think would help here. I'm happy using DSP software libraries, and some applied maths.
So my main two questions are:

What methods can I use to measure those lines (the two lines around 500Hz and 1100Hz look to be the loudest)? I've looked a little into 'tone detection', but although the lines are there, it's quite fuzzy. Potentially machine learning could identify the pattern, but so far as I know at best it would be 'yes/no' - much harder to have a continuous output. That's not to mention the training data needed. One final thought is a bandpass filter around those lines, but I think they may go up or down with the speed of the train.

How can normalise the amplitude? I don't have a recording of before when I thought the noise was fine. I'm wondering if there's some objective method to capture 'background sound energy' (not the right term), so I can put a meaningful number on the amplitude  of those lines. I can then survey locals to get an idea of what threshold people start to get annoyed by it.

I know that noise is a very subjective thing. However, I've been able to collect contacts of 100s of locals who agree this is the particular sound that's annoying. Trying to put a number on it may be futile, but I'd like to know why if so.
Background
I have a local train noise issue - the good news is the local transport authority are able to rectify it by lubricating the tracks. However - if the lubrication runs out, it's then quite an effort organising enough people to complain so that it gets refilled. I'm hoping by recording this data it'll be much easier to justify.


texts: Determine 3 most dominant frequencies in a signal, PSD or just the absolute value of a Fourier transform?

texts: I have a noisy ECG signal recorded for 5 minutes. My goal is to determine heart rate every 2 seconds. To find out 3 most dominant heart rates (Beats per minute) in a 2s-signal should I calculate its PSD or just the absolute value of a Fourier transform?


texts: What is the point of smoothing an FFT or spectral density plot, and how does that affect the noise floor?

texts: It appears that smoothing the FFT or spectral density plots of a noisy signal is a common practice. I see that common tools like MATLAB and Python have functions built in to their FFT tools to do just such a thing. My question is, if you're using a spectral density plot to determine a noise floor, wouldn't smoothing artificially lower your floor? As I understand it, the noise floor is basically the upper bound of the noise in certain frequency band, which would certainly be affected by smoothing. Thanks.


texts: Target Plane Orientation Detection in a Distorted Image

texts:
Doing a camera calibration of an extremely distorted camera ( wide-angle ) the OpenCV gives us the rogdriguez and the transpose vectors of each image used in the calibration process. How do they do this?
Assuming I have a distorted image of a planar target with blobs on it I want to find the target orientation.
In undistorted case it is easy to determine its orientation by using the cv2.findHomography function.
One idea I had was to take a center 4 blobs close to the middle of the image hoping that the distortion in the middle of the camera was not pronounced as it is further away but I think this did not yield a precise homogropahy similar to the one that was found by the OpenCV.
The sample image is this one :
(this is a screenshot of the image, because the original image is more than 100 mBytes in size).


texts: Can you use the theory of Signal Space to study Band Base digital systems?

texts:
Introduction:

There is one way to study different modulations in band pass digital systems and is working with "signal space" and the Constellation Diagram.

My questions about this are:

1) Is it possible to apply it for band base systems?

and if it's possible...

2) How could i apply this to study band base digital systems?

Thanks for the interest in this question


texts:
What is the difference between a feature detector and a dense detector in computer vision? Are they the same or a subset of one another?
For the following algorithms (implemented in OpenCV), which of them are feature detectors and/or dense detectors?

SIFT
SURF
AGAST
KAZE
AKAZE
FAST
BRISK
ORB
GFTT
HarrisLaplace
StarDetector


texts: Kalman Filter implementation is too slow

texts:
I have implemented with a simple code a Kalman Filter for time domain, based on these:

KG = error_est / (error_est+error_measurment)
estimate = estimate_prev + KG ( measurment -  estimate_prev)
error_est = (1 - KG) * error_est_prev

The simple code to implement is :
error_est = 1.0
error_measurment = 1.0
estimates = []
start = 50.0

# loop over data array of numbers such as [1,2,3,4,..]

for index in range(len(data)):

    measurment = data[index]
    prev_estimate = estimates[index-1] if index>0 else start

    KG = error_est / (error_est+error_measurment)
    estimate = prev_estimate + KG * ( measurment -  prev_estimate)
    estimates.append(estimate)
    error_est = (1.0 - KG) * error_est

Now I have 3 questions,

The filter is extremely slow, which mean for array of [1...50] , I will get a result of [1...25], and generally it is much slower than moving average, but i read that it's advantage is that it is fast. What am i doing wrong?

I read that Kalman is used to estimate next result, but how is it possible that a filter ( based on the past) can be used to estimate the next result ?

Are there any parameters you can add to tweak it (such as window in MA) ?


texts: I want to get tilt sensor value for a given time t_0, but the tilt sensor data points are discrete. How do I interpolate between the discrete points?

texts:
I have 3-dimensional readings from a tilt sensor (specifically these are rotational angles about X, Y, and Z axes) over time. Let's call these angles S. I want to infer S at a specific time t_0, but each reading is discrete and are at different time points across axes. Here is graphic1 to illustrate.

graphic1

I'm thinking the solution will be something like:

Construct a window in time centred on t_0, then smooth/interpolate between the discrete points within that time window to obtain the 3-dimensional value at t_0, like in graphic2.

graphic2

However, I'm not sure on the following:

How wide should the window be such that no information is lost? (maybe something about Nyquist theorem?)
What smoothing algorithm to use?
The readings themselves are noisy.

Am I thinking about this problem the right way? I'm open to other alternatives.

Also worth nothing that I have to write an implementation in TypeScript.


texts: Why histogram equalization fail in enhance images for bimodal histogram?

texts: I'm on histogram equalization process. I have quite well understood the math but i don't understand why an histogram on bimodal image fails in image enhancement and what techniques can be used in this case (some kind of local/adaptive histogram?).


texts: Design a FIR filter with a Kaiser window

texts:
Here is the exercise I am working on.

  Use the window design method with the Kaiser window to design a linear phase high pass FIR filter of minimum order that meets the following specification:
  $\omega_P=0.8\pi$,$\omega_S=0.7\pi$, maximum pass band error=0.1dB, minimum stopband attenuation = 75dB ( you can use Matlab but you need to ensure that the final filter meets the spec. Recall that for window design methods, the errors in pass and stopband will be equal. Be sure to take it into account in your answer)

I know how to design a FIR filter using window method. What I do not understand is the last two sentences. What is "the errors in pass and stopband"? What it mean by "take it into account"?


texts: Frequency response and impulse response of black box

texts:
I am trying to find out the transfer function of a real life continuous-time black box.

First thought is of course to input a delta and get the impulse response as the books have taught us but I think it is not feasible as you can't have a proper delta (infinite at one point).

Q1. How can I simulate a Dirac input in a way that I don't break my system and in a way that it is going to give me a pretty accurate result? Accurate meaning something that will look a lot like the impulse response.

Second thought is to do a frequency response analysis where I will input a few sinusoids at different frequencies and store the output.

Q2. How many periods should I gather for each sinusoidal so that I get an accurate output?

Q3. What effect would a few leading zeros on my input have on my output spectrum? Is it going to be the same as zero-padding?

A3. Yes, because zero-padding the input will lead to zero-padding the output which I will then FFT.

Q4. If the input signal stops abruptly and went to zero after a sufficient signal length time, would that discontinuity affect my output spectrum as well?


texts: Filtering of complex exponential functions

texts:
In my problem the signals $x(t), h(t), w(t), y(t)$ and $y_w(t)$  are defined as follows:

\begin{align}
x(t)&=\sum_{i=1}^M a_i\delta(t-\tau_i) \\
h(t)&=e^t\exp\left(-e^t\right) \\
w(t)&=\begin{cases} 1, & \text{when}\quad |t|\le\frac{\tau_0}{2}\\
0, \quad &\text{elsewhere} \end{cases}\\
y(t)&=x(t)*h(t) \\
y_w(t)&=y(t)w(t)
\end{align}

Can any one recommend me a way how to get the $x(t)$ for only measuring $y_w(t)$ and knowing the $\tau_0$ by using the FFT.

Hints:
\begin{align}
X(\omega)&=\sum_{i=1}^M a_ie^{j\tau_i\omega}\\
H(\omega)&=\Gamma\left(1-j\omega\right)\\
W(\omega)&=\tau_0\textrm{sinc}\left(\frac{\tau_0\omega}{2\pi}\right)
\end{align}


texts: Recover High Frequency Loss in a Simulated Power Spectrum

texts:
I'd like to ask a theoretical question about power spectra.
In MATLAB, by means of a particular approach, I'm trying to generate a Gaussian variable which embodies a particular power spectrum.
The theoretical power spectrum has been calculated over an illimited range ([-Inf,Inf]), whereas the simulated one is obtained only in a short wave number vector range.

Generally, theoretical power spectrum and simulated one look like in the figure below

Red and green plots represent the simulated spectrum for two different configuration; the blue line stays for the theoretical spectrum.

I'd like to know if there is any easy way to recover the spectrum loss in the high frequency region, in order to force the simulated spectrum perfectly match the theoretical. I was thinking of a fairly easy filter working this way

filter = sqrt(S_th.^2./S_sim.^2);

S_rec = filter.*S_sim;

Do you believe such a procedure is allowed and physically reasonable?

there


texts: Time-dependent Fourier Transform (TDFT)?

texts:
In my DSP course we are learning right now about the Time-dependent Fourier Transform (TDFT), but I can't find any information about it online.

My professor said that it is similar to the Short-time Fourier Transform which I can find information about, except that whereas the STFT has a fixed signal and moving window, the TDFT has a moving signal and fixed window.

So does this TDFT usually go by a different name?


texts: When I ask Matlab for a zero-padded FFT, does it (or FFTW) ever explicitly create a zero-padded input vector?

texts:
If I have a length $N$ signal and ask Matlab for an $M$-point FFT, $M \gg N$, of course the computer has to allocate memory for $M$ output samples, but my question is if it ever has to allocate memory for $M$ input and fill it with the input vector along with zeros? Or are FFT algorithms capable of generating the $M$-point result without having to explicitly store the $M$-length padded input?

(Motivation I have a library that can automatically give me zero-padded data (or unpadded data), which I then perform FFTs on. Assume everything before the result of this library call has already happened, and we only care about what we do once those results (padded or unpadded) are available. If Matlab or FFTW don't need to explicitly allocate $M$-long zero-padded inputs to the FFT, then I'd be wasting memory by asking the library to zero-pad for me, and should just ask it for unpadded data.)


texts: Methods for edge detection with non-equidistant samples

texts:
This posting describes two methods of edge detection for wave analysis in a water pipe. I am not sure about advantaged and disadvantages. Therefore I want to evaluate the best method for this application. So please suggest new ones or judge the suggested.
Situation: There is a constant water flow through a pipe (horizontal - with constant diameter). Suddenly the pump stops and the resulting pressure drop travels along the pipe. There are several measurement points, which take a sample triggered by the sufficient value-change. Therefore the datapoints are not equally distributed in time.
Aim: I want to calculate the sound speed in the fluid from the velocity of this pressure wave. For this I need a method to detect the edges.
Approach 1: My first approach was to take the middle of this step which has a differential quotient above a certain treshold:

      if ( sign(treshold)*(y(count+1) - y(count))/(t(count+1) - t(count))   > sign(treshold)*treshold) then

            tCutOff(j) =  0.5*(tCut1(count+1) + tCut1(count));

Approach 2: During some experiments, an advanced method came to my mind. It was motivated by the variation of the steepness in the first step of the edge. I alternatively tool the last few points before the detected step and some followers.

 precursor = [ t(count-5: count-1) ; y(count-5: count-1)]
 follower  = [ t(count+1 : count+2); y(count+1: count+2)]

Then I build the regression with the line parameters a and b each. The cutoff point is defined as the crossing of both regression lines:

    tCutOff(j)  = -(follow_b - pre_b)/(follow_a - pre_a);

With the second approach I got the following results.


texts:
I have to filter an audio signal through a cascade of two equal low-pass FIR filters. They are half-band filters so each one has a cut-off at $\pi/2$.

Then, I have to multiply the resulting signal (obtained through the cascade of the two filters) for $z^{-q}$, where $q$ is a scalar.

Firstly, I thought to convolve the impulse responses of the two low-pass filters in this way  (where hlp1=hlp2):

hconv=conv(hlp1, hlp2),

and then filter the audio signal (called x) in this way:

x_filtered=filter(hconv,1,x)

Is it correct?

I expect that the frequency response hconv is a low-pass filter with cutoff at $\pi/4$, but the command fvtool(hconv) shows that hconv has a cutoff at $\pi/2$, and not at $\pi/4$.

Is it correct?

Moreover, how can I implement the multiplication of the filtered signal x_filtered for $z^{-q}$?


texts: Power contained in a random process $X(t)$

texts: How do we calculate the AC and DC power of random process $X(t)$ , provided we have $R_x (\tau)$, and $S_x(f)$ ?


texts: What does PSD represent in the spatial domain?

texts:
People use FFT methods to analyze topographic features in the spatial domain, such that the signal varies over (x) rather than (t). If a PSD curve characterizes amplitude versus frequency of an electrical signal, the dominant peaks of the PSD point to which frequencies contain the most power - if I understand correctly.

That being the case, what exactly does the y-axis in a PSD for a physical surface represent? Power has a very specific definition in physics. Is the geometric term Area more appropriate than Power when interpreting a spatial domain PSD curve? I'm having difficulty conceptualizing and translating the terminology and units from the temporal to the spatial domain.

DISCLAIMER: I have many questions to ask about FFT, but am new to the community and am trying to respectfully constrain the scope of my questions, so I plan to ask them separately (which I believe is the preferred format). That said, here is some background.

This is 1m-resolution multibeam sonar data, gridded to 5m, with near 100% coverage. The surface in question is coral reef seafloor, which under certain conditions forms linear features (seen below). The dimensions of these features vary with both depth and coastal aspect. My interest here is to use FFT to quantify the changes in both frequency and amplitude, so that I can assess their correlation with various environmental variables. My understanding is that if I can use FFT correctly, I can extract the dominant signal frequency/frequencies; if so, I hope to document how these dominant frequencies change from one area to the next.

The image above gives a good sense of my workflow. I start with a grid of points, which serve as neighborhood centroids for my moving-window analysis. Selecting one point (in green), I define my analysis window, calculate the average direction of features, and draw a line perpendicular to them. What you don't see is the elevation profile that's extracted, but below is the resulting PSD. In this question I'm seeking to understand the output of FFT.

I hope to execute this analysis for each grid point, and write results to file. In later questions I'll ask what metrics I can pull from FFT analysis; how exactly to tune the input data for FFT (windowing/ zero-padding/ base-2 # of samples); and whether there are best practices for determining how many spectral peaks to record.


texts: Padding Images To Solve Inverse Filtering Problem?

texts:
Let's say that the point spread function, h, is known for a blurred image B.

If we want to apply an inverse filtering method (eg. Direct Inverse Filtering for noiseless images, Wiener Filter, Constrained Least Squares, etc.), can/do we pad the blurred image B in order to divide H (DFT of h)? (The dimensions of H would equal those of the padded B)

I have noticed that using zero-padding does not yield good results, whereas applying the inverse without padding gives much better results


texts: Problem using MMSE estimation of channel frequency response

texts:
I need to model the minimum mean square error (MMSE) performance in estimating channel frequency response. I have channel's power delay profile (PDP) as a table with tap delays and powers.

The channel frequency response (FR) is computed in frequency domain via
$$H(f) = \sum_i a_i \exp\left(j2\pi\tau_i f\right),$$
where $\tau_i$ are delays from the PDP and $a_i$ are independent complex gaussian variables with variances $\sigma^2_i$, taken from the same PDP.
MMSE is given by
$$\hat{H}_{MMSE} = R_{HH}\left(R_{HH}+\frac{\beta}{SNR}I\right)^{-1}\hat{H}_{LS}.$$
To compute covariance matrix $R_{HH}$ I compute a vector with components
$$r_k = \sum_i \sigma_i^2 \exp\left(j2\pi\tau_i f\right)$$
and construct a Toeplitz matrix with it.

To model MSE I compute an $H(f)$ realization, add AWGN and apply an MSSE. In this case $\beta=1$ since transmitted signal is all 1's. The process is repeated N times and MSE is averaged.

The problem is the estimation error is so big that it beats simple LS estimate only on very low SNR and then comes to an error floor.

If instead I compute $R_{HH}$ as $HH^*$, i.e. as an ideal momentary statistic, everything works fine.

Some additional notes. Numerical computation of $R_{HH}$ via lots of channel realizations yields the same result as using the construction with $r_k$, so it's correct and consistent. If the overall concept is fine then the mistake should be in the code. I will post MWE if needed.


texts: Finding out modulation index and DC offset

texts:
I have a question form my teachers, and I cannot understand why I can find out the modulation index form the figure.

The question provide a Figure like this:

  And the information signal is a sinusoidal test signal with peak amplitude $6\ \rm V$ and is applied to an AM-DSB-C modulator, the Fourier spectrum of the modulated signal is shown above.

The solution is like this:

  As $\displaystyle \frac {\frac {Acm}{4}}{\frac{Ac}{2}}=\frac{3}{4}$, $m=1.5$, so the modulation index is $1.5$
  Moreover as $\displaystyle  m=\frac{x}{c}$, the peak amplitude of $s(t)$ is $6\ \rm V$, so the DC offset($c$) is $4\ \rm V$.

I know where is the $\displaystyle \frac {Ac}{2}=4$ come form

as $s_{AM-DSB-C}(t)=A\big(s(t)+c\big)\cos(2 \pi f_c t)$

\begin{align}
\mathcal F\left\{s_{AM-DSB-C}(t)\right\} &=S_{AM-DSB-C}(f)\\
&=\frac{A}{2}\big[S(f-f_c)+S(f+f_c)\big] + \frac {Ac}{2} \big[\delta (f-f_c) + \delta (f+f_c)\big]
\end{align}

so, form the second term we can get $\displaystyle\frac {Ac}{2}=4$

But, I cannot understand how the solution can get $\displaystyle \frac {Acm}{4}=3$.


texts: What is advantage of Logarithmic Sampling?

texts:
Logarithmic Fourier Transformation

This paper starts off in the abstract saying that the given audio signal is sampled logarithmically. We also know that the human ear has a sort of a filter bank where the filters with centre frequencies less than 1 kHz are spaced linearly whereas the filters greater than 1 kHz are spaced logarithmically.
Is there any relation between this fact and the reason why the given audio signal in this paper is sampled logarithmically? If there is no relation between the two, can anyone suggest some signal processing literature which uses the above fact known about the human ear?


texts: What is the bandwidth of product of two signals?

texts: For signal $x(t)$ with bandwidth $B_x$ and signal $y(t)$ with bandwidth $B_y$, what will the bandwidth of the signal $z(t)=x(t)y(t)$ be?


texts: System Identification with Periodic Signal Input

texts:
I want to find the ETFE (Empirical Transfer Function Estimate) of the system $G(e^{j\omega})$:

Where $H(e^{j\omega})$ is some filter that zero-mean white Gaussian noise $e(k)$ passes through. Let's assume that the input $u(k)$ is periodic with period $M$. Taking the Discrete Fourier transform, I have:

$$
Y_N(e^{j\omega_n})=\sum_{k=0}^{N-1}{y(k)e^{-j\omega_nk}}\quad\text{where }\omega_n=\frac{2\pi n}{N}\quad n=0,1,\ldots,N-1
\tag{1}$$

$$
U_N(e^{j\omega_n})=\sum_{k=0}^{N-1}{u(k)e^{-j\omega_nk}}\quad\text{where }\omega_n=\frac{2\pi n}{N}\quad n=0,1,\ldots,N-1
\tag{2}$$

$$
V_N(e^{j\omega_n})=\sum_{k=0}^{N-1}{v(k)e^{-j\omega_nk}}\quad\text{where }\omega_n=\frac{2\pi n}{N}\quad n=0,1,\ldots,N-1
\tag{3}$$

Therefore, I have:

$$
Y_N(e^{j\omega_n})=G(e^{kj\omega_n})U_N(e^{j\omega_n})+V_N(e^{j\omega_n})+R_N(e^{j\omega_n})
\tag{4}$$

Where $N=r\cdot M$ where $r\in \mathbb Z$ is an integer number of periods. I also added $R_N(e^{j\omega_n})$ as the transient part of the response (it would die out for example after the first period of the response). The ETFE is then:

$$
\hat G_N(e^{kj\omega_n})=\frac{Y_N(e^{j\omega_n})}{U_N(e^{j\omega_n})}=G(e^{kj\omega_n})+\frac{R_N(e^{j\omega_n})}{U_N(e^{j\omega_n})}+\frac{V_N(e^{j\omega_n})}{U_N(e^{j\omega_n})}
\tag{5}$$

Let's define the error between the ETFE and the true transfer function as:

$$
E_N(e^{j\omega_n})=G(e^{kj\omega_n})-\hat G_N(e^{kj\omega_n})
\tag{6}$$

In my System Identification course, the professor presented two case scenarios. One where input $u(k)$ is zero-mean Gaussian non-periodic noise of length $N$, and one where $u(k)$ is some zero-mean Gaussian noise sequence of length $M$ repeated $r$ times - which makes a periodic signal of sorts. Here is the plot of the norm of $E_N(e^{j\omega_n})$ in the non-periodic case:

And here is the plot of the norm of $E_N(e^{j\omega_n})$ in the periodic case:

In the second picture, the period $M=128$ so for example for $N=128$ we have $r=1$ (only one period was considered) and for $N=512$ we have $r=4$ (four periods were considered).

Also in both of the above figures, the professor took the expectation of the error $E_N$, i.e. he actually ran the experiment 1000 times and took the average $E_N$ for each frequency, which is what helps to give the "smooth" error curve.

My question: I do not understand what makes the error $E_N$ stay the same as we increase $N$ for the non-periodic input case, but makes $E_N$ decrease in the periodic case as we increase the number of periods that we collect.

Thank you for your help!


texts: About discrete time model for wireless channel

texts:
I am trying to understand Section 2.2.3 of the book "Fundamentals of wireless communication" by Tse and Viswanath. In this section the authors explain how to go from the continuous time baseband model to the discrete time baseband model. An image of the relevant pages are given below.
I am going to use equation numbers from the book. My question is the following:
If one looks at equation 2.29 it shows the sampling theorem. If I understand correctly that summation is the Whittaker–Shannon interpolation formula and it is from $-\infty$
to $\infty$.
This means in equation (2.33) the variable $\ell$
is from $-\infty$ to $\infty$.
And this will imply the same in equation (2.35).
Does this not make the system non causal? Because if the variable $\ell$
is allowed to be negative, the output sample at zero can depend on any future input samples.
May be I am missing something on why the variable $\ell$
is not allowed to go negative, can someone clarify?


texts: Significance of energy and power signals in real world

texts:
In signals and systems subject we study about calculating energy and power of a signal, but what is their practical significance.

Also what is the significance of a signal which is neither energy nor power signal ?


texts: Is ripples in frequency response of a filter ,result of periodic extension of a signal in time domain thereby producing discontinuities?

texts:
I am aware that due to gibbs phenomenon, ripples are induced at the vicinity of transition in the frequency response of a filter and ripples occur in frequency domain when there are discontinuities in the time domain signal.

Now my doubt is how and why discontinuities are present in time domain signal?

Is it due to periodic extension of aperiodic signal in time domain to compute DFT?

please correct me if I am wrong in my understanding and provide an explanation.

Thanks!!


texts:
I just studied an implementation (Matlab) of a windowed FFT and saw the following line of code:

w = sqrt(hann(fft_length, 'periodic'))

and later:

spectogram(:, column) = fft(ringbuffer.*w, fft_length) %why .*w ?

The ringbuffer obviously contains the current frame of the signal and the overlap so its's obvious to me that this needs to be multiplied with the Hanning Window  but why is the square-root being taken first?


texts: How to remove noise using mean and median filters?

texts:
I can remove the noise using moving average filter. The MATLAB code is shown bellow.

But how can I remove the noise using mean and meadian filters?


texts: Hilbert Transformer processing block by block

texts:
I am processing audio and trying to obtain a 90º phase shift when processing block by block.

I have implemented a Hilbert Transformer (from Lyon's 3rd. Ed. & MATLAB). MATLAB code below (I believe this is similar to what MATLAB hilbert does).

function result = my_hilbert(s)
    fprintf("Using My Hilbert\n");
    n = length(s)

    %fftLength = 2 ^ nextpow2(2 * n - 1);
    fftLength = n

    H = zeros(1, fftLength);
    H(1) = 1;
    H(2:n / 2) = 2;
    H(n / 2 + 1) = 1;

    x = zeros(1, fftLength);
    x(1:n) = s
    X = fft(x)

    Y = X .* H
    y = ifft(Y)

    result = y(1:n);
end

This implementation seems to assume one is processing the complete audio stream in a single call.

I need to be able to achieve a phase shift but will be processing one block (block size between 1024 and 2048 samples) at a time.

When I simply call this implementation on each block I receive audible pops around the block boundaries.

I have considered overlap+add but when using an FFT length other than length of the input, the results are no longer the same as MATLAB's hilbert() function.

How can one obtain a 90º phase shift when processing block by block without these discontinuities?


texts: How mic setting will affect audio classification model?

texts:
I have audio samples with three classes :

100 audio samples : class 'A'
100 audio samples : class 'B'
100 audio samples : class 'C'

Class 'A' and Class 'B' audio samples are recorded from one phone mic with same setting ( distance, volume etc ) but class 'C' samples are from different phone mic, ( each audio sample is from different phone mic )

I am working on a ML classifier to classify all three audio classes. My question is if I downsample all the audio signals to one frequency (i.e 16 kHz)

Will model still be biased because of different phone mic?
What affects model will face because of different phone mic and what is
the better solution for this problem other than downsampling to same frequency ?


texts: How do I smooth-over transition from a time-series generated by one system to a time-series generated by another system?

texts:
So I have generated a time-series with length on 2N samples, where the first N are generated by one auto-regressive system and the N+1 to 2N are generated by another, similar, auto-regressive system.

Here's a picture of the transition itself:

So, around time-point 250, I have few of those small blue peaks, but what I want is a more-or-less smooth transition, as marked in red.

Any ideas on how I could achieve that, without damaging the rest of the signal?


texts: Simulating room impulse response between rooms

texts:
I want to simulate a sound source in one room and a microphone in a second, adjacent room. I am familiar with the image method and Habet's very efficient implementation for room impulse response (RIR). This implementation will be problematic when the source is in another, second room. However, the limitations of the image method for rectangular rooms and frequency constant reflection coefficients are good enough for me as it is a simulation.
AS I wish to simulate a large number of examples (~1000) so measuring an RIR is not an option and an inaccurate, fast simulation method is good enough.
I also found this paper but I could find no implementation available. This implies that it is possible to simulate though I am not sure.
I am looking for an implementation of an RIR generator for coupled rooms or another quick solution. I wish to spend as little time as possible on learning the inside of the generation method, as it is not my goal, so another tool\method with a good tutorial and fast ramp-up will be also very helpful.
Can anyone recommend the shortest way to achieve this?


texts: GNU Radio | Packet Encoder/Decoder alternative

texts: Are there any alternatives for packet encoder/decoder (deprecated) in gnuradio3.8.0.0 ?


texts: Speech Activity Detection- Adhoc Problem with multi source sounds(birds,trees,heavy air) and how to eliminate them completely

texts:
Here i will first try to put my application agenda

  Typically i am sampling at 8Khz rate and filtering speech components using a BPF(digital)
  now i have got the 0-4Khz components in which essentially <250Hz are not speech so i will eliminate them also
  now i am trying to find out entropy of frame and trying to mark respective frames as voice or non voice if they belong to band 250<=f<=3750 Hz

so now the problem is while i was doing this at my realtime application side there also non human sounds like birds sound or a ringing of a bell which again fall in to the frequency band i am flagging as speech

so this causes a false alarm of speech even in case of bird sound and bell ringing how to really over come this problem

what else i can try to do for effectvie speech activity detection


texts:
I have an image with size $256*256$ then i get the Fourier transform of the image, If i only take the central region of the Fourier transform whose size is $64*64$ and get the inverse FT ,What is the effect on the output image$(64*64)$?

Down-sampling, Blurring, or both.


texts: How do I combine a copy of a signal with the original to achieve a chorus effect in a .wav file using Python?

texts:
Can you please explain or point the right way to think about how to implement two sound effects in a .wav file.

So I read a .wav file and converted it to int values (in numpy array)

array([59383, 58290, 60629, ..., 52606, 51982, 56274], dtype=uint16)

First, I am not sure I am clear about what these values in array really represent.
Is it correct that every value is one out of 65535  ( unsigned int16 ) magnitude levels that analog output device will produce in some moment in time?

In theory chorus effect could be achieved by following steps:

Make copy of original array
Weaken this copied array ( multiplying by some value < 1 )
Add this copied array to original one

In practice I don't know how to add them correctly. Should I simply add values one by one, make a convolution of the two arrays or interleave original array and its modified copy?

Also a chorus effect should have an arbitrary  time delay  and I don't know how to accomplish this.

How could I implement that randomization of the time delay for the data I am about to add?


texts: I have a graph where I need to find a particular point based on sampling

texts:
I currently have a graph which looks something like this:

Now I have discrete data that represents the Number of Clusters(the x values), giving us the Average Cluster Distance (the y values). There is only a single elbow point, after which the values just descend to 0. Finally, I do know the maximum amount that K can take (the x domain). Based on this I have three questions:

Is there a way I can find the value of the elbow point through differentials (first or second order)?
In which case, what is the smallest sampling rate that will allow me to get a graph with the desired characteristics? I don't care too much about the accuracy as of right now (though I would like to know some kind of a tool that lets me measure the error). If I cannot use differentials, I am still interested in understanding how I could recreate the graph with the lowest sampling rate, and thus find the elbow point with the least amount of processing (For E.g. Nyquist Theorem, I would have 1/2 the amount of elements and still recreate the signal).
Finally, would incorporating random selection into the selection of the signal help me in any way?


texts: Comparison of SNR achieved by different weighting schemes

texts:
I am reading a paper about High Dynamic Range (HDR) reconstruction. One of the core problems there is how to reconstruct pixel irradiance from multiple observations. Typically, weighted averaging is used; a number of weighting schemes were presented in the literature. In the mentioned paper they evaluate different weighting schemes by comparing their achieved signal-to-noise ratios. I do not understand how exactly this comparison is done.

The outlined approach is as follows. There is a pre-recorded set of images. First, using a reference method, "ground truth" reconstruction $\mu_X$ and its "optimal" variance $\sigma_{\mu_X}^{2(opt)}$ are computed. Then, for every scheme, weighted mean $\hat{\mu}_X$ and its variance $\sigma_{\hat{\mu}_X}^{2(w)}$ are calculated. Finally, they go on to say:

  From $\sigma_{\hat{\mu}_X}^{(w)}$, the ground truth HDR image $\mu_X$, and the bias $(\mu_X - \hat{\mu}_X)$, we compute the signal-to-noise ratio achieved by each weighting.

Unfortunately, no formula is given. I know that in imaging, SNR is defined as $\frac{\mu}{\sigma}$. But how exactly they incorporate bias there?

In principle, one can just compute $\mathrm{SNR}^{(w)}=\frac{\hat{\mu}_X}{\sigma_{\hat{\mu}_X}^{(w)}}$ for each scheme and compare them. However, it does not feel right, because it does not take into account how close the computed mean is to the ground truth.

So my question is: which formula they use? Or, more generally, how to compare SNR of different weighting schemes, given that ground truth signal is known.


texts:
I'm trying to understand how to derive the BEP for 8PSK by geometrically looking at the decision regions.

Say I have this 8PSK signal set and the corresponding decision boundaries.

I assume that '000' is sent, and I want to calculate the BEP. So I have

$$P_b(e) = \frac{1}{3}(1 \times R_1 + 1 \times R_2 + 2 \times R_3 + 1 \times R_4 + 2 \times R_5 + 2 \times R_6 + 3 \times R_7)$$

Since $R_1 = R_4$, $R_3 = R_5$ and $R_2 = R_7$ by symmetry, the above can be simplified to

$$P_b(e) = \frac{2}{3}(R_1 + 2R_2 + 2R_3 + R_6)$$

Then we have

$$R_1 + R_2 + R_3 + R_6 = P\Big(n > d_1\sin\frac{\pi}{8}\Big)\tag{1}$$

and

$$R_2 + R_3 = P\Big(n_0 > d_1\sin\frac{3\pi}{8}\Big) \times P\Big(n_1 < d_1\sin\frac{\pi}{8}\Big)\tag{2}$$

I'm having a hard time visualizing and understanding how $(1)$ and $(2)$ are obtained.

I understand that $n$ is the noise vector, and $n_0$ and $n_1$ are the horizontal and vertical components of the noise vector, and we are trying to find out how far $n$ or $n_0$ and $n_1$ will go to "push" the signal into the wrong decision region.

I've seen the following from this website, and it seems to explain $(1)$, that is, the noise vector $n$ "pushes" the signal past the decision line (dl) into the wrong decision regions $R_1 + R_2 + R_3 + R_6$.

But what about $(2)$? I don't know why we have $\sin\frac{3\pi}{8}$ and $\sin\frac\pi8$.

Also, is the noise vector always perpendicular to the decision boundaries?


texts: Impulse response of a system in z domain

texts:
The question 3-23 in the "Discrete-Time Signal Processing - Second Edition" is:

and the solution is:

I cannot understand the solution.  In the second row of the answer when I multiply (-4)  with this denominator:

and then add the result to:

it gives a result different from the numerator of the first row. This multiplication must be equal to

Which is not. Is this solution true? If yes, can anyone help me to understand if?


texts: Extracting filter coefficients from raised-cosine frequency response

texts:
The frequency response of filter transfer function is given as

$$H(j\omega)=
\begin{cases}
0 &, \textrm{if }\quad (1+r)\frac{\pi}{2} < \lvert \omega \rvert < \pi  \\
 1 + \cos \left ( \frac{\pi}{2r}\left ( \frac{\lvert 2\omega \rvert}{\pi} + r-1 \right ) \right ) &, \textrm{if }\quad (1-r)\frac{\pi}{2} < \lvert \omega \rvert\leq  (1+r)\frac{\pi}{2}\\
 2&, \textrm{if }\quad \lvert \omega \rvert\leq (1-r)\frac{\pi}{2}
\end{cases}
$$

where $r = 0.1$.
I need to extract filter coefficients for the given FIR filter response or order $24$. How can I perform the task using MATLAB?


texts:
I am trying to make proper use of the circular convolution property of DFT.
I was taught that the DFT of x[n]*CircularConv*y[n], would be equal the product of the individual DFT's X[k],Y[k].

On the problem im trying to solve, the signal x[n] is convolved (Circular convolution) with the discrete impulse response y[n] to produce the output signal z[n].   (x[n]*y[n]=z[n])
Having the signals z[n],y[n]+their DFT's, and using the property mentioned above,
can I conclude that X[k]=Z[k]/Y[k] immediately? are there any limitations? or am I doing it totally wrong?


texts:
I need to solve this three exercises:
$$G_1(s) = \frac{1}{s}$$

$$G_2(s) = \frac{1}{s^2}$$

$$G_3(s) = \frac{1}{s^3}$$

This is what I did:

For the single pole ($1/s$), magnitude of A is $\infty$ and phase is 0

For the single pole ($1/s$), magnitude of B is $\infty$ and phase is -45

For the single pole ($1/s$), magnitude of C is $\infty$ and phase is -90

For the 2 poles one ($1/s^2$), magnitude of A is $\infty$ and phase is 0

For the 2 poles one ($1/s^2$), magnitude of B is $\infty$ and phase is -90 ($=2*(-45)$)

For the 2 poles one ($1/s^2$), magnitude of C is $\infty$ and phase is -180 ($=2*(-90)$)

For the 3 poles one ($1/s^3$), magnitude of A is $\infty$ and phase is 0

For the 3 poles one ($1/s^3$), magnitude of B is $\infty$ and phase is -135 ($=3*(-45)$)

For the 3 poles one ($1/s^3$), magnitude of C is $\infty$ and phase is -270 ($=3*(-90)$)

MATLAB can't do these Nyquist analysis in a correct way. That's why I'm asking here.

Thanks


texts: How do I rotate a warping grid without changing the warped image's orientation?

texts:
I have a warping grid, that has to be applied to an image. When I apply the grid, I get the results I expect.

Now, I want to apply the same grid to the same image, but the image is modified in the following way: it is rotated 270 degrees counterclockwise.

The grid is stored in memory as an array of points. It is [-1, -1] - [1, 1] normalized. I am trying to rotate the whole thing around the origin, that is [0, 0] id est the center of the image. Also, I am trying to rotate in discrete steps of 90 degrees.

P1 P2 P3

P4 P5 P6

P7 P8 P9

These are destination coordinates of the points in the image. For example, the lower right corner of the input image has coordinates of [1,1]. In the output image, this point is moved to [P9.x, P9.y] (a.k.a. forward mapping).

I transpose the matrix:

P1 P4 P7

P2 P5 P8

P3 P6 P9

Then I apply to every point the transformation

x = y'

y = -x',

where ' denotes old coordinate and lack of prime denotes new coordinate. I apply the derived grid to the rotate

However, I do not get the expected warp. This task seemed incredibly simple to me, but I find myself struggling with the strange behaviour for a third day. Could someone point out my mistake or a procedure to get things right?


texts: Beam pattern for a linear array comprised of rectangular transducers

texts:
I am looking for the beam pattern of a linear array with uniform spacing, $d$, between $n$ elements.
I know for an array comprised of circular pistons it can be derived from

$$\frac{1}{n}\frac{\sin[n\pi\frac{d}{\lambda}(\sin\theta-\sin\theta_s)]}{\sin[\pi\frac{d}{\lambda}(\sin\theta-\sin\theta_s)]}$$

where $\lambda$ is the wavelength. And it is a narrowband system.
I appreciate if you can provide a reference book and describe how I can derive the beam pattern for the particular case of rectangular elements.


texts: Is Gabor uncertainty a feature of the Fourier transform, or of nature?

texts:
By Gabor uncertainty, I mean the principle of uncertainty as applied to signals — with the result that you can't have arbitrary time and frequency localization.

By way of background to my question, I wrote about this recently in a blog post. In the last paragraph, I stated:

  Signals do not have arbitrarily precise time and frequency
  localization. It doesn’t matter how you compute a spectrum, if you
  want time information, you must pay for it with frequency information.

The point here is that, as I understand it, this uncertainty is an irreducible property of signals. It is not a 'feature' (or bug) in the Fourier transform or mathematics generally. And you can't get around it by using non-Fourier methods like matching pursuit.

I'm now unsure this is really true. Someone wrote to me recently:

  ...the uncertainty is there because of the math, not nature. A
  'signal' is a mathematical construct... The timing information of a
  signal is in the phase, and for a short-lived pure tone you can
  exactly recover the timing and frequency from the temporal phase.

I guess I buy this. But when we're measuring unknown, real, broadband, noisy signals does it still hold?


texts: How to determine a suitable threshold when using amplitude thresholding method for spike detection?

texts:
I have seen number of approaches that have been introduced in the literature for spike detection including, amplitude thresholding method, Nonlinear Energy Operator method, and template matching method. However, If I am to use the amplitude thresholding method, how can I identify a suitable threshold value for my dataset? I have seen several works using this threshold to be X times the standard deviation above the mean noise level. But this X seems to be different from one study to another. For example, commonly used values are 5, 5.5, and 6.
My question is how can I determine a suitable X for my dataset? My dataset is a set of MEA recordings taken from organoids in which I do not have any prior knowledge about neuron firing.


texts: What are the implications of resampling the derivative of a signal with a higher frequency than the original signal?

texts:
Suppose I have a digital signal measured with sampling time, $T_s=1$ sec. If I take it's derivative, it will, naturally have $T_s=1$ sec. But what are the implications  if I re-sample this derivative to have a lower sampling time, such as $T_s=0.1$ sec?

For example, how is the accuracy or representatives of the derivative influenced by re-sampling?


texts: Recommended literature to learn essential aspects of signals and its propagation

texts:
Where can I learn about signal's features. For instance mean, power, amplitude, frequency, energy,  how they propagate in space or any other medium?.

What power means its amplitude increases and decreases to draw the sine wave form through a bit of time. at stable value (forming logical message) depending on medium resistance and transmitting signal power, human code model frequently repeated (hi) started with character ends with another completed word (world) another word stared with a header and ends with trailer completed word.

out of electricity network that it out of control compared with communication signals networks even both of them propagate as a flood of electrons in cables, i need to know its shape in a medium, MW or Electromagnetic waves or in cables.
voice fades away at the moment you shot a word. you already carried it on a carrier to reach ear of who you talk to but at low power so that its power and frequency decreased and lose its shape at a point seems to be disappeared or absorbed to be converted to another shape of energy.

We carries it on a carrier varies depending on the medium converting carrier to cover all values voice reach as possible, more values means more quality. filtering the result to get carrier and voice met points.

just comments needed, books and papers.


texts: A very basic question about processing high frequency signals

texts:
A standard frequency for a modern computer processor is 1-3 GHz.
The frequency of a GPS signal is ~1.5 GHz.
My question is how is it possible for a computer to do anything at all with a signal that it can only sample once or twice in a period?


texts: Is the following system stable and causal?

texts:
Suppose the following function describes the unit step response of a system, where $u[n]$ is the unit step function.
$$
y[n]=\left(\frac{1}{2}\right)^{n-1}u[n+1]
$$
I want to find out the system function and if the system is stable and causal. My first step is to calculate $Y(z)$.
$$
\begin{align}
Y(z)&=\sum_{n=-\infty}^{\infty}y[n]z^{-n}\\
&=\sum_{n=-\infty}^{\infty} \left(\frac{1}{2}\right)^{n-1}u[n+1] z^{-n}\\
&=2\sum_{n=-1}^{\infty}\left(\frac{0.5}{z}\right)^n\\
&=2\left( \frac{1}{1-0.5z^{-1}}+\frac{z}{0.5} \right)\\
&=\frac{4z^2}{z-0.5}
\end{align}
$$

Above I exploited the fact that I can form a geometric series which converges for $|z|> \frac{1}{2}$. Now calculating $H(z)$ is straight forward, since we know the input is $u[n]$.
$$
H(z)=\frac{Y(z)}{X(z)}=\frac{\displaystyle \frac{4z^2}{z-0.5}}{\displaystyle \frac{z}{z-1}}=\frac{4z(z-1)}{z-0.5}
$$

We see that the system has two zeroes,  $z_{0,1}=0$ and $z_{0,2}=1$, as well as one pole at $z_{\infty,1}=0.5$.

My last step was calculating the impulse response for this system.
$$
\begin{align}
H(z)&=\frac{4z^2}{z-0.5}-4\frac{z}{z-0.5} \\
h[n]&=\left(\frac{1}{2}\right)^{n-1}u[n+1]-4\left(\frac{1}{2}\right)^nu[n]
\end{align}
$$

From the above calculations I want to find out if the system is stable and causal. To see if it is causal I need to check if the impulse response disappears for negative time indices. Well, that is not the case, since $h[-1]=0.5^{-2}=4$. That means we have an acausal system, where the region of convergence (ROC) lies in between $|z|=0$ and $|z|=\frac{1}{2}$. Therefore, the system is also not stable, since the unit circle is not in the ROC.

Here I am getting confused: The system converges for $|z|<\frac{1}{2}$, but for calculating $Y(z)$ $|z|$ must be greater than $\frac{1}{2}$. How can that be? Are my calculations and thought process correct?


texts: Seamless audio loops via Fourier transforms?

texts:
I am trying to create short seamless loops of continuous sound.

I recorded myself making an "Aaaaah" sound at 44.1 KHz, and cut this recording to a section containing 4096 samples (giving me slightly under 1/10th of a second of audio).

When I play this in a loop, the sound is very much recognizable but there is of  course an audible ticking noise at the point where it is cut.

I applied an FFT transform to this data. When I apply an inverse FFT to the Fourier tables to recreate the signal, the defect is of course still audible.

Is there anything I can do to the Fourier tables to eliminate the defect without changing the other audible properties of the recording? I'm very much uneducated in signal processing, but intuitively I feel that since the ticking sound repeats once per loop, it might be possible to work in the frequency domain to achieve my goal of cleaning it up to produce a seamless continuous sound.

Note: In case there are Javascript programmers here, I created a CodePen here with the "Aaah" loop and its conversion to and from Fourier tables, to facilitate experimentation in code.


texts: How is the number of amplitude levels decided in modulation techniques?

texts:
For M-QAM modulation, where e.g. $M = 64$ there are 8 amplitude levels. Each level is represented by a symbol that is further represented by bits through the relation:
$$b=\log_2(M)$$
This means that each symbol is encoded by $b$ bits.

I don't quite understand where 64 comes. Does it mean that the imaginary and real component are included ($8\cdot 8$) ?
For other modulation methods such as 16-QAM, where is the 16 coming from?


texts:
I am analysing a wave with a timespan $\tau$ and after applying the fft I obtain the following plot of the coefficients

I assume that the peak at $t=1$ followed by smaller coefficients means that the wave has just one frequency, which is near $\frac{1}{\tau}$. Nevertheless, I would not expect a zero coefficient for 0Hz. What can be causing that zero coefficient? Is my interpretation wrong?.


texts: Calculation of an impulse response of h[n]

texts:
I am currently looking at the z-transform and am using a great youtube reference to help me, however I am struggling on some basic step. How do I get the impulse response array of h[n] = [ ... ] shown in the lecture at the following URL - https://www.youtube.com/watch?v=dEJp46SFgV4&ab_channel=DavidDorran

I can do the following which I believe to be correct but do not know how to get the array out as shown in purple.


texts: Explain the relationship between Tikhonov regularization, SVD , least squres, and the Wiener filter

texts:
I found in the
Wikipedia site for Tikhonov regularization
that the SVD for a Tikhonov regularized problem take us to the least squares regularized solution:
\begin{eqnarray}
\hat{x}= V D U^T b,
\end{eqnarray}
with
\begin{eqnarray}
D_{ii} = \frac{\sigma_i}{\sigma_i^2 + \alpha^2}
\end{eqnarray}
They call $f_i=D_{ii}$ the Wiener weights. Here $\sigma_i$ are the singular values and $\alpha$ is the Tikhnov regularization parameter for the Tikhonov matrix $\Gamma = \alpha I$.
I do not see any connection for the filter coefficients $f_i$ and Wiener filtering as it is done in signal processing.  Any ideas?


texts: How would I go about detecting and following edges in time lapse data?

texts:
I have a time lapse movie from a specimen and would like to trace the cell wall movements, but I'm not sure how to. By eye, following the cell wall is fairly easy but it seems computationally quite difficult. I was looking into Caffe and deep learning networks, but the tutorials seem more about finding a pattern in images, not so much about tracing data within a movie. If someone can provide me some pointers on how to go about my data that would be great.

Here is a link to an example movie: Example Movie

I'm only interested in the movements of the outer wall, as indicated here:


texts: Error correcting code? - using RGB space with a lookup table

texts:
This problem could be thought about as how to transmit a signal with 3x8bit RGB in a way that is robust to the distortion of antialiasing blends colors.
The context: I need to rewrite a short utility library, to get it working with the Brave browser (My actual question isn't about brave per se.)
canvas-color-tracker - example of it being used and src/index.js  is short
The HTML canvas is used for mouse over and clicks to determine what object is under the cursor.
To use it with circles, you register your circle to get a color, then draw the circle in that color. Then to determine what is under the cursor, you get the color with getImageData.
The trouble is what to do about anti-aliasing, the browser doesn't allow that to be turned off, and I want to be able to return nothing rather than collide with another uninvolved circle when it's edges blend into another color)

Assuming the anti-aliasing blends linearly How to create an ordering of points in 8bit RGB space, such that the minimum number of points are colinear without knowing the final total number of points? What is a reasonable heuristic for this?

Addendum, I am doing this because Brave will choose a color channel at random and randomly vary the lowest bit of it - bit fiddling as a privacy feature prevent fingerprinting.


texts: Intuition of Location on the Conic Axis TDOA solution

texts:
In an old paper "A New Approach to Geometry of Range Difference Location", there is a mathematical derivation that does not include any mention of the relationship to the underlying problem. In the problem, there are 3 receivers (at $(x_1, y_1)$, $(x_2, y_2)$, and $(x_3, y_3)$) and a transmitter at unknown position $(x_0, y_0)$. We also know the range difference (computed from the time difference of arrival) between each pair of receivers ($\Delta_mn = r_n - r_m$).

The derivation starts by writing the distance (range) from each receiver to the unknown transmitter location as:

$$r_i^2 = (x_0 - x_i)^2 + (y_0 - y_i)^2$$

So far so good. However, the next step only says "Then, $r_j^2 - r_i^2 = \Delta_{ij} (r_i + r_j)$"

The author goes on to show more manipulations to get to the point he is trying to show.

It seems like you can apply the "difference of squares" factorization to $r_j^2 - r_i^2$ to obtain $(r_j-r_i)(r_j+r_i)$ (where $r_j - r_i$ is exactly $\Delta_{ij}$), but what I don't understand is the meaning of $r_j^2 - r_i^2 = \Delta_{ij} (r_i + r_j)$. That is, why is the difference of squared distances from the transmitter to two receivers related to the sum of the distances from the transmitter to the two receivers (besides "because we happened to subtract two things and then find a factorization that happened to contain a term we know)? Does anyone have any insight on this? Perhaps a way to explain this using some kind of triangle theorem in a diagram?


texts:
On the transmit side, I have a 20 MHz carrier frequency carrying a signal with bandwidth of 40 MHz (so 0 Hz to 40 MHz, center at 20 MHz).

On the receive side, I have a dual channel ADC with each channel sampling at 40 MS/s (channel 1 samples at 40 MS/s, channel 2 samples at 40 MS/s). The hardware is setup to input I and Q into the two channels.

Am I able to properly sample the received signal, without aliasing? I saw that this was discussed before ("Complex sampling" can break Nyquist?), and the answer seemed to be "BW = fs because you get the negative frequencies", and I'm not 100% sure if the "negative frequencies" thing is a caveat, or I can just do the math as if I am getting 80 MS/s (which I technically am), so I drummed up this numerical example.


texts: Calculate cutoff frequency of filtered data

texts:
I am processing data which was put through a low pass filter at some point. Looking at the FFT, I can see that it is less than the Nyquist rate. I am trying to filter another set of data so that the spectral content will be better matched.

Is there a good way to calculate the cutoff frequency or bandwidth of data? I know I can just look at the FFT and eyeball it, but I would like to be able to do this repeatedly for different sets of data. I am using MATLAB, so any included functions could be useful.

One thought I had was to smooth out the spectrum data and apply thresholds to detect the upper and lower ends of the crossover region. This could definitely work, but I feel like there should be a more elegant solution out there.

Here are some example plots of the entire spectrum, and zoomed in on the knee. All of the data files have similar spectra, but with different sampling rates and different cutoff frequencies.


texts:
For application of syncing sampling clock phase to carrier phase of received signal where the received signal is sampled with 10 times the carrier phase and modulated with the PSK shown in the figure (Baud rate up to 0.5*fc)

I had many ideas to apply on my system (where interpolation is not possible) and I need your help figuring out which is the best:

Timing Error Delay: most proposed algorithms require interpolation
Hilbert filter:where generating I/Q requires shifting 2.5 samples or Fractional Delay Filter (where I need help with determining the best FIR implementation of such a filter)
thanks in advance


texts: Operations applied to functions in time domain and frequency domain

texts:
I am trying to make a succinct summary of how algebraic operations in the time domain translate in the frequency domain (via the use of Fourrier/Laplace transforms). Here is what I have derived so far:

Time Domain                       Frequency Domain
Summation/superposition   Summation/superposition
Time Delay                        Frequency shift
Integration/Differentiation  Multiplication/Division      Multiplication/Division        Addition/Substraction        Convolution/DeconvolutionMultiplication/Division

However, I have noticed that if summation/superposition is the same in time and frequency domain, how can multiplication and division in time domain yield addition and subtraction in frequency domain. I also noticed that convolution in time domain results in multiplication in frequency domain so line 4 of the table looks wrong also...

Can someone clear this up or maybe provide a better summary of the different operations in time domain and how they translate in frequency domain?

Somewhat-related question: link.


texts: Why Convolve instead of Cross-Correlate for Detection of Known Signal?

texts:
I am reading a journal on optimal signal detection by mobile sensor. It is mentioned:

  How should we plan to robots’ motion in order to maximize the detection probability? Assuming the source emits a known signal, the optimal detection algorithm is a matched filter (i.e., convolve the known waveform with the received signal and threshold).

Question: Why should we perform convolution of the known signal with the observed signal instead of cross-correlating the two, which shall detect the presence of similar patterns?


texts: Parseval's Theorm and Effective Bandwidth

texts:
This question says that RMS bandwidth (effective bandwidth) is defined based on the carrier frequency of a signal.  This makes intuitive sense to me that the carrier frequency shouldn't determine the value of the RMS bandwidth, just the pulse shape.  However looking at Parseval's Theorem it is not immediately clear to me that upconversion of a signal to bandpass plays out in this way.  For example let $x(t)$ be a low pass signal with energy from -B to B in the frequency domain and let

$$s(t) = x(t)\cos(2\pi f_c t).$$

Then from Parseval's Theorem we have
$$\int_{0}^{\infty}\bigg(\frac{\partial s(t)}{\partial t}\bigg)^2 dt = \int_{-\infty}^{\infty} f^2|S(f)|^2 df$$
$$= \int_{-(f_c + B)}^{-(f_c - B)} f^2 |X(f)|^2 df + \int_{f_c - B}^{f_c + B} f^2 |X(f)|^2 df$$

which leads me to believe that the energy relies upon the carrier frequency.  What am I missing here?  Please forgive any scaling factors, I'm concerned with the general behavior not if there is a constant multiplier.  Thanks!


texts: Issue with the Massberg Analog-Matched Low Pass Filter

texts:
Implemented the filter mentioned in title using Octave and couple sources Vicanek and Zeitlin (LPF.cpp). Got filter working otherwise but, ... when tested the responses against 'analog model' of the LP filter I noticed there an issue with range of Q values starting from >sqrt(0.5) to close ~2.0. Here are few plots showing the issue:

What/where is the problem?
EDIT:
Looks like the issue is in Omega_s calculation where Vicanek and Zeitlin uses
Q > sqrt(0.5)

as condition value when it should be
Q > sqrt(5)

instead. At least after making this change responses looks more OK:

(various Q values used with various cutoff frequencies, (500hz/0.4, 1k/0.707, 4k/4, 7k/6 and 12k/12))
... but, is it OK, because of this change I did (and more) has been corrected already once by Will Pirkle in Designing Audio Effect Plug-Ins in C++, With Digital Audio Signal Processing Theory (errata):

There is an error in the calculation of the g1, gz and gp coefficients
for the Massberg LPF, second order only. There is also an error in the
check for Q, it should reference the square root of 0.5, not 5.0. See
the Bonus Projects on the Projects Page for the complete code for this
LPF with corrections. Thanks to astute readers Christian Floisand and
Ernst Oosterveld for finding and reporting this! The fully corrected
equations are here .

Any suggestions which is the issue there?
Has anyone got implemented this filter with success by just following either those two sources I mention or the W. Prikle book (with or without the corrected code)?


texts: Why is random noise amplitude inversely proporional to the frequency?

texts:
http://astarte.csustan.edu/~tom/SFI-CSSS/info-theory/info-lec.pdf compares a bacteria DNA vs a random string:

  My first step was to generate for myself a "random genome" of
  comparable size to compare things with. In this case, I simply used
  the Unix `random' function to generate a file containing a random
  sequence of about 4 million A, C, G, T. In the actual genome, these
  letters stand for the nucleotides adenine, cytosine, guanine, and
  thymine.

  We want to find "interesting" sections (and features) of a genome. As a
  starting place, we can slide a "window" over the genome, and estimate
  the entropy within the window. The plot below shows the entropy
  estimates for the E. coli genome, within a window of size 6561 (= 3^8
  ). The window is slid in steps of size 81 (= 3^4 ). This results in
  57,194 values, one for each placement of the window. For comparison,
  the values for a "random" genome are also shown.

  At this level, we can make the simple observation that the actual
  genome values are quite different from the comparative random string.
  The values for E. coli range from about 5.8 to about
  5.96, while the random values are clustered quite closely above 5.99 (the maximum possible is log2 (64) = 6).

  There are various "data massage" techniques we could use. For example,
  we could take the fourier transform of the entropy estimates, and
  explore that. Below is an example of such a fourier transform. Notice
  that it has some interesting "periodic" features which might be worth
  exploring. It is also interesting to note that the fourier

  transform of the entropy of a "random" genome has the shape of
  approximately $1/f = 1/f^1$ (not unexpected), whereas the E. coli
  data are closer to $1/f^{1.5}$

I must draw you attention that the fourier transform is applied to the entropy rather than to the random signal itself. Why is it expected that resulting spectrum is pink rather than absolutely random? I do not understand why it is expected that the random frequency amplitude is inverse to the frequency, why not $amplitude=1/freq^{1.5}$? The higher low frequencies mean that the next number has higher probability to be closer to the current one and random is not quite random, right?

I have also noted that, in the end of the book, author says that "random" is naturally band-limited by the power law, $1/f^\alpha,$  and, in SETI project, we better watch after the white noise because optimal use of the channel is a sign of intelligent life.


texts:
I have a complex signal in the time domain normally distributed. What will be its distribution in the frequency domain?
I assumed since the frequency domain is a linear transformation the distribution will not change.


texts: External/Internal Description of a System

texts: When an LTI system is NOT completely controllable/observable, does the linear differential equation governing the system give the internal or the external description of a system?


texts: What is the importance of signal bandwidth in radar systems for velocity and localization estimation

texts:
So I know about the basics of doppler shift which relates the velocity of a moving object with the frequency carrier shift seen at the reciever.
But, I don't understand the importance of the transmitted signal bandwidth to the process?
I can use the same the same carrier frequency but with different BW...
Any clarification please?
Thanks