texts: Why does my GAIN remain constant after a few cycles?

texts:
I am assuming that GAIN is the matrix P?

From this example:

function [x,P]=ukf(fstate,x,P,hmeas,z,Q,R)
% UKF   Unscented Kalman Filter for nonlinear dynamic systems
% [x, P] = ukf(f,x,P,h,z,Q,R) returns state estimate, x and state covariance, P
% for nonlinear dynamic system (for simplicity, noises are assumed as additive):
%           x_k+1 = f(x_k) + w_k
%           z_k   = h(x_k) + v_k
% where w ~ N(0,Q) meaning w is gaussian noise with covariance Q
%       v ~ N(0,R) meaning v is gaussian noise with covariance R
% Inputs:   f: function handle for f(x)
%           x: "a priori" state estimate
%           P: "a priori" estimated state covariance
%           h: fanction handle for h(x)
%           z: current measurement
%           Q: process noise covariance
%           R: measurement noise covariance
% Output:   x: "a posteriori" state estimate
%           P: "a posteriori" state covariance

I plot P[0,0] is that correct?


texts:
The implementation of QPSK requires 2 orthogonal basis.

So when using root raise cosine filter to implement QPSK, what is the 2 orthogonal signals?


texts: Examples of cases where "invariance to transformation" on signal is important

texts:
I realize that this might not be the most well-formulated question, but I figured I'd throw it out there as an open-ended discussion that could turn up some interesting input.

I'm relatively new to speech processing, and came across the statement "invariance to transformation is important in many speech engineering tasks" in a paper I'm reading.

I was wondering if anyone could provide any specific examples that could illustrate what exactly this means. The word transformation to me is a bit ambiguous, maybe because I'm relatively new to this particular field, but I was hoping that this statement is a little more obvious to someone else out there who is more familiar with the field.


texts: Confusion in property of Z transform of ideal sampled waveform

texts:
I was reading about z transfom of ideal  sampled signals and  one of the properties of Z transform of sampled signal that surprised me,here it is (image)
So here this  property of Z transform is quite unusual compare to  the property we use for discrete time signals (there we differentiate with respect to z) .
How this property can be proved mathematically (even a hint ) and why its not differentiated with respect to z as we generally do


texts:
I am not too familiar with phase-related problems so I need some suggestions or corrections in a problem that might be an old but easy one. Here is my problem: given a complex signal:
$$y(t) = e^{j\phi(t)}$$
where $\phi(t)$ is the instantaneous phase. Now we have the observations $y(t)$. Can we somehow reconstruct $\phi(t)$?

I understand the phase will be wrapped into $-\pi$ to $\pi$ when we calculate the phase from $y(t)$. For example, let $\phi(t) = 130t+150t^2 + 0.2, t\in[0,1]$ with a sampling frequency $f = 512$. When I try to reconstruct the phase from $y(t)$ using unwrap(angle(y(t))) in Matlab, i.e., the unwrapped phase, the result is shown in the following figure:

The second example is that $\phi(t) = 450t-100t^3 + 0.2, t\in[0,1]$. The result is

The reconstructed phases are different from the original ones. Does this mean that the phase cannot be uniquely reconstructed? Could anyone show me some explanations or suggestions? Thank you!

Edit: the code is as follows.

clear all
clc
N = 512;
t = (0:N-1)/N;
% phi = (130*t + 150*t.^2) + 0.2;
phi = (450*t - 100*t.^3) + 0.2;
s = exp(2*pi*1i*phi);
phase_rcst = unwrap(angle(s))/(2*pi);
figure
subplot(2,1,1)
plot(phi)
title('Phase of the original signal')
subplot(2,1,2)
plot(phase_rcst)
title('Unwrapped phase')


texts: 16 bit PCM Audio Sounds Like Bit Crushing

texts:
I'm developing an Android app which uses USB soundcard for input and output. The audio processes are in the native (C++) side.

The device's bit resolution is 16. I get the audio stream from the device as unsigned char* and have to convert them to float between -1.0f and +1.0f to process.

I do the conversion but it sounds like bit crushing effect if I increase the volume of input.

Here is what I do when converting:

For Input Conversion:

/*** buffer is an array of float ***/
/*** temp_buffer_in is the buffer coming from the device ***/

float divider = (float) std::pow(2, (BIT_RESOLUTION_IN - 1));
int BYTE_RESOLUTION_IN = BIT_RESOLUTION_IN / (sizeof(char) * 8);
int bytes = buffer_size * BYTE_RESOLUTION_IN; //Buffer size in bytes

for (i = 0, j = 0; i < bytes; i += BYTE_RESOLUTION_IN, j++) {

    UnionInteger16 union_int; // Union structure below
    union_int.i = 0;

    for (int k = 0; k < BYTE_RESOLUTION_IN; k++) {
            union_int.c[k] = temp_buffer_in[i + k];
    }

    buffer[j] = (float) union_int.i;

    buffer[j] = buffer[j] / divider;
}

For Output Conversion:

/*** temp_buffer_out is the buffer sent to the device ***/

float multiplier = (float) std::pow(2, (BIT_RESOLUTION_OUT - 1));
int BYTE_RESOLUTION_OUT = BIT_RESOLUTION_OUT / (sizeof(char) * 8);
int bytes = buffer_size * BYTE_RESOLUTION_OUT;

for (i = 0, j = 0; i < bytes; i += BYTE_RESOLUTION_OUT, j++) {

    if (buffer[j] >= 0) {
        buffer[j] = buffer[j] * (multiplier - 1.0f);
    } else {
        buffer[j] = buffer[j] * multiplier;
    }

    UnionInteger16 union_int; // Union structure below
    union_int.i = (int16_t) buffer[j];

    for (int k = 0; k < BYTE_RESOLUTION_OUT; k++) {
        temp_buffer_out[i + k] = union_int.c[k];
    }
}

I use Union for converting unsigned chars to int16_t and then to float. Here is the union structure:

union UnionInteger16 {
    int16_t i;
    uint8_t c[2];
};

Everything looks fine in the code but as I mentioned, the audio sounds like bit crushing when the input volume is increased and when the volume is decreased, the audio starts to disappear. I think I lost the dynamic range of the audio.

Sorry for the long question. I would be grateful if you help me. Thanks in advance.


texts:
what is the best algorithm for time_scaling of a speech signal in which I've seen two of them and I don't know which one to use :

Psola:Pitch synchronous overlap and add.

time scaling modification using modified short Fourier transform magnitude .

what is the difference between them and which one is good for speech signal ?
In other words which one in more accurate and close  to the original signal.
If there are other good ones please tell me


texts: Using MFCCs for acoustic machine failure prediction

texts:
MFCCs are ubiquitously extracted for speech processing tasks, but I would like to know how suitable they are for non-speech processing tasks. Intuitively, it is my understanding that MFCCs are powerful features because they are more representative of how the human ear "hears" things. However, for tasks that are seemingly dissimilar from those that would have warranted such a biological adaptation, should MFCCs still be used? For example, in acoustic machine failure prediction, what is the logic behind using MFCCs, if any? Such a domain appears to be one that the human ear shouldn't have any significant advantages in.

Perhaps the human ear has evolved to better identify subtle changes in sound for hunting, or detecting predators, making MFCCs relevant to anomaly detection tasks.

Any thoughts? Should MFCCs be used universally?


texts: extending windowing function to higher dimensions

texts:
I was looking at this particular thread that discusses extending windowing functions for singling function to higher dimension. There is one bit in the accepted answer that I could not get my head around.

So, they create a multi-dimensional windowing function but then they scale the weights in this line.

# scale the window intensities to maintain image intensity
np.power(window, (1.0/data.ndim), output=window)

What is the purpose of doing that?


texts: How to properly extract FIR filter from two .wav recordings using fft?

texts:
I'm relatively new to signal processing and I got a task to extract a filter from two .wav recordings with sample rate of 16000 and apply to other recording to see if it actually works.
Brief:
I have divided the recording into 20ms chunks with overlap of 10ms, each of them was transformed with basic fft with N = 1024, that basically transformed it to the frequency domain, then we have a formula
Y(w) = H(w) * X(w)
which ultimately gives us a frequency response H(w) = Y(w)/X(w). But then I need to get mean value from all the chunks and I'm basically lost from this point on.
Impl:
I'm using matlab to do the whole thing.
So to find H(w):
spOn20 = fft(filteron_20,1024);
spOff20 = fft(filteroff_20,1024);

freqChar = abs(spOn20)./abs(spOff20);

filtered = filter(freqChar ,1, filteroff_20); % I know that's wrong

But where do I go from that point? How do I apply filter? All I know that it's a FIR filter and that the calculations are in frequency domain, but matlab has only filter() to help me.
So for test sake I did a single chunk process and with plot() I should get somewhat similar plots of  applied filter and initial filtered recording. But I couldn't get it. I tried using ifft on H(w) but I couldn't get the results I wished for.
here is what I get:

So the questions are:

How do I extract filter properly in frequency domain?
How to find mean value of H(w) from regions?
What steps should I take onward?


texts: How to simulate a continuous signal passing through a capacitor (simple coupling capacitor)

texts: the differential equation for the current flowing through a serial capacitor (see for example https://www.allaboutcircuits.com/textbook/direct-current/chpt-13/capacitors-and-calculus/) indicates that one must take a derivative of the signal but in the literature, a serial capacitor (for instance a coupling capacitor) is often considered as a unit that just eliminates a continuous component of the signal. Well. Is it necessary to take a derivative or just get the first moment of the stochastic signal and eliminate it in order to simulate the passing of that signal through the coupling capacitor?


texts: What's a good classification algorithm for a large amount of classes?

texts:
My requirements are these:

Fast classification of vectors of length 100 to one of 30000 classes
Iterative learning (can improve the model after it was first learnt)
Preferably available implementations in Matlab and Java

Thanks


texts:
How to calculate the Q value for a high pass filter ?
Ps: I'm a beginner in signal processing, so please put it in simple terms.


texts: Which equipment to use for testing performance of AM, FM, and DAB

texts:
I want to test the performance of AM, FM and DAB radio in RTL-SDR. I want to measure sensitivity, adjacent channel selectivity, cross-modulation/blocking, and third-order intermodulation to be some of the metrics. From the ETSI document for broadcast sound receivers, it is found that to conduct these performance tests, I need 2 signal generators, 1 signal analyzer, and an RF combiner. Since I don't have much experience working with this equipment, I don't know which type of signal generator/combiner to buy (as there are so many types in the market).

Can someone provide me details on which equipment will be suitable for testing AM/FM/DAB?


texts: Does a time varying gain (AGC) mitigate clutter in radar signals?

texts:
Trying to implement an MTI filter for flatland clutter in a radar received pulses.

However, after the matched filter output instead of implementing directly the MTI filter, I normalized with an automatic gain model.

The simulation is from matlab examples on radar sys design, what im i doing wrong?

MF output

AGC output


texts: Steady state variance of a stochastic differential equation - relation between the frequency and time domains

texts:
Consider a stochastic differential equation:
$$
dx(t) = a x(t)dt + b y(t)dt \quad (1)
$$
where $y(t)$ is a stochastic process satisfying $\langle y(t)y(t')\rangle = \delta(t-t')$. We will assume that the first statistical moments are zero and that $a<0$. I am interested in the variance $\langle x(t)^2 \rangle$. When I solve this equation in the frequency domain, I obtain the value $\langle x(t)^2 \rangle = \frac{-b^2}{2a}$. This is the steady state variance,($\lim_{x\rightarrow \infty} \langle x(t)^2 \rangle$) but does not give any information about the transient variance $\langle x(t)^2 \rangle$ at $t\neq \infty$.
My question is: why does solving this equation in the frequency domain not capture the transient behavior of the variance?
More mathematical detail are below:
My question is: why does solving in the frequency domain give the steady state variance, and not a function which depends on $t$?
We can be solve in the time domain to give:
$$
\langle x(t)^2 \rangle = e^{2at}\langle x(0)^2 \rangle - \frac{b^2}{2a}(1-e^{2at})
$$
The steady state can then be found by taking $t \rightarrow \infty$.
We can also solve in the frequency domain. Fourier transforming $(1)$ gives:
$$
x(\omega) = \frac{b}{-a-i\omega} y(\omega) \quad (2)
$$
where $y(\omega)$ now obeys $\langle y(\omega)y(\omega')\rangle = \delta(\omega + \omega')$. We then invert the Fourier transform to find the variance:
$$
\langle x(t)^2 \rangle = \frac{1}{2 \pi} \int^{\infty}_{-\infty}\int^{\infty}_{-\infty}\langle x(\omega)x(\omega')\rangle^{-it(\omega + \omega')} d\omega d\omega' \quad (3)
$$
Plugging $(2)$ into $(3)$ and integrating over the delta function gives a value of $\frac{-b^2}{2a}$, which is the steady state variance obtained earlier, but does not contain any information about the transient behavior. Why is this?


texts:
I know that a function $f_a\in \text{L}^2(\mathrm{R})$ is an analytic signal if its Fourier transform is 0 for negative frequencies, i.e.

$$ \hat{f_a}(\omega)=0$ if $\omega<0 $$

We can characterize an analytic function by its real part $f = \text{Re}[f_a]$, and the Fourier transform of this function is

$$ \hat{f_a}(\omega)=\left\{\begin{matrix}
2\hat{f}(\omega) & \text{if }\omega\geq0 \\
0 & \text{if }\omega<0
\end{matrix}\right. $$

Now if we have a discrete signal $f[n]$ of size $N$, we can also compute $f_a[n]$ by setting the negative frequency components of its discrete Fourier transform to 0.

Now why is it that if we want $\text{Re}[f_a]=f$, then we must have:

$$ \hat{f_a}[k]=\left\{\begin{matrix}
\hat{f}[k] && \text{if }k=0,N/2\\
2\hat{f}[k] && \text{if }0<k<N/2\\
0 && \text{if } N/2<k<N
\end{matrix}\right. $$

Could that be explained?


texts: What is the general form of a transfer function

texts:
I repeatedly see two representations of the general transfer function in the literature. The first is the following which is factorization of the numerator and denominator polynomials:

$$\textbf{G}(s) = k \frac{ (s - a_{1})(s - a_{2})(s - a_{3})\ldots
                              }{ (s - b_{1})(s - b_{2})(s - b_{3})(s - b_{4})\ldots
                                }$$

The alternative, below, eludes me and I'll checked many sources but none seem to justify it. The difference is a lowly $s$ term in the denominator raised to a power.  Is this general form related the open-loop transfer function?

$$\textbf{G}(s) = k \frac{ (s - a_{1})(s - a_{2})(s - a_{3})\ldots
                              }{s^m (s - b_{1})(s - b_{2})(s - b_{3})(s - b_{4})\ldots
                                }$$

My question is what is the difference, if any in these two forms?


texts: Evaluate expressions without computing DTFT

texts:
Let $X(\omega)$ be the DTFT of the sequence $x[n]$ given by:
$$
x[n] = \{4, 2, -1, 5, -3, 1, -2, 4, 2\},\quad\text{for}\quad n \in [-6, 2]
$$
I do want to compute

$X(0)$
$X(\pi)$
$\displaystyle\int_{-\pi}^{\pi} X(\omega) d{\omega}$
$\displaystyle\int_{-\pi}^{\pi}|X(\omega)|^2 d{\omega}$
$\displaystyle\int_{-\pi}^{\pi} \bigg\lvert\frac{dX(\omega)}{d{\omega}}\bigg\rvert^2 d{\omega}$

What I have tried

For $X(0)$, I computed the sum and so it was 12.
For $X(\pi)$ I did $X(\pi) = x[9] = \sum_{n = 0}^{8} x[n]e^{-i\omega n} = (-1)^9 \times 12 = -12$, because 0 corresponds to 0, 2 to $\pi/8$, -1 to $\pi/4$, ..., 2 to $\pi$.
For $\int_{-\pi}^{\pi} X(\omega) d{\omega}$, I tried by Parseval Theorem, so it was $2\pi x[n] x[n]*$, but I don't know if it's correct. Last two I don't have any idea of how to do it.

I also have a similar exercise, but it is with DFT instead of DTFT, but it is pretty the same, isn't it?
Thanks in advance.


texts:
I am reading sensor data with my Raspberry Pi from the MPU-6050 sensor, which has an accelerometer and an gyroscope. I am using an adjusted version of the i2cdevlib and I'm taking the measurements from the FIFO buffer with the DLP (digital low pass) enabled. I don't know if this is important, but the sensor output is the following (when not moved):

The X-Axis are seconds, the Y-Axis is the gyroscope output (32 bits) divided through (2¹⁶ * 16.4). It seems that the 17th bit from right is toggling from 0 to 1 all the time. This error occurs on all three axis.
Is this an usual error? Is there a filter?


texts: Invertibility of an ideal differentiator

texts:
Is the system $y(t)= dx(t)/dt$  invertible or not?
If yes, please determine the inverse system for it.


texts: Particle filter localization with different types of measures

texts: I want to implement a localization system using particle filter or other bayesian filter. I have a motion model based on odometry and different types of sensors for measurement. During the navigation, some sensors may be more reliable than others depending on the environment. How can I implement the filter by taking all the measurements into account and weighting them by their (varying) reliability?


texts:
I am trying to learn signal processing and digital pre-distortion.

http://www.altera.com/end-markets/wireless/advanced-dsp/predistortion/wir-digital-predistortion.html

I am currently trying to auto correlate the input signal and from this I make a matrix. I then get the coefficients for this matrix and use them with a LUT to help pre-distort the signal. I am having difficulty understanding what these coefficients represent? Why are they useful when added to the LUT. So the coefficients are used as a weight in those LUTs. Can anyone give me a pointer?

Same goes for the cross-correlation with the feedback, what do the coefficients from that vector represent?

Thanks for any help.


texts: Best beginner DSP book for developing plugins

texts:
I'm a computer science student and I love producing music and I really want to get into developing audio plugins. I'm currently learning the JUCE framework and am fairly comfortable with C++. I'm also good with maths.

I've been doing some research but I'm still not sure as to what book I should use to reference/learn digital signal processing. I've been looking at the DAFX book but its done in MATLAB not C++.

I need a book thats suited for beginners and for developing audio plugins.
Any recommendations?


texts:
A signal $f[n]$ is given, the corresponding DTFT as $F(e^{j\omega})$ and a plot of the frequency spectrum $f(t)$. Unfortunately I can't find a formula for the frequency spectrum in my documents.

When I plot $|F(e^{jt})|$ it looks exactly like the given plot of the frequency spectrum f(t) but I don't feel comfortable to "guess" a formula by comparing plots. Searching for this in the internet confuses me more than it helps.

What is the formula for the frequency spectrum?


texts:
I have a signal as the below figure. I am looking for some schemes to approximate the signal. I have found some ways for that task:

Using basis function (polynomial) to approximate the signal
Divide the signal to many subrange, and assume that the signal in the range is constant.

Could you suggest to me the other way to approximate the signal? Thanks


texts: Mathematical proof of relationship between derivative and convolution

texts:
What I'm looking for is the mathematical proof of why we can calculate derivatives as a simple convolution of a mask, and how do we get that mask?
I know it has something to do with how the derivative is approximated

Can anyone direct me to some book or anything?


texts: Extrapolation of band-limited frequency data

texts:
I'm now studying "How to do accurate transform from band-limited frequency data specifically S-parameter data of high speed interconnect to the causal impulse response in time domain. There are two known method, one is using rational fitting such as vector fitting of frequency data and the other is using IFFT of Hilbert transformed frequency data after the extrapolation of band-limited s-parameter data. I have read several paper which are related above thing, but I didn't understand obvious concept for band-limited frequency data. I've seen a lot of text the band-limited frequency data makes a ringing such that non-causal impulse response. But I've not seen what is the definition of band-limited frequency data and when we say this frequency data is band-limited, what is the criterion of band-limited frequency data?
Anyone who knows explicit concept for band-limited frequency data, pleas explain.


texts: How to extract white objects in an image(attached)? The program should then display each N as a separate figure.

texts: The program should take the given image as input and the end result should be each white object in a separate figure window.


texts: What Is the Point of Doing the Zero Padding?

texts: What are the advantages and disadvantages of doing Zero-padding, in particular the case of speech signals?


texts: Sampling the Wave Equation for String Vibration

texts:
I am having a difficult time understanding the basic principles when sampling the function describing the vibration of a string. Mainly I am confused on given a sampling rate how many samples to take and what size the increments when sampling should be.
I am using the solution to the wave equation from this article (in german).
If my explanation is unclear let me know and I'll try to give more information.


texts:
I have tried a code to compress a signal using Compressed Sensing(CS).
  The input signal is $x$ and the compressed signal  $y$ is given by :
 $y=Φ*x$   where $Φ$ is the sensing matrix.
I have used the following matlab function to compute the energy of $x$ and the energy of $y$ .

  energy_x= sum(x(1:384,:).^2);
  energy_y = sum(y(1:192,:).^2);

The length of $x$ is 384 , and the length of $y$ is 192.
I found that the energy of $x$ is 446910
  and the energy of $y$ is 77651282 .
Is it is reasonable to obtain higher energy for the output than the input?


texts: O-QPSK constellation interpretation - GNU Radio

texts:
I am currently trying to recover the I&Q of a O-QPSK signal generate from the standard XBEE arduino module using a B200. I can get somehow get a "look-like" of a constellation. Here an screenshoot:

I highlight the zone where there is a symbol recover. When I run the acquisition I can see symbol at the places. Here we just see one because there is a limited number of points displayed. However what is the rest? I got a SPS (sample per symbol) of 2. A part of the rest is certainly the transistion, but I am quite sure there is phase noise also. How can I attenuate those points. My flowgraph is just a UHD source feed into the polyphase clock source which is sent to a costa loop and after that there is my QT constellation sink.

[EDIT]
A other picture with less points on it:


texts: What if the Down sampling factor is not an integer?

texts:
I have developed a function which down samples an input signal.Say I have an input signal with a sampling rate of 512 samples/sec and would like to down sample it 128 samples/sec, then the down sampling factor is discrete and it is 4. In this case, I believe that the input signal will successfully be down sampled to 128 samples/sec without any loss of information.But, what if we have to down sample a signal from a sampling rate of 511 samples/sec to 127 samples/sec,then the down sampling factor 4.0236. When I run my code for a down sampling non integer factor, I still get the output down sampled signal,but I am sure that, since I down sampled the signal by an non-integer factor, the output may not be correct and would have lost information.Any methods to overcome this issue or Is there a way to approximate it without damaging the quality of the down sampled signal?

My Understanding - I found a method after a while of researching. In this case we have to initially up sample the input sampling rate followed by down sampling, known as "Multirate conversion". So here is my understanding, Input Sampling rate = 511 b/s and Desired output sampling rate = 127 b/s. So, 127*5 = 635 and 635 -511 = 124. Therefore, i need to up sample 511 b/s by a factor of L = 5 to get 635 and then down sample this 635 by a factor M = 124 to get the desired down sampled output of 127 b/s. What do you have to say?. Please correct me if its wrong or illogical.


texts: I was studying about realization structures of digital filters. Is it mandatory to have the order of numerator must be less than that of  denominator of transfer function for realization of filter using direct form I and II?


texts: A feature extraction method: Principal Component Analysis (PCA)

texts:
I read some articles about PCA and I think the nice way to summarize it is:

  It is a way of identifying patterns in data, and expressing the data in such a way as to highlight their similarities and differences.

So in my code, we subtract the initial data from the mean and find principal components, then  we multiply the data by a variable called e as for our dimension reduction purposes.

What I don't understand here is that When we want to highlight the similarities and differences, it happens both about noise data, the data which is too big or too small, will be soften. What about the edges in our image? Will the same thing happen to those data? I mean, when we have a change of color from white to black and we don't want to lose such information, will PCA soften the data as well as noise? If yes, this is not what we want, is it? Is there a solution to solve this problem ?


texts: Nagel, 1987, On the estimation of optical flow - attributes of this method

texts:
I know Horn and Schunck and Lucas-Kanade (81) as optic flow methods. But Nagel is way to complex for me. Anyway I have an blackbox implementation of this method but would like to understand the improvements compared to the two basic methods for optic flow computation.

They calculate higher derivations and they seem to look at more than one frame ahead in time. But I am still not able to evaluate how the algorithm works because the paper is way to complicated for me.

Can somebody tell me what exactly the advantages and disadvantages of this method are?

Thank you in advance.


texts: Discrete Fourier Transform - measuring signal at equi-spaced points

texts:
I found a really intuitive explanation of Discrete Fourier Transform here.

To summarize the author's approach briefly :

What if any signal could be made from circular motion (repeating cycles) ? This is the central theme of Fourier Transform
Every circular path needs a size, speed, and starting angle (amplitude/frequency/phase).
The combined "position" of all the cycles is our signal.

The author provides an interactive visualizer (screenshot below):
The cycles are shown on the left and the paths shown on the right. It shows 3 cycles (a cycle of 0 Hz, a cycle of 1 Hz and a cycle of 2 Hz). The paths of the cycles are in green. The combined path (signal) is in blue.

The author says

  The yellow dots are when we actually measure the signal. With 3 cycles defined (0Hz, 1Hz, 2Hz), each dot is 1/3 of the way through the signal. In this case, cycles [0 1 1] generate the time values [2 -1 -1], which starts at the max (2) and dips low (-1).

Why are the dots spaced so ? More generally, if there are $n$ cycles, why is the signal sampled at $n$ points equi-spaced around the circle ?


texts: Approximating $ {L}_{0} $ Norm Minimization with Non Linear Convex Inequality Constraints using Reweighted $ {L}_{1} $ Minimization

texts:
I have an optimization problem consisting of the $ {\ell}_{0} $ norm as the objective and a nonlinear (convex) constraint as well as a linear constraint. I am wondering if the reweighted $ {\ell}_{1} $ norm minimization algorithm would be applicable to this problem. The original paper "Enhancing Sparsity by Reweighted $ {\ell}_{1} $ Minimization" assumes linear constraints. References to relevant papers would be appreciated.

Edit:
This is the problem:

$$\begin{align}
\arg \min_{x} \quad & {\left\| x \right\|}_{0} \\
\text{subject to} \quad & f \left( x \right) \leq d \\
& 0 \leq {x}_{i} \leq p
\end{align}$$

where $ x \in \mathbb{R}^{n} $, $ d, p \in \mathbb{R} $ are constants, and $ f \left( x \right) $ is a convex function. The notation $ {\left\| \cdot \right\|}_{0} $ refers to the $ {\ell}_{0} $ norm, which is the number of nonzero entries the vector for which it is being computed.

I wish to relax the objective using reweighted $ {\ell}_{1} $ minimization, but am wondering if the constraints must be linear for this heuristic to apply.

Also this is not compressive sensing. I just wish to make use of a technique in compressive sensing.


texts:
I am running the LMS algorithm based on Haykin's Adaptive filter theory.
I aim to plot the cost function $\mathbf{J}$ and calculate $\mathbf{J}_{\tt min}$ and the simulation
excess mean square error $\mathbf{J}_{\tt x}$.
I have two questions:

Based on theory, LMS converges when $0 \lt \mu \lt \frac{2}{\lambda_{\tt max}}$.
But this is not the
case here since while I have calculated theoretical $\mu=0.0019$, the
algorithm converges when $\mu$ is about $0.28$!!

Is this the proper way to calculate the simulation
excess mean square error $\mathbf{J}_{\tt x}$?

Could you help me find the mistake, either in my code or in theory?
Thanks for your time guys!!
clear all
clc
close all

sysorder = 3;
ap1 = 1.2;
ap2 = 0.53;
h=[1; ap1; ap2];

N = 1000;
N1 = 60;

lmw2 = zeros(1,N1);
lmw3 = zeros(1,N1);
lmw4 = zeros(1,N1);

x=randn(N,1);
corr_xx=xcorr(x);
for i=0:2
for j=0:2
R_xx(i+1,j+1)= corr_xx(N+i-j);
end
end

d=conv(x,h);

[R_dd,lags]=xcorr(d,1);
corr_xd = xcorr(d,x);
for i=0:2
R_dx(i+1) = corr_xd(N+i);
end

mu_max = 2/eigs(R_xx,1);%__________________________________________________mu step
%mu_max = 2/trace(R_xx);
mu = 0.1*mu_max;
%mu = 0.28;
%__________________________________________________________________________

[Jx,lmw,lme]=lm_s(x,d,N,N1,mu);

lm_mse = lme(1,sysorder:N).^2;%____________________________________________LMS MSE
Jmin = min(lme(1,sysorder:N).^2);%_________________________________________Jmin
Jx = mean(Jx);%____________________________________________________________Jexcess

figure(1)
plot(h, 'ko');
hold on
plot(lmw(:,N1), 'r*');

figure(2)
plot([sysorder-1:N1-1],lm_mse(sysorder:N1),'-','color','r');grid on;

%__________________________________________________________________________

function [Jx,wf,e]=lm_s(x,d,N,N1,mu)%______________________________________LMS algorithm
sysorder = 3;
w = zeros ( sysorder, 1 );
wf = zeros(length(w),N);

for n = sysorder : N1
   u = x(n:-1:n-sysorder+1);
   y(n)= w' * u;
   e(n) = d(n) - y(n);
   w = w + mu * u * e(n) ;
   wf(:,n) = w;
end

for n =  N1+1 : N
   u = x(n:-1:n-sysorder+1) ;
   y(n) = w' * u ;
   e(n) = d(n) - y(n) ;
   Jx(n) = w'*(u*u')*w;
end
end

LMS pseudocode:

Intitialization:
w [0] = 0

Computation:
for n = 0, 1, 2, 3, . . .
1. y[n] = wT[n]x[n].
2. e[n] = d[n] - y[n].
3. w[n + 1] = w[n] + µe[n]x[n].
end
```


texts:
Assume that the speed limit at a place is captured and is provided as an input to a system which checks if the speed of vehicle is above the accepted level or not. For checking, the number in the speed limit image has to be extracted.

Can anyone suggest a simple method to perform number segmentation and identification in the above case?
Also if K-means algorithm can be used?


texts: Extremes of integral of the autocorrelation theorem

texts:
I am trying to apply the correlation theorem (here attached) to this definition of correlation of a finite continuous signal $g(t)$:
$\rho(\tau)=\frac{1}{T} \int_{t_{0}}^{ t_{0}+T}g(t)^{.}g(t+\tau)dt  \tag{1}$
where $t$ is the time, T is the time duration of the signal, $t_{0}$ is the starting time, $\tau$ is the time shift of the correlation.
As you can see, in the attached demonstration the correlation is defined from $[-\infty,+\infty]$. Obviously, the signals we work with are always finite. So I defined the interval as $[t_{0},t_{0}+T]$, as I also see in a book of Turbulence.
If I do the fast Fourier transform of both the member of the Eq (1) I obtain
$E(f)= \frac{1}{T} \int_{\color{red}{t_{0}}}^{\color{red}{t_{0}+T}}\int_{\color{red}{t_{0}}}^{ \color{red}{t_{0}+T}}g(t)^{.}g(t+\tau) e^{-i2\pi f \tau}d\tau dt \tag{2}$
where $E(f)$ is the Fourier Transform of $\rho(\tau)$. Usually the Fourier transforms, that I have seen in books, are defined in the interval $[-\infty,+\infty]$, but, as I said before, the signal we work with are defined in a time window such as $[t_{0},t_{0}+T]$, so I tried to apply them to finite signal
Introducing the variable
$y=t+\tau$
The Eq. (2) can be rewritten:
$E(f)= \frac{1}{T} \int_{\color{red}{t_{0}}}^{\color{red}{ t_{0}+T}}\int_{\color{red}{t_{0}}}^{ \color{red}{t_{0}+T}}g(t)^{.}g(y) e^{-i2\pi f (y-t)}dy dt \tag{3}$
Furthermore the Eq. (3) can be rewritten as:
$E(f)= \frac{1}{T} \int_{\color{red}{t_{0}}}^{\color{red}{ t_{0}+T}}g(t) e^{+i2\pi f t}dt\int_{\color{red}{t_{0}}}^{ \color{red}{t_{0}+T}}g(y) e^{-i2\pi f y}dy \tag{4}$
So E(f) can be rewritten as:
$E(f)= \frac{1}{T} G^{*}(f)^{.}G(f)\tag{5}$
I am not sure about the (red) extremes of the integral, I think they are wrong can you help me? Is it possible to apply the correlation and the Fourier transform to finite signals with interval of existence $[t_{0},t_{0}+T]$?


texts: How to express FM and PM the most simple way?

texts: I'm trying to understand how to tell phase modulation from frequency modulation by looking at their respective expressions, simplified, particularly frequency modulation. Also, it would be nice for someone to illustrate mathematically the difference between vibrato and FM synthesis.


texts: "Normalizing" my D4 wavelet transformation at each step reduces final image quality

texts:
Original image:

(Images included are .png images, so no additional distortion was added in save/upload for viewing)
I have used the D4 transform from page 20 of "Ripples in mathematics", which is basically these 5 steps:
Forward d4:
c1 = √3 / 4.0 ;
c2 = (√3 - 2) / 4.0 ;
s[ IEVEN ] += √3 * s[ IODD ] ;
s[ IODD ] -= c1*s[ IEVEN ] + c2*s[ IPREVEVEN ] ;
s[ IEVEN ] -= s[ INEXTODD ] ;
s[ IEVEN ] *= ( √3 - 1 ) / √2 ;
s[ IODD ] *= ( √3 + 1 ) / √2 ;

The inverse:
c1 = √3 / 4.0 ;
c2 = (√3 - 2) / 4.0 ;
s[ IODD ] *= ( √3 - 1 ) / √2 ;
s[ IEVEN ] *= ( √3 + 1 ) / √2  ;
s[ IEVEN ] += s[INEXTODD] ;
s[ IODD ] += c1*s[ IEVEN ] + c2*s[IPREVEVEN] ;
s[ IEVEN ] -= √3 * s[ IODD ] ;

I'm compiling and running this using double precision values from C++.  I run this on the rows of the image, then the columns.  I use a crude filtration algorithm to remove the lowest 90% of the difference coefficients in the image.
The filtration algorithm is:

Run through entire transformed image (as a set of numbers)
Find the largest difference coefficient (maxVal) (in entire 2d image)
Choose minValToSurvive as 1% of maxVal.
If a difference coefficient has a magnitude less than minValToSurvive, it is zeroed.

Here's my problem is.  When I remove only 83% of the lowest difference coefficients from the image (minValToSurvive=0.01*maxVal), you get this:
normalized

If I remove the normalization steps:
s[ IEVEN ] *= ( √3 - 1 ) / √2 ; // REMOVE
s[ IODD ] *= ( √3 + 1 ) / √2 ;

(in both the fwd and reverse transforms), the result after removing 90% of the components is much better (much less noise)

So I can think of 1 of 2 problems:

Normalizing the image by the ( √3 - 1 ) / √2 factors is killing precision
I'm not filtering correctly

Or am I wrong?  If I'm filtering (removing insignificant components) incorrectly, what is a better way to filter?  If it's the floating point precision, then should I not normalize the transform at every step?


texts: How to implement path loss in wireless communications?

texts:
I would like to implement path loss propagation model in a cellular network scenario.

I know that the path loss can be modeled as follows:

$$\mathrm{PL}(d)\propto\left(\dfrac{d_{ij}}{d_0}\right)^\alpha,$$
where $d_0$ is a reference distance and $d_{ij}$ is the distance between transmitter $i$ and receiver $j$.

My question is how to scientifically choose the value of $d_0$? I read a lot of papers that say typical values of $d_0$ are $10, 100$. I do not really get what does $d_0$ mean in real scenario?

Let say I generate randomly the position of my transmitter $i$ and receiver $j$, is there a constraint on $d_0$ that has to be met? What happens if $i$ and $j$ are very close to each others, i.e., $d_{ij} < d_0$?

Can anyone suggest to me a paper or a chapter in a book that I can read to understand the theory and the implementation of path loss models?

Thank you.


texts: Bundle adjustment optimization parameters

texts:
While reading the Wikipedia article on Bundle adjustment, I came across the following objective function used to represent the bundle adjustment problem.

I have two questions regarding this objective function

Can the $\mathbf{b}_i$ be fixed if I already know the 3D points being projected onto the camera in its local coordinate system (like that of a calibration plane, for example)? I mainly wanted to use bundle adjustment for improving multi-camera extrinsic estimation accuracy.
I understand that the inner summation is looping through all the $m$ cameras. But, this objective function doesn’t seem to capture the fact that each of the $m$ cameras can collect some $l$ images each.

In other words, I believe that the objective function can be re-written like this, to account for a data set of $l$ images for each camera.

$$\min_{a_i, b_i} \sum_{i=1}^n \sum_{j=1}^m \sum_{k=1}^l v_{ijk} d(Q(a_{jk}, b_i), x_{ijk})^2$$

Do I “break” something by doing this?

Thanks!


texts:
Assume some unknown but small and finite number of poles and zeros in the complex Z plane, all with complex conjugates, producing some response.  Strictly from the absolute value of a set of equally spaced points around the unit circle, say greater than 2X the number of poles and zeros, of that response, is it possible to estimate or compute the number of poles and zeros which produced that sampled magnitude response?

Added:  Are more than 2X sample points required to determine the number of poles and zeros? (when given that the total is less than X).

Added:  If there is more than one solution, can a minimum solution (as in the minimum number of total poles and zeros) be found or estimated?


texts: How to analyse periodic data obtained from a vibration experiment?

texts:
I have data from a vibration experiment on a structure. This data was obtained by attaching an accelerometer to a FFT analyser, which records the data at a high sampling rate (typically in kHz range) and can also perform real-time FFT of the recorded data.

The image above shows the recorded signal below and the FFT above. The FFT shows all the dominant frequencies in the original signals.

What more patterns/ important data points can I discern from this data, that might have utility ?

For example, one being, the RMS value of the signal. What else ?

Also, the recorded data here as a mat file, which can be loaded in matlab, the data in a variable called Track1.

The physics of the problem: The data is collected from a shake table, a rigid platform, that oscillates back and forth, so the sharp edges in the original signal periodically, representing the point of return.


texts:
I have a communication with a DBPSK modulation. The communication is disrupted by a Doppler shift (due to movement) and Doppler spread (due to channel). At the reception, after Doppler shift compensation with a preamble and DBPSK demodulation, I have a problem with the phase of the symbols. To correct the phase error, I use a phase tracking loop. Here is the link on what I'm doing phase tracking loop.

Here are my questions:

1) How to choose the constant loop $K_c$?

2) We suppose the Doppler shift is perfectly compensated. In my Matlab code, if for example I take $K_c=0.01$, sometimes I find exactly the symbol sent and sometimes I have symbol errors. What is the reason for these errors?

Thank you


texts: How to find the output of a system with the unit-step response and the input?

texts:
Convolution is used to find the output when the input and the impulse response is known. I am curious if there is a similar operator, like convolution, or a method that can determine the output of a system. I am asking this question, right of the top of my head, so I don't have any concrete example to apply it to.

If I am not wrong, one can use deconvolution to find the impulse response and go from there, but this is not what I am searching for.


texts: What is the relationship between the discrete time and continuous time variables?

texts:
While going through Proakis's Digital Signal Processing (page 21) ,he stated that
if a continuous time signal $~x(t)~$ that has been sampled each $~T~$ seconds to produce a discrete time signal $~x(n)~$ then the relationship between the variables $t$ and $n$ is :

$$   t=nT \tag($$

Question : in the LHS we have a continuous variable whereas in the RHS we have a variable that can only take step sizes of $T$ , so clearly $t$ and $nT$ do not span the same range , then how is the formula above justified ?


texts: Camera calibration using multiple images

texts:
I am trying to get the hang of camera calibration. For this purpose, I have mainly watched this lecture on youtube: Lecture 12: Camera Model by UCF CRCV. I believe that I understood the main ideas:

We basically deal with the question to relate 3D world points to 2d image points. In order to do this

We take the 3D point W in homogenous coordinates (in a defined world coordinate system)
Apply transformations (rotation, translation) to bring the camera and world coordinate system in alignment
Use perspective projection (from the pinhole camera model) to calculate the image point I.

If we do not have the perspective projection (that is the intrinsic parameters) and we do not have the camera position and orientation in the world (extrinsic parameters), we can calculate them (=calibration) by using an object with easily findable points in the world, identifying those points in the taken image and building a system of equations which we can then solve using least squares.

I now noticed, that many calibration tools actually require multiple images to calibrate reliably. Concerning this, I have a couple of questions:

How do we relate the multiple images we might have taken from the same object that we have moved? I have seen that the world origin is often placed in a chessboards corner, but this origin will change if you move the chessboard. Don't the origins have to match, such that we can calculate the extrinsic parameters over multiple images?
Why exactly is it better to use multiple images? Couldn't you just use a big chessboard that gives you a sufficient number of points to solve the system of equations?


texts:
I tried to apply a Gabor filter with a specific scale (according to my values of lambda and sigma, so it is (7x7) and for 4 orientations (0, $\frac{\pi}{4}$, $\frac{\pi}{2}$ and $\frac{3\pi}{4}$) to a input gray scale image.

In my code, three steps are achieved:

Create a Gabor Filter
Read an RGB image, then convert it to gray scale and finaly to double.
Apply the created gabor to the input image (here, i am not sure if my code is true, that's why i need your opinion )

1) -------------- create the Gabor filter (size=7x7 and 4 orientations)

%define the five parameters
theta=....; %either 0 or pi/4 or pi/2 or 3pi/4
lambda=3.5;
gamma=0.3;
sigma=2.8;
psi=0;

sigma_x = sigma;
sigma_y = sigma/gamma;

nstds = 5;
xmax = max(abs(nstds*sigma_x*cos(theta)),abs(nstds*sigma_y*sin(theta)));
xmax = ceil(max(1,xmax));
ymax = max(abs(nstds*sigma_x*sin(theta)),abs(nstds*sigma_y*cos(theta)));
ymax = ceil(max(1,ymax));
xmin = -xmax; ymin = -ymax;
[x,y] = meshgrid(xmin:xmax,ymin:ymax);

x_theta=x*cos(theta)+y*sin(theta);
y_theta=-x*sin(theta)+y*cos(theta);

gb= exp(-.5*(x_theta.^2/sigma_x^2+y_theta.^2/sigma_y^2)).*cos(2*pi/lambda*x_theta+psi);

figure(2);
imshow(gb);
title('theta=...');
%imagesc(gb);
%colormap(gray);
%title('theta=...');

2)------------Read the input image

I=imread('piano.jpg');
image_resize=imresize(I, [160,160]);
image_gray=rgb2gray(image_resize);
image_double=im2double(image_gray);
figure(1);
imshow(image_double);

3) -----apply the created above gabor to the input image (recall that i am not sure if the code in this step is 100% true, that's why i need your opinion and your help if you have the correct answer.)

figure(3);
filtered = conv2(image_double,gb);
imagesc(filtered);
colormap(gray);
title('theta=....');


texts: How many types of Bandpass filters are there for image processing?

texts:
This article shows that:

Ideal Bandpass filter
Butterworth Bandpass filter
Gaussian Bandpass filter

Is that classification correct?

Are there any other types?


texts: Right discrete cepstrum implementation in python

texts:
I know that the cepstrum is mainly computed as follow: $ C_{r}={\mathcal {F}}^{-1}\left\{\log({\mathcal {|{\mathcal {F}}\{f(t)\}|}})\right\} $
What I am wondering is if I should take the whole fourier transform or only half of it when dealing with real discrete data (which leads to a symmetric DFT). I have seen different implementations on the web (half, whole).
So using python should it be:
# Implementation 1
spectrum = np.fft.fft(x, n=n)
ceps = np.fft.ifft(np.log(np.abs(spectrum))).real

or
# Implementation 2
spectrum = np.fft.rfft(x, n=n)       # Here this is rfft instead of fft
ceps = np.fft.ifft(np.log(np.abs(spectrum))).real

As one can expected, results are strongly different (tested on a random x of size 100):

My guess is the first is the right one, but I feel like adding the symmetric part has a strong impact so I would like to be sure.
Any help would be appreciated, thanks a lot


texts: FFT: Extracted spectrum depends on number of points sampled

texts:
I have a signal $a(t)$, this is how it looks when I plot it:

Zoom in

I am trying to extract the eigenfrequencies of this signal using FFT in MATLAB. I do it like this

Y=fft( a(1:3:end) );

Fs = 1/1.5;       % Sampling frequency
T = 1/Fs;         % Sampling period
L = dms(2);       % Length of signal
t = (0:L-1)*T;    % Time vector

P2 = abs(Y/L);
P1 = P2(1:floor(L/2)+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
plot(f, P1)

Now, it turns out that if I use Y=fft( a ), I only get frequencies close to 0 when I plot the spectrum:

If I use Y=fft( a(1:3:end) ), then I get frequencies at 0 and nonzero frequencies:

Why do these nonzero frequencies not appear when I do the FFT on the full dataset, but only when I sample every 4th point?
Is the nonzero frequency actually contained in my dataset or is it an artifact?


texts: MATLAB: Adding Noise with Regard to Signal to Noise Ratio (SNR) or EbNo?

texts:
A signal x takes values from an alphabet set.
My objective is to estimate the channel parameters hest using adaptive methods and then plot the graph of mean square error (MSE) between the estimated coefficients and the actual vs range of SNR values considered. These are the following questions :

Plot of BER vs. signal to noise ratio -- When I want to plot the BER, and the signal takes values other than BPSK say QAM then also I will be estimating the channel coefficients for each snr by adding snr using awgn() using the same code. Then should the X axis be labelled as EsNo or EbNo? In a similar question asked here Adding AWGN noise with a correct noise power to the signal

the answer is to use EbNo. In a Matlab implementation https://www.mathworks.com/matlabcentral/fileexchange/39011-ber-comparison-of-m-ary-qam?focused=5251697&tab=function, using the EbNo range the noise signal of a particular snr is generated. But, the BER plot shown has EbNo on X axis. This is confusing since the awgn() function is using snr and not EbNo.

Plot of error vs snr -- For each noise added, I will calculate the error between the estimates and the actual coefficient. The X axis would be the range of snr and Y Axis the error values. Would the X Axis be snr or EbNo or EsNo irrespective of the symbol set?
In my case the data takes values in symbols and not bits. What should I use? Please help in clearing these concepts. Thank you.


texts: Identify an obstacle in front of the radar

texts: I use the K-LC6 24 GHz microwave module in the linear frequency-modulated signal mode to determine the distance to moving objects. But if I put a barrier in front of this radar while it is moving, I can determine it, but as soon as the object becomes motionless, I no longer see it. Is it possible to somehow determine the introduced barrier in front of the microwave module? At a distance of up to 0.5m or closer. That is, not just at the moment the barrier was introduced, but after the barrier remained and became stationary?


texts: what kind of information we can get if the auto-correlation for an image is a ring or two rings?

texts:
I did the auto-correlation for an image by Mathematica.

The auto-correlation function shows rings as follow..I am sorry that I can not attach the original image here.

From the following auto-correlation one, what kind of information can we get or guess for the original image??


texts: Several Questions Regarding Color Space Representation

texts:
As part of my seminar, I have to make a full representation on the many color spaces. I took a deep dive in the internet and on YouTube and managed to gather a lot of information. BUT I have a few questions, regarding the XYZ color space (also known as CIE XYZ 1931 color space).
(1) Why do images in XYZ color space look darker than RGB? In other words, why is X a more saturated red, Y a more saturated green and Z a more saturated blue?

(2) Why does the sum of each row of the RGB -> XYZ matrix transform have to be 1?
(3)Regarding the HSV color space, what is the intuition behind this conversion?

(4) And the last question, why did we partition the image to color and brightness and perform a spatial filter on it to transform the image to S-CIELAB?

Thanks in advance, any help is much appreciated :)


texts: i have made a subroutine to calculate 1d fft of a series of size 2^n. I need to calculate discrete sine transform of a series using the fft subroutine. I am not sure what to do.


texts: How to determine, calculate and plot a probability distribution for a given set of numbers?


texts: Why is it necessary to average signals with filters?

texts:
As someone who is new in working with filters, why do signals need  to be averaged? What are the advantages, by performing filters on signals? As I know, there are different types of filters for signals, is there some sort of schema, which filter for which signal do I have to use?

I am sorry, if my question sounds somewhat ignorant, but I am having a hard time to understand it, especially since it is in another language. I am asking here on this forum, since I know there many experts here, who know more than me. If someone is able to explain it in a compact and easy way to explain, then you have my eternal gratitude.


texts: Choice of axes in 1D cross-correlation of a signal in a 2D space

texts:
I am working on a research project in which we present an observer with a target moving in a random walk in a plane in front of them, and record the eye movements they make to track it. We cross-correlate the movements of the stimulus and the eye movements in the response to estimate how well the observers are tracking the target and how long the latency is between its movements and their eye movements.

We have been using normalized 1D cross-correlation in each of the X and Y directions (normalized based on the overlap between the two data vectors, so that all correlations are between +1 and -1). However, there have been questions raised about doing the cross-correlation along different axes or by doing a circular cross-correlation in angular space as described on pages 2 and 8 of this text.

I have a couple questions:

Do we get different information by cross-correlating along different pairs of independent axes? If we were only comparing the raw signals, it would be clear that changing axes in this way is a linear transformation that just represents the same information in different coordinates. But when we're performing the presumably non-linear operation of normalized cross-correlation, that's not obvious to me anymore.
What about circular cross-correlation as described in that link? My intuition suggests that it tells us something about angular movement that is not preserved if we collapse down to the X and Y directions individually. Is that right at all?


texts: What is the difference between complex FFT of baseband fft(I+jY) vs. FFT of absolute fft(abs|I+jY|)?

texts:
If I demodulate an input signal at a frequency and receive its I and Y (in-phase and out of phase) values; I can also take the R value by finding the absolute of I and Y.
But what I'm confused is the application of FFT of a complex time signal (I and Y in this case) vs. FFT of a real value (R). I understand both result in a complex result, and with the FFT(R) has symmetry at 0 Hz between -BW and BW. And FFT(X+iY) does not have these symmetric properties anymore?
If I plot the absolute of FFT(X+iY), there would be no symmetry between -BW and BW, but what more information do I gain/lose from either methods?


texts: How to change x-axis from samples to time?

texts:
I need to change the x-axis on this graph from 'samples' to time:

I created the graph using this process:

y, _ = librosa.load('sound/data/kea-song.mp3', 48000)
y /= y.max()

# compute the rmse
e = librosa.feature.rmse(y=y)[0]
e -= e.min()#what does this really do, guessing a kind of normalisation?
e /= e.max()
plt.plot(e)
plt.show()

I know the whole len(e)/sr=time formula but I cant actually apply it to the graph. I try this:

plt.plot(len(y)/48000, e)

But I have np.shape issues:

ValueError: x and y must have same first dimension, but have shapes (1,) and (5846,)

How do I do this?

Edit:
I tried to do it using both of these (with error's afterwards):

plt.plot(y/48000, e)
ValueError: x and y must have same first dimension, but have shapes (2993006,) and (5846,)

plt.plot(e/48000, e)

Edit2:

plt.plot(np.arange(len(y))/48000, e)
ValueError: x and y must have same first dimension, but have shapes (2993006,) and (5846,)

plt.plot(np.arange(len(e))/48000, e) ended up with a graph with one vertical line down the middle.

-dear everyone this is what happens when you try do this with little background knowledge of the subject. Do your math homework!


texts: How to improve accuracy while converting floating point coefficients to fixed point in the case of an all pole IIR filter

texts:
I am having an all pole IIR filter of order 5 with floating point filter coefficients
[1,
-4.708642687,
9.963818327 ,
-11.99038368,
8.647611478,
-3.553230696,
0.659454607].

When an impulse input was applied to the IIR filter, the first 8 output samples obtained were
1,
4.7086,
12.20,
22.5509,
32.38,
36.9400,
32.26087.

To implement the same system in hardware, I have scaled the filter coefficients by a factor of $2^{10}$ and down-scaled back at the output. Similarly all the operations were done in fixed-point representation. However, the first 8 output samples obtained at the output were
1,
5,
14,
29,
49,
70,
86,
91,
82 etc.

How to reduce this large difference in the output when trying to convert from floating point to fixed point


texts: Why is N-point DFT approximated by the sinc function?

texts:
While looking into DFT leakage, I've came across the author saying that

  "..., the amplitude response of an N-point DFT bin in terms of the bin index m is approximated by the sinc function."

Other than the fact that the fourier transform of the rectangle function is the sinc function, I have no idea why the statement above is true.


texts:
I've been scanning all of the FFTW documentation, trying to figure out how to inverse FFT my FFT spectrum.
The documentation only mentions how to inverse FFT real-to-complex transformations, using the opposite c2r transform.
There are no FFTW_INVERSE flags anywhere but I suspect that the FFTW_FORWARD/BACKWARD transform might be what I need.
i.e. FORWARD for FFT and BACKWARD for IFFT. The documentation speaks about it flipping the sign; I remember something similar happening with the IFFT.
Is the backwards transform just an IFFT (for forward transform)? If not, how do you achieve an IFFT?


texts: PYTHON Calculating Laplacian of Gaussian Kernel Matrix

texts:
I've been trying to create a LoG kernel for various sigma values. But the problem is that I always get float value matrix and I need integer value matrix as it is published on every document. I haven't find a method.

1st image: My functions and my output

2nd image: My expected matrix


texts: Recommendation for book - Writing DSP code in C

texts:
I am looking for some good book, that simply show how you actually write a code in C, to do all the main DSP methods .

FFT.
Low-pass and high-pass filters.
Auto-correlation.
Noise processing.

And all the basics of DSP, from theory into a real code in C.

For example, I have got 1000 samples, now i would like to compute FFT of it, remove noises, then bring back to the time axis.

Is there something good that cover all of these?


texts: How different methods of getting spectra in Python actually work?

texts:
I am having issues with understanding some functions performing Fast Fourier Transform or directly producing power spectra.
I have a signal composed of some long wavelength and some short wavelength components. So in a spectrum, I expect to see two peaks, one in the order of the shorter wavelengths and one for the longer. However, the spectrum produced is not what I would expect. I am sure it is not subsampled, there is no aliasing. The problem is more likely with the input parameters or with what I actually display.
Here is a simple example to illustrate my problem:

x = np.arange(0,10,0.01)
x = x * np.pi
y = np.sin(0.2*x)+np.cos(3*x)

Now I try to get the spectrum:

power = (2/N)*(abs(np.fft.fft(y))[0:N/2])
freq = np.linspace(0,0.5*(10/N),(N/2))
plt.plot(freq,power)

But the figure is empty. After printing my "power" and "freq" I realized that they were just zeros. I may have my "freq" defined wrong, It is true, I am not sure what is the period here. But I also tried another method:

freq, power = sp.signal.welch(y,fs=(1/(0.01*pi)))

and this produced

So I assume the sampling frequency, which is the input parameter, is incorrect here? What is the input here?

(I am sorry if it is a really stupid question, I am not proficient either at signal processing or programming.)


texts: Proof that module of FT of 2 independent signals is sum of modules

texts:
I found on these posts (PSD subtraction and PSD of a sum of two stationary real signals)
what I expected : that, just like the variance of the sum of 2 independent signals is the sum of the variances of these signals, the psd of 2 independent signals is the sum of the psd's of these signals. I understand the explanation using the fact that the psd is the FT of the correlation function, but I am wondering if this can be prooved only using FT-space calculation.
In other words, how to show that, for $x$ and $y$ being 2 independents discrete real signals, then:
$$ |FT(x+y)|^2 = XX^* + YY^* + XY^* + X^*Y = |X|^2 + |Y|^2 + XY^* + X^*Y = |X|^2 + |Y|^2 $$
where $X = FT(x)$, $Y=FT(y)$, i.e how to show that :
$$XY^* + X^*Y = 0$$
(using DFT notation for eg, x and y being N-lenght signals).

After a few try, I end up here, for spectrum variable k, DFT on N points :
$$(XY^* + X^*Y)[k] = \sum_{i,j}x[i]y[j]2\cos(2\pi k/N(i-j))$$
which really is 2 times the real part of the CSD. But then I don't see how to that this equals 0 using the fact that $x$ and $y$ are independents (which I didn't used so far in my calculation).

Cheers


texts: How can I implement a binary chirp signal containing zeros and ones?

texts:
I build a signal, $x$, which is linear in the frequency domain as (in MATLAB syntax)

x = 1:0.1:1e3;

Then I do:

y = (ifft(x));

and I would like to build a binary signal (zeros and ones) from $y$, but I can't define any threshold value such that

if y(index) > threshold
    y(index) = 1
else y(index) = 0

How can I implement a chirp of zeros and ones in the time domain?


texts: Why do musical instruments have different colour in phone?

texts: When I hear a musical instrument in phone, the color of it sounds a bit different than its original 'live' sound. Why?


texts: the sub-range of circular and linear convolution

texts:
circular convolution  $x_{_3p}[n]$ = $x_1[n]~\circledast_N ~x_2[n]$

is a period version of the linear convolution  $x_{_3p}[n]=x_1[n] * x_2[n]$

The length of $x_1[n]$ and $x_2[n]$ are $L$ ($n\in[0,\ldots,L-1]$) and $P$ ($n\in[0,\ldots,P-1]$) points, respectively.

The minimum value of $N$ that makes $x_{_3p}[n] = x_{_3}[n]$ for $n \in [0,\ldots N-1]$
is when $N\geq L+P-1$, right?

My question is: If $N=L$, what is the sub-range of $[0,\ldots,N-1]$ that $x_{_3p}[n]=x_{_3}[n]$?


texts: frequencies in sound: multiple possibilities?

texts:
First, I am by no mean a sound engineer (as you will guess later).

I was just wondering something while looking at the waveform of a .wav

for a given shape of waveform on a duration of 2 sec for example, how can we make sure that the frequencies fft gives are the only correct one?
what if very little parts of a sinusoid could be considered instead of a full continuous sinusoidal movement that just varies in amplitude?
or, what if a sinusoid had a lot of very fast varying amplitudes ?

that would lead to an infinity of solutions I guess..


texts:
I am using HTK to recognize which word has been said.

I am working on 20 words and I have for each of them 10 .wav files.

Here are the steps that i followed:
1) get the MFC file for each .wav file for each word
2) for each word train it on the 10 MFCs files
3) add the grammar and dictionary and hmmlist in the HTK
4) test

in the test, i use the mfc of the training data, but  i get an error of 3.5%
when i use a new mfc (not in the training data) it never recognized it right :S

Any ideas of what to do ?


texts: Does the number of samples matter for FFT, and how to get a specific frequency visible?

texts:
If I have a signal that has 740 samples, the sampling frequency is 1000 Hz, and I take an FFT of length 1024, are the frequencies I get now 0, fs/1024, 2*fs/1000, ..., 511*fs/1024? I mean, do I get this correctly: the frequency resolution does not depend on the number of samples I have, only FFT length and sampling frequency. If I had 1480 samples, the resolution would be still the same? This makes my head hurt.

Next, suppose that the signal I have has an interesting frequency at 26 Hz (strictly that one frequency). How do I get it appear properly in the frequency spectrum (my frequency bins are spaced 1000/1024 = 0.9766 Hz apart, so am I at dead end?).


texts: OFDM synchronisation Schmidl and Cox method - question

texts:
If somebody has good knowledge about the synchronisation method (related to the OFDM topic) developed by Schmidl and Cox, then you will probably be able to help me with my question about their synchronisation method.

I understand that their method does apply to OFDM and wireless LAN. And there are articles discussing their synchronisation technique, which involves the transmitter sending TWO identical sequences in succession. And their technique is based briefly as follows:

At the receiving side, while the transmitted sequence will likely be altered by effects of the transmission channel - the main idea is that the received time-domain signal will exhibit two identical repeating sequences (in a row...ie. in succession). These are expected to show up every once in a while.

The follow-on idea is to allow the receiving side to use a correlation method to find (detect) the occurrences of the consecutive repeating sequence pairs ----- which (if they are found) can provide a method of synchronising with the incoming signal.

However, in OFDM wireless communications, the transmitted sequence typically involves up-conversion, ie. mixing values with a transmitter carrier signal. And at the receiver, down-conversion must be done. Any differences between the carrier frequency of the transmitter and the receiver will result in a carrier offset frequency (CFO).

A lot of articles explain the usage of the Schmidl and Cox method for the case of ZERO carrier frequency offset.... or no carrier frequency offset.

I'm thinking that the Schmidl and Cox method is not going to work when carrier frequency offset is non-zero, right? I was thinking that their synchronisation method relies on the receiver being able to find pairs of consecutive repeated sequences (ie. linked to the Schmidl and Cox pre-amble). This would certainly work nicely when there is no carrier frequency offset.

But, in the presence of CFO, the down-converted received signal will still be modulated to some extent (like AM suppressed carrier modulation). This is all due to CFO. For this case, the modulation due to CFO spoils the party, right?

That is - we would ideally like to see repeated consecutive sequence patterns in the incoming received (down-converted) signal in the time-domain. But a received sequence affected by non-zero CFO is not going to show the observable or measureable pairs of repeating sequences ---- because CFO introduces instantaneous time-dependent amplitude variations in the received signal - right?

If CFO does spoil things, then does anybody know if the Schmidl and Cox method is still workable with non-zero CFO? That is ----- what needs to be done or considered if we are to apply this method in practice?

Thanks for your help and comments in advance!


texts: Creating Periodic Impulse Train In MATLAB

texts:
If we multiply a Continuous-Time signal f(t) by a periodic pulse sequence we can get a sampled version of our signal. The problem I am having is that I am unsure how to create an impulse train in MATLAB that is sampled at fs intervals.

My Attempt at solution (code):

Ts = 1/8000
len = length(inputSignal)
impulseTrain = ones(1,len)
n = 0:Ts:Ts*(len-1)

What I need to do:

conv(inputSignal,impulseTrain)

Okay,so if I was to plot this result it would be very simple however, what I am required to do is convolve this impulse train with an input signal. I am unsure how to pass in the data. How do I get 23000 vectors of length 1 shifted by a distance Ts?


texts:
Why do the same signals in the continuous-time and discrete-time differ in their frequency?

For example, if $x(t)$ is a continuous-time signal taking values only at $t= 1,2,3,4$ and $x(n)$ takes the same values as $x(t)$ at $n =1,2,3,4$.


texts: Fourier transform of attenuated propagating pulse

texts:
I am studying the optical properties of a medium by looking at how a Gaussian pulse is deformed as it propagates through the medium. The initial Gaussian pulse signal and Fourier transform are :

\begin{align}
E(0, t)&= E_0 e^{-\left(\frac{t-t_0}{\tau_0}\right)^2}\cos\big(2\pi\nu_0 (t-t_0 )+\phi_0\big) \\
\hat E(0,\nu) &= \hat E_0 e^{-\left(\frac{\nu-\nu_0}{\Delta\nu}\right)^2}e^{j(\nu t_0 + \phi_0)}
\end{align}
where $\pi\tau_0\Delta\nu = 1$ relates the width of the spectral and temporal pulse.

I am looking at the propagation of this pulse in a medium which is dispersive  (the frequencies do not propagate at the same phase speed $\beta(\nu)/2\pi\nu$ hence they accumulate a phase shift from one another) and dissipative (the frequencies are attenuated $\alpha(\nu)$ as they propagate).

To determine the properties $\alpha(\nu)$ and $\beta(\nu)$ of this medium, I simply perform the Fourier transform $\hat E(z_i,\nu)$ of the pulse signal $E(z_i,t)$ at different points $z_i$ and compare them to the original spectrum $\hat E(0,\nu)$ through :

\begin{align}
\alpha(\nu) &=\frac{\log\left(\displaystyle\frac{\lvert\hat E(z_i,\nu)\rvert}{\lvert\hat E(0,\nu)\rvert}\right)}{z_i} \\
\beta(\nu) &= \frac{\phi (z_i,\nu)-\phi (0,\nu)}{z_i}
\end{align}
where $\phi(\nu)$ is the phase of the complex Fourier transform.

Testing this method with a known material surprisingly provides similar results but with additional ripples.

I really do not manage to figure out what I should do to get rid of the ripples or if these ripples are normal.

I can provide plots of the Fourier transforms and signals of the pulses if necessary.


texts: Applying Superposition Property : $x^{2}[n]$ vs $x[n^{2}]$

texts: If we consider the mapping $\mathcal{H} : x[n]\mapsto y[n]$ and define the following output signal $y_{1}[n]:=\mathcal{H}\{x[n]\}:=x^{2}[n]$, then one can easily verify that such system is non-linear for it rejects the superposition property. But I am having a hard time applying the superposition property to $y_{2}[n]:=\mathcal{H}\{x[n]\}:=x[n^{2}]$ because its confuses with me with $y_{1}[n]$. I hope someone can offer any assitance I would be very much grateful.


texts:
We know that when many image are shown in succession they create illusion of video

But what is the minimum rate of frame/images so that still images appear as video?
In this case, images/frames are moving horizontally or vertically?


texts: Opencv Android Perspective Transformation not working as expected

texts:
I'm working with perspective transformation in opencv for android for a personal project.
The thing I'd like to do is to acquire a document like CamScanner does.
For this I import a picture and let the user set the four transformation points needed. Everything works, except for the fact that the transformation seems to be applied to different points or something like  that. I need some fresh eyes  to point me to the right direction.
Note that myHandle is a custom class, its only interesting properties in this context are that they are points with x and y coordinates and getX() and getY() are its getters for the coordinates.
Here's my function for the transformation:

public Bitmap addrizzone(Bitmap image, ArrayList<myHandle> sourcePoints){
        // sourcePoints are  expected  to be clockwise ordered
        // [top_left,top_right,bottom_right,bottom_left]
        // getting the size of the output image
        double dst_width = Math.max(sourcePoints.get(0).distanceFrom(sourcePoints.get(1)),sourcePoints.get(3).distanceFrom(sourcePoints.get(2)));
        double dst_height = Math.max(sourcePoints.get(0).distanceFrom(sourcePoints.get(3)),sourcePoints.get(1).distanceFrom(sourcePoints.get(2)));

        //determining point sets to get the transformation matrix
        List<org.opencv.core.Point> srcPts = new ArrayList<org.opencv.core.Point>();
        for (myHandle ball : sourcePoints) {
            srcPts.add(new org.opencv.core.Point((ball.getX()),ball.getY()));
        }

        List<org.opencv.core.Point> dstPoints= new ArrayList<org.opencv.core.Point>();
        dstPoints.add(new org.opencv.core.Point(0,0));
        dstPoints.add(new org.opencv.core.Point(dst_width-1,0));
        dstPoints.add(new org.opencv.core.Point(dst_width-1,dst_height-1));
        dstPoints.add(new org.opencv.core.Point(0,dst_height));

        Mat srcMat = Converters.vector_Point2f_to_Mat(srcPts);
        Mat dstMat = Converters.vector_Point2f_to_Mat(dstPoints);

        //getting the transformation matrix
        Mat perspectiveTransformation = Imgproc.getPerspectiveTransform(srcMat,dstMat);

        //getting the input matrix from the given bitmap
        Mat inputMat = new Mat(image.getHeight(),image.getWidth(),CvType.CV_8UC1);

        Utils.bitmapToMat(image,inputMat);

        Imgproc.cvtColor(inputMat,inputMat,Imgproc.COLOR_RGB2GRAY);

        //getting the output matrix with the previously determined sizes
        Mat outputMat = new Mat((int) dst_height,(int) dst_width,CvType.CV_8UC1);

        //applying the transformation
        Imgproc.warpPerspective(inputMat,outputMat,perspectiveTransformation,new Size(dst_width,dst_height));

        //creating the output bitmap
        Bitmap outputBitmap = Bitmap.createBitmap((int)dst_width,(int)dst_height, Bitmap.Config.RGB_565);

        //Mat to Bitmap
        Imgproc.cvtColor(outputMat,outputMat,Imgproc.COLOR_GRAY2RGB);
        Utils.matToBitmap(outputMat,outputBitmap);

        return outputBitmap;
    }

Some example screenshots:

User determined the points

Transformation is not as expected


texts: How do I measure frequency of an audio file into an array?

texts: So I know how to plot fft the audio file within Matlab and a window pops up. My question is, what next? I want to know how to go about measuring the frequency(s). I have two similar audio files, of two people saying the same thing, and i want to see if there's a relationship (correlation) between their voices in terms of frequencies and speed (bpm)


texts: Is there any difference between using convolution and correlation for finding edges with Sobel?

texts: I know that Sobel is a filter for edge detection and we should use convolution to find edges, but is there any difference if we use correlation instead of convolution? I think Sobel tries to find a pixel which has different values from its surrounding pixels, and the difference between correlation and convolution is just flipping the filter, I think, there should be no difference.


texts: How do I filter out the specific components at 20MHz, in this figure?

texts:
I used the filter builder (lowpass) , to cut off the frequency at 0.5 MHz, and thus used a stopband of 0.1pi, and a passband of 0.0125pi. (Sampling Frequency= 80MHz).
However, the output was still unsatisfactory, as the spikes at +20 and -20 MHz are still visible.
Hence, I reduced the stopband to 0.08pi, from 0.1pi, but then the spikes at 20 and -20 became larger, but in the negative direction.

What could be wrong? And what is the reason for the spikes becoming more negative as the stopband frequency is decreased?

Input Spectrum- Figure 2

Output of filter- Figure 3

Output of filter, with reduced stopband- Figure 4


texts: stationary vs. undecimated wavelet transform

texts:
I have a little bit confused on the difference between stationary wavelet transform and un-decimated wavelet transform.

So, can anyone tell me, if there is a difference between them?


texts: Why do poles in the left half of the S plane make a system stable?

texts:
A point on the S-plane (where $s=\sigma+j\omega$) represents a signal with a given frequency (given by the imaginary component) and which either decays, increases or stays stable (depending on the value on the real component).

Doing the maths, by converting $e^{-st}$ to a cosine and sine pair, I can see that points the left hand side of the plane describe signals that increase infinitely and points in the right hand side of the plane describe points that decrease to infinity.

Given this, why is it true that having poles of a transfer function (the frequency values which make the gain of the system infinite), lying in the left hand side of the S-plane (the side which makes signals increase infinity), makes a system stable ?


texts: Given a real signal, increase modulation frequency

texts:
Lets say I receive the signal

$$x(t)\cos(\omega_c t)$$

and I want to change the the carrier frequency $x(t)\cos(1.001\omega_c t)$

How can this be done? If I modulated it with a complex exponential, increasing or decreasing the modulation frequency would have been simple, however I could not figure out a simple way of doing this.

Is it even possible to do this without filtering?


texts: Need help understanding convolution indexing

texts:
Ok, this is leaving me increasingly frustrated. This builds on a previous question here but I am still not getting the indexing, although I learned from that question all the same.

Case 1: First convolution equation example:

$$
h[k] * h^*[-k] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[n+k]
$$

The way I got the right hand side, was:

1) Make the $h$'s have dummy variables, so $h[n]$ and $h^*[-n]$.

2) Flip one of them around, so now I get $h[n]$ and $h^*[n]$

3) Add the delay $k$ into the one that way flipped, so finally I have $\sum_{n=-\infty}^{\infty} h[n] \ h^*[n+k]$.

Great, I have a convolution.

Case 2: Second convolution example: (Unrelated to first)

We have:

$$
\sum_{i=-\infty}^{\infty} h[i-m] \ R_{xx}[i].
$$

Here we want to try and find out what convolution this corresponds to. The way to solve this, (apparently), is to make the assumption that another variable $g[n]=h[-n]$, and call it a day. Then we get:

$$
\sum_{i=-\infty}^{\infty} h[i-m] \ R_{xx}[i] = \sum_{i=-\infty}^{\infty} g[-(i-m)] \ R_{xx}[i] = \sum_{i=-\infty}^{\infty} g[m-i] \ R_{xx}[i] = g[m] * R_{xx}[m] = h[-m] * R_{xx}[m]
$$

This works great.

Case3: The problem:

This is my problem. Case 1 showed the steps for how to do a normal convolution. Case 2 showed how the method of substitution works. However, if I try to solve Case 1 using this substitution method, I get the wrong answer, even though it worked on case 2. Why is that?

To wit - where am I going wrong here?

$$
h[k] * h^*[-k] = h[k] * g^*[k] = \sum_{n=-\infty}^{\infty} h[n] \ g^*[k-n] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[-(k-n)] = \sum_{n=-\infty}^{\infty} h[n] \ h^*[n-k]
$$

However, this is **clearly* the wrong answer! What am I doing wrong here?


texts: Mathematical operations with given discrete frequency response function

texts:
Let's say I have a given discrete frequency response function H(w) and corresponding n frequencies as MATLAB arrays, ranging from 0 to 512 Hz.

If I do an n-point FFT on a discrete time domain signal x(k), how do I filter this frequency domain signal with given FRF? Is it just element-wise multiplication of the FFT array with the FRF array, followed by an IFFT to get the filtered signal y(k) in time domain or is it more complicated than that?

To take it one step further, what if I only had a filtered signal y(k) and my discrete FRF, could I compute the original signal x(k)?


texts: Removing lines of certain length from an image in MATLAB

texts:
I want to remove the portion of the line (highlighted by the yellow circles)  where pixels form a straight vertical line segment.

If I use the strel

SE = strel('line', 5, 90);
edgesR = imerode(In_R,SE);

then the remaining lines are also being erased.

Is there any other approach here?


texts: Attached is the question 1 part B, solution and my attempt. My attempt seems to be not correct. can someone comment?


texts: Noise amplification with inverse filtering

texts:
I'm trying to gain a better (mathematical) understanding of why inverse filtering is almost never the solution for correcting an image. From what I understand, we start with a discrete signal $s[n]$ that is the result of the true image $y[n]$ convolved by some kernel $A$ with some added noise $w[n]$. For discrete signals, this be converted to a matrix equation $s = Ay + w$, where $A$ is a circulant matrix representing the convolution. In Fourier Space, we have $s[f] = A[f]y[f] + w[f]$ which is much simpler.

Now, if we assume we know the kernel and its inverse exists, then we can approximately recover the true signal $y$ by inversion : $A^{-1} s = \hat s = y + A^{-1} w$. The problem becomes clear in the Fourier space, where inversion then becomes division, and if $A[f]$ is $0$ or very small at several frequencies this can lead to noise amplification. I am trying to get a better picture of this in the matrix representation.

I want to see if I can measure the noise amplification in this representation by trying to figure out an upper bound on the norm of $\hat s$ but I'm not sure if I'm going about it the right way. Calculating the norm of $\hat s$ I have $$|| \hat s|| = ||y + A^{-1} w||$$ $$||\hat s|| \leq ||y|| + ||A^{-1}||~||w||$$ Am I correct in assuming that the upper bound on the noise amplification is the norm of the inverse of the kernel?


texts:
In a $4$-FSK we have
$$s_i(t)=\cos(2 \pi f_i t)=\cos(2 \pi (f_c+\alpha_i \Delta f)t)$$
with $\alpha_i=2i-5$, and $\Delta_f=\frac 1T$, where $T$ is the time symbol and $i \in [1,4]$.
But with the expression of $s_i$, I have a bandpass signal. To get the baseband signal: $g_i(t)=e^{j2 \pi f_i t}$.
Is it correct?


texts: How does ORB combine BRIEF descriptors over pyramid levels?

texts: The paper briefly mentions using pyramids for getting scale invariance with oFAST and even has a line which says they use pyramids for making the BRIEF descriptors scale invariant. For the former, non-maximum suppression is used to combine across pyramid levels. But for the latter, I couldn't find any explanation of how you would combine them. Say you find BRIEF descriptors in the same location over several pyramid levels. How do you combine them? Or do you just keep all of them as separate descriptors?


texts: Transfer function, amplitude response and difference equation for a filter

texts:
I've found a paper with a filter described in terms of transfer function, amplitude response and difference equation:

transfer function of the second-order low-pass filter:

$$
H(z) = \frac{(1-z^{-6})^{2}}{(1-z^{-1})^{2}}
$$

amplitude response (T - sampling period):

$$
|H(\omega T)| = \frac{\sin^{2}(3\omega T)}{\sin^{2}(\omega T/2)}
$$

difference equation of the filter (cut-off 11 Hz, gain 36):

$$
y[nT] = 2y[nT-T] - y[nT-2T] + x[nT] - 2x[nT- 6T] + x[nT- 12T]
$$

What was the process to create these equations and how to run the filter on the signal?


texts: Improving spectral response with lost downsampled data

texts:
I have a project that is resource constrained and must maintain a specific FFT length and small FFT bin width, down at baseband. My sampling rate is very high and needs to be downsampled to anywhere from 1/2 to 1/20 of the input rate, which got me thinking:

Is there a way to use the lost samples to improve the spectral response of the FFT and/or the SNR, given the constraints?

The traditional approach is downsample, filter (window), then FFT. Can anything better be done?


texts:
I am creating a dataset, where in many speakers are recording their speech signals using different microphones and in different environment.  I would like to evaluate the quality of audio and discard the audio of poor quality.  Kindly give leads towards goods measurements (like SNR, PESQ(with reference)), so that a clean dataset can be created.

In specific, I want to check microphone quality from audio and dicard the audio with low quality.

Also please inform about the ideal value of these measurements.


texts:
Residual carrier systems such as PCM/PM/NRZ and PCM/PM/Bi-phase are common in space applications. Compared to suppressed-carrier systems such as BPSK, the literature sources on residual-carrier systems are pretty old, dating back from the 1970s. The demodulators described in these sources are analogue. I'm having some trouble with GNU Radio SDR implementation of these analog structures, in particular, carrier recovery with PLL.

In residual carrier systems, shown above, there is an unmodulated carrier on the Q-channel (pilot) that is used for carrier recovery. The transmitted signal is
\begin{equation}
\mathrm{s\left ( t \right )} = \mathrm{\sqrt{2P}}\sin \left [ \mathrm{\omega_{0}t + \sum_{i=1}^{M}\theta_{i}d_{i}\left ( t \right )} \right ]
\end{equation}
where M is the number of subcarriers and $\theta$ is the modulation index. The modulation index determines the ratio between the power in the data carrier and the residual carrier. Assuming no subcarriers (M = 1), the PCM/PM signal takes the form:
\begin{equation}
\mathrm{s\left ( t \right )_{M=1}} = \mathrm{\sqrt{2P}\cos \theta_{
1} \sin \omega_{0}t + \sqrt{2P}d_{1}\left ( t \right )\sin\theta_{
1}\cos \omega_{0}t}
\end{equation}
In I/Q format, this becomes:
\begin{equation}
\mathrm{s\left ( t \right )_{M=1}} = \mathrm{I\left ( t \right )\cos \omega_{0}t - Q(t)\sin \omega_{0}t}
\end{equation}
where
\begin{equation}
\label{i}
\mathrm{I\left(t\right)} =  \mathrm{\sqrt{2P}s_{1}\left ( t \right )\sin\theta_{1}}
\end{equation}
and
\begin{equation}
\label{q}
\mathrm{Q\left(t\right)} =  \mathrm{-\sqrt{2P}\cos \theta_{1}}
\end{equation}

Im having a problem with implementing the carrier tracking loop, in particular, I dont know what phase error detector to use. The signal in question is shown above, where the residual carrier can be seen as a peak at DC.

For BPSK(suppressed carrier) Costa’s loop, the phase error detector is pretty straightforward and is given by
\begin{equation}
e(kTs) = Q(kTs)*slice(I(kTs));
\end{equation}
Both I and Q channels are used by the PED, as shown in the diagram above. On the other hand, residual-carrier systems use the Q channel only for carrier phase recovery. I have tried different PEDs on my own without any luck.

float
residualPhaseRecovery_impl::phaseDetectorPM(gr_complex out) const
{
    //return imag(out)*slice(real(out)); //Costa's loop, for BPSK
    return imag(out); // Naive Residual carrier PED. Doesnt work.
}

What would be the appropriate PED in this case?

EDIT
Another receiver structure that could be used (?) is shown below (Rice, Digital Communications: A discrete Approach). All I need is an equation for the "Compute Phase Error" block.


texts: What is the difference between an impulse and a step response diagram?


texts:
I am using a HW with LMS7002 RF transceiver chip. This chip takes IQ values as an input.
 1. Can anyone point me to a sample IQ value generator? That I can use to test.
 2. What will be the IQ values of a pure sine wave say (1kHz) and how to extract it, say if I try to generate it in software like python or C++?
3. How can I generate a signal that occupies a certain bandwidth say 30 MHz?


texts: interpreting the post filter features in a sensor data

texts: I am new to signal processing and I am working on Filtring signals(using basic analog filters, FIR filters, and IRR filters), for Human activity recognition, using sensor data, I Extract the features before filtering the signal,  Then I filter the signal,  and I want to know how can we interpret the new values of the features after filtering the signal like the change in mean values (what does this means),  the change in Standard deviation ?.....the basic temporal and frequency domain features?.


texts:
I am working on camera motion detection.How do I decouple translation and rotation? I have obtained rotation by using sensors. I understand we can do something as simple as X'=RX+T , where R-rotation, T-translation and X,X' are the points involved. These points are 3D points(either world or camera coordinate system). How do i determine these 3D points by analyzing an image?

Is there any other way to obtain translation? (some Image Processing technique may be?)

Any links for literature would be helpful.


texts: Is there a situation when maximizing SNR doesn't also maximize probability of detection?

texts:
The problem I'm working on is signal detection of a radar signal, but I suspect this problem shows up in many different branches of signal processing.

Background:

From [1], the factor $I_f$, by which the SIR is improved by an MTI filter (just an FIR filter for non radar people), is given by:
$$
I_f = \frac{\mathbf{w}^T\mathbf{M}_s\mathbf{w}^*}{\mathbf{w}^T\mathbf{R}_n\mathbf{w}^*},
$$
where $\mathbf w \in \mathbb C^N$ is the vector of filter taps, $\mathbf M_s$ is the signal covariance matrix, and $\mathbf R_n$ is the interference covariance matrix. The optimal filter taps are determined by solving the generalized eigenvalue problem:
$$
\mathbf M_s \mathbf w^* = \gamma \mathbf R_n \mathbf w^*
$$
for the eigenvector with the maximum eigenvalue $\gamma_\text{max} = I_f$.

On p.339 of [1], it states:

  When $I_f$ is maximized, the signal-to-interference ratio at the output of the transversal filter is maximized.

This part seems obvious. But then it is followed by the statement that I wasn't sure about:

  This results in a maximum $P_d$ when the interference is Gaussian distributed.

Is there a case when an LTI filter that maximizes SIR doesn't also maximize the detection probability $P_d$?

For purposes of this question, make the following assumptions:

Square law detector, i.e. test statistic is $t(\mathbf v) =|\mathbf w^T \mathbf v|^2$, where $\mathbf v$ is the vector of the last $N$ received pulses
The probability density of the test statistic for $H_0 =$ "no signal present", i.e. $p(t | H_0)$, is known
Detection threshold $T$ is chosen to ensure a false alarm probability $P_{fa}$

EDIT:

The application of this is for filtering unwanted surface clutter returns from an airborne radar, so the distribution of $|n_i|$ is likely going to be something like a K-distribution in the case when the clutter dominates the interference term.

References:

[1] D. C. Schleher, MTI and Pulsed Doppler Radar, with MATLAB, 2nd ed., Artech House, 2010.


texts:
I'm trying to use a Butterworth filter in Python as described in this thread with these functions:

def butter_bandpass(lowcut, highcut, fs, order=5):
    nyq = 0.5 * fs
    low = lowcut / nyq
    high = highcut / nyq
    b, a = butter(order, [low, high], btype='band')
    return b, a

def butter_bandpass_filter(data, lowcut, highcut, fs, order=5):
    b, a = butter_bandpass(lowcut, highcut, fs, order=order)
    y = lfilter(b, a, data)
    return y

The output of the FFT of my data without applying the filter gives the following plot:

However, after applying the filter above with:

lowcut = 1.0
highcut = 50.0
x2_Vtcr = butter_bandpass_filter(x_Vtcr, lowcut, highcut, fs, order=4)

where fs is the sampling frequency (250 in my case) I get as FFT:

It looks like the filter shifts the frequency to the left and I don't get the peak where it should be.
Any idea as to why this is happening?

Thank you!


texts: How can I find the actual frequency given a normalized frequency?

texts:
Suppose that we have  some sample:

y =

   31.2241
   -5.9830
   22.6058
   -2.2309
  -42.8272
   29.2850
   -6.2652
   20.8502
   -2.4639
  -44.7525
   30.1104
   -6.0180
   21.4476
   -1.5089
  -45.1826
   29.2744

and somehow I know that it is obtained via a sinusoidal method which contains two sine functions at different frequencies and amplitudes, so I apply the music method:

pmusic(y,4)

and obtain the plot:

I know the location of peaks at the normalized peaks, but I don't know the actual frequency.  How can I find it?

I know the formula is $\frac{\text{normalized frequency}*f_s}{2}$, but what about $f_s$?  Can I find it?


texts: How to solve equations for the MMSE receiver?

texts:
Given the following equations for the achievable rate of the Minimum Mean-Squared Error Receiver [1]:

$$\mu = \frac{1}{K-1} \sum_{i=1, i \neq k}^{K}{\frac{1}{Mpd_{i}\left(1 - \frac{K-1}{M}+ \frac{K-1}{M}\mu \right) + 1}}$$

and

$$\kappa \left(1 + \sum_{i=1, i \neq k}^{K}{\frac{pd_{i}}{ \left(  Mpd_{i}\left(1 - \frac{K-1}{M}+ \frac{K-1}{M}\mu \right) + 1 \right)^2} } \right) = \sum_{i=1, i \neq k}^{K}{\frac{pd_{i}\mu + 1}{ \left(  Mpd_{i}\left(1 - \frac{K-1}{M}+ \frac{K-1}{M}\mu \right) + 1 \right)^2} }$$

I've got to find, $\mu$ and $\kappa$. I'm trying to solve these equations with matlab, firstly I tried with solve and then vpasolve, however, when $d$ is a vector with different numbers (i.e., random) it seems matlab never finds a solution. For the case when $d$ is a vector with all values equal to 1 for example, it finds the solution quickly.

This is the script I'm using to find the solution:
https://pastebin.com/AWDwyR0U

Am I doing something wrong? Is there a faster way to find a solution to these equations?

Reference:

[1] Hien Quoc Ngo, Erik G. Larsson, and Thomas L. Marzetta, "Energy and Spectral Efficiency of Very Large Multiuser MIMO Systems", IEEE Transactions on Communications, vol. 61, no. 4, April 2013.


texts:
I have a pressure based Depth sensor. For reference, MS5837-02BA.
All depth measurements I've been able to read are very accurate (±1cm)
I tried experimenting to find out the speed of the body by differentiating the measured depth value.
The measurements are taken at a 40ms time period. This is the time the sensor takes for each measurement. I've used this as the rate of measurement and calculated the speed but the values are not as correct i feel.
Here are the plots for both measured and calculated variables.

All the measurements are in meters.
Would like to hear what exactly I'm doing wrong, whether its the rate of measurement or something else.
Edit: accuracy  ±0.1cm to ±1cm.
I verified the depth measurements using a measuring tape and it was accurate down to the cm. I couldn't measure whilst the body was moving so that may a factor
Edit 2:
Response to Hilmar's comment:
I've gone through what you've stated and my original depth data. So i only took my raw Depth measurements this time and discarded the speed calculations my microcontroller has done. I've calculated the derivative by finding the difference between the current and previous measurement and dividing it by the sample period. $(x[i]−x[i−1])/dt$
Here are the plots again but with the sample number changed to time

As you can see the plots are similar as earlier. And about your comment on the rise at t = 2000, the rise is not instantaneous but its actually gradual over the period of 1.32s . Have a look at this pic, note that the period in question is between t=2025 and t=2058, which means its a total period of 33*0.04=1.32s .

And the change in depth is noticeable but not at a very high rate. Note that the measurement is actually in the order of 0.1m or 1 decimeter. Hence the body had moved 0.4719m in a period of 1.32s which is just 0.35 m/s which my object is capable of. Other than this i'm uncertain where exactly i've made a blunder here. Others suggest that the high frequency noise may be a cause of this but would a simple LPF solve this problem?


texts: Confusion in deriving formula for fourier tansform of impulse train

texts:
I was trying to derive fourier transform for impulse train :

I know how to solve for this using using properties of fourier transform. But now I wanted to use a brute force approach to it so I did the following


texts: Finding the time domain equation corresponding to a given DFT

texts:
I'm stuck with the following exercise while self-studying the Discrete Fourier Transform:

  Consider sampling exactly three cycles of a continuous $x(t)$ sinusoid resulting in an 8-point $x(n)$ time sequence whose 8-point DFT is the $X(m)$ shown in figure below. If the sample rate used to obtain $x(n)$  was  4000 Hz,  write the time-domain equation for the discrete $x(n)$  sinusoid in trigonometric form. Show how you arrived at your answer

From $f_{analysis}(m) = {{fs}\cdot{m}\over{N}}   $, I know the "bins" 0 to 7 on the graphics are corresponding to the frequencies in Hz:

$$ \{ 0,500,1000,\boldsymbol{1500},2000,\boldsymbol{2500},3000,3500 \}$$

where the values in bold are corresponding to the non-zero terms.

I also feel like $x(t)$ is of the form:

$$x(t) = A_0\left(cos\left({2\pi}{1500}t\right)+sin\left({2\pi}2500{t}\right)\right)$$

But, (1) I'm not sure my intuition is right (2) I don't know how to prove it (3) I don't see how to calculate the amplitude $A_0$ (4) and finally, is finding $x(t)$ really the answer to the question of writing "the time-domain equation for the discrete () sinusoid in trigonometric form"


texts: Factor $|a|^{-1/2}$ in definition of mother wavelets

texts:
The mother wavelet is defined as

$$\Psi_{a,\tau}(t) = \lvert a\rvert^{-1/2}\Psi\left(\frac{t-\tau}{a}\right)\tag{1}$$

in which the factor

$$ \lvert a\rvert^{-1/2}\tag{2}$$

is supposed to serve that

$$\lVert\Psi_{a,\tau}\rVert = \lVert\Psi\rVert\tag{3}$$

is valid.

Does someone have an idea how $(3)$ is to be understood?


texts: Draw a structure for IIR Filter given H(z)

texts:
This is the transfer function for the Direct Form 1 of the IIR Filter:

I'm trying to understand the rules to convert $H(z)$ into its corrispondent structure

I've just understood how to draw $H_1(z)$, but i don't understand why $H_2(z)$ is drawed as such in diagram. Can you explain to me ?

ps: can i also implement a FIR filter using Direct Forms 1 and 2 ?


texts: Normalizing Negative filter coefficients for Digital filter design

texts:
I am designing a High pass Digital filter. I calculated the filter coefficients using fdatool and got some negative filter values.

Now, I need to convert them into values from 0 to 255.

In case of low pass filter , I used

value = value*255/sum(value)

I have heard that same needs to be done for negative coefficients as well by taking absolute values of all the coefficients, but that seems a little odd to me.

Can anyone please tell me how to convert my filter coefficients to values ranging from 0 to 255

Thanks


texts: How i can create ghost on wavelet or seismic trace and then Deghosting that in MATLAB?

texts:
I want to model a seismic trace or wavelet and then create ghost on them, at the end Deghosting in MATLAB.

Can anyone help me please?


texts: The parameters of tolerance scheme of a FIR filter

texts:
in the first part of the problem they told us that an FIR filter with impulse response h[k] ( z-trafo H(z) l should be designed to the following parameters.

And then in the second part it says that there is an alternative realisation of a two identical FIR filter of lower order j[k]  thus F(z) = J(z)·J(z) (multiplied ) and the question is to find the new parameters of j.

So does it mean that F(z) filter should be equal to the one of H(z) ( i mean they have the same tolerance parameters )? But with a different filter order?


texts: Compute step response from impulse response of continuous-time LTI system

texts:
The impulse response of the LTI system is

$$h(t)=e^{-4t} u(t)$$

The expression for the step response is

$$\frac14 \left(1-e^{-4t}\right)u(t)$$

My question is how $u(t)$ appears in the answer.


texts: How can I calculate the Number of bins per octave?

texts:
I am trying to calculate the Constant Q Transform for Monophonic audio using Python.
The Python has the library to calculate the CQT , the default value of num_bins_per_octave is 12.

How would one decide the number bins?
Newbie to the Topic. Please enlighten me.


texts:
I am confused understanding  basic concepts of communication over AWGN channels. I know the capacity of a discrete time AWGN channel is:
$$C=\frac{1}{2}\log_2\left(1+\frac{S}{N}\right)$$
and it is achieved when the input signal has Gaussian distribution.

But, what does it mean that the input signal is Gaussian? Does it mean that the amplitude of each symbol of a codeword must be taken from a Gaussian ensemble?
What is the difference between using a special codebook (in this case Gaussian) and modulating the signal with  M-ary signaling, say MPSK?