texts: Discrete Wavelet Transform output: coefficients or FIR-filtered signals?

texts:
I have a theoretical question about the calculation of the Discrete Wavelet Transform, using MATLAB specifically.

According to this video-tutorial on the MATLAB lagorithm: https://it.mathworks.com/videos/understanding-wavelets-part-2-types-of-wavelet-transforms-121281.html

the DWT algorithm applies a low-pass and a high-pass filter to a signal to obtain a low frequency signal and a high frequency signal, using appropriate filters. And this makes sense to me, because the output of the application of a filter, such as a FIR filter, (i.e using the FILTER function in MATLAB) is another signal.

However, looking at the documentation of the function DWT or WAVEDEC in Maltab, it looks like the output of the j-th step of the DWT is NOT another signal, rather the cAj and cDj coefficients, from which the low-frequency and high-frequency signals can be then reconstructed.

So my question is: what is the filter that is applied to the signal? Why does it provide coefficients and not another signal? What is the difference between the application of the DWT and that of a FIR filter?

In other words, it seems that I apply a filter (with some coefficients) to find other coefficients, rather than another signal ... this is not 100% clear to me.
Maybe I misunderstood some basic concepts, can you please clarify?


texts: Sign of DC Component obtained from FFT differs with the sign of Mean of the signal, Does the sign really matter?

texts:
I've been working on 3-axis accelerometer data to predict the gesture of an user.

Lot of literature pointed me to consider Frequency domain features for my problem and i'm using

Mean of the signal on each axis  first
'k' coefficients of DFT of the signal.

Since X(0) is essentially the DC component of the signal, i tried checking the DC component with the Mean of the signal and observed they differ in sign because of the sqrt(X(0)*conj(X(0)))/N gives only positive value.

Will it affect my problem in any means?


texts: Hide text in audio and got text by phone microphone when the audio is plaid anywhere

texts:
Thanks for your time to read my question first. I’m new about audio, but I have to make this done:

Add a few bytes of data to a sound file and generate a new sound file.
If I convert that file to any sound format, these bytes data should still there.
When I play that file anywhere, I pick up the sound with mobile phone microphone and got these bytes back.

I have searched some informations:

It's like "Audio Watermark"
A study : HIDING TEXT IN AUDIO USING MULTIPLE LSB STEGANOGRAPHY AND PROVIDE SECURITY USING CRYPTOGRAPHY
This video is what I want, but I'm still not clear how to do that. Could you please give me some suggestion about that?

Thank you in advance for any help you might be able to provide.


texts: Overlap and windowing a signal for signal processing

texts:
I’d like to digitally signal process an audio data. Therefore my idea was to:

Split the audio data into individual blocks of 16 samples each.
Each block has an overlap of 50% (8 samples are shared across each consecutive block).
Each block of data is multiplied with a window (hanning),
Do the FFT,
apply an Equalizer to the FFT data (Which I will implement later),
iFFT the data and recover the original signal back.

Due to the Equalizer, the output might differ a little from the input, but shouldn’t be distorted .

To this end, I implemented a MATLAB code,

% I am using an audio file sampled at 16kHz
[Input_sig_16k,Fs] = audioread(‘filename);

window_size = 16;        % individual block size
overlap_win = 8;         % 50% overlap
data_full = zeros(1,length(Input_sig));
w = hanning(16);         % hanning windowing
for ii = 1:(length(Input_sig)/win_size)-1

  data_range = ((ii-1)*overlap_win)+1:((ii-1)*overlap_win)+16;
%     [data_range(1) data_range(end)]
  data_block = Input_sig_16k(data_range);

  % windowing function
  data_block = data_block.*w;
%     plot(data_block,'-rx');
%     ii

 fft_sig = fft(data_block);                 %FFT of the signal

 % I will multiply the frequency data with an Equalizer

 ifft_sig = ifft(fft_sig);                  %iFFT of the signal

 data_full(((ii-1)*window_size)+1:((ii-1)*window_size)+16) = ifft_sig;

 end

subplot(2,1,1), plot(Input_sig_16k,'-og'), grid on;   % plot and compare both the signals
subplot(2,1,2), plot(data_full,'-xr'), grid on;

However the output data is quite distorted. I’m not sure what I need to do to recover the original signal. Could someone let me know the mistake behind what I have done.

So how do I obtain the correct output?


texts: How are two signals multiplied? And how is it different from convolving two signals?

texts:
Suppose that I have two signals $x[n] = \left\{2,4,1\right\}$ and $p[n] = \left\{5,1,8\right\}$ and I want to multiply them.

How do you do that?
How different is it from convolving two signals?

I understand that multiplication in one domain is equal to convolution in other domain. How do you choose as to what to use : multiplication or convolution?


texts: Implementing Continuous Wavelet Transform

texts: I need to implement the discretized continuous wavelet transform from scratch. Could someone please point me to useful papers and references available online for this?


texts: What is the meaning of $l_p$ norm in this model for sparse channel estimation?

texts:
The signal $y(n)$ can be modeled in the time-domain as

$$y(n) = \sum_{i=0}^{L-1}h(i) x(n-i) + v(t) \tag{1}$$

where $\mathbf{h} = [h_1,h_2,\ldots,h_L]^T$ is the coefficient of length $L-1$, and $v(t)$ is the additive White Gaussian noise with variance $\sigma^2_v$.

In the Eq(20) found in the paper, http://www.eurasip.org/Proceedings/Eusipco/Eusipco2008/papers/1569101936.pdf

the eq has the term ${||h||}^p_p$ and the Authors mention that here $0<p \le 1$.

Consider an array $h = [1,0.2,0,0.5]$. What is meant by ${||h||}^p_p$ Is it the difference between the elements of $h$? What would be the meaning when p =0, p=1, and p=2?

The Authors in Eq(24)present the derivative of the cost function computed in Eq(20). The derivative is taken with respect to $h$ parameter. In that, they use the term $p\lambda \tilde{h}$ where $\tilde{h}$ is the sparse coefficient. I think here $p$ may not be zero.


texts: Noise reduction using multiple recordings of the same signal

texts:
I have two (audio) recordings of one analog signal, I used two separate devices (smart-phones) recording from two different locations.

Each recording device is pretty crappy, lot's of electrical hum and interference etc...
My assumption is that each recording contains a unique and distinct noise sample.

Is it possible to reconstruct the original pure signal? one which doesn't include the noise from either of the two recordings?


texts: Does the output signal from the FIR filter have transient response?

texts: In matlab, I have shown the signal passed through the FIR filter in the time domain. Then the beginning of the signal is like the transient response. Is the result appropriate?


texts:
I try to compute 2D DFT in a greyscale image with this formula:

I write the code bellow with python

def DFT2D(image):
    data = np.asarray(image)
    M, N = image.size # (img x, img y)
    dft2d = np.zeros((M,N))
    for k in range(M):
        for l in range(N):
            sum_matrix = 0.0
            for m in range(M):
                for n in range(N):
                    e = cmath.exp(- 2j * np.pi * ((k * m) / M + (l * n) / N))
                    sum_matrix +=  data[m,n] * e
            dft2d[k,l] = sum_matrix
    return dft2d

I think I have some problems because I do not get the expected result. I get the image below:

I do not know where is the problem in my code!

I don't want to use a built-in function, I assume this should be work but maybe it has some mathematical issue. when I get a result matrix and convert it to image it does not as same as expected DFT image


texts:
I would like to ask how to design a digital filter to remove $50$ Hz interference on an ECG signal. Do I need to use notch filter?
Thanks.


texts:
MATLAB has a butter, which constructs a Butterworth filter given an order and relative cutoff frequency. The filter created can be used to filter any finite signal.

How does MATLAB do this if the filter has an infinite impulse response? I suppose it must window the signal -- is this done by a simple rectangular window so that all known values are used?

Also, how is the continuous filter discretized? Bilinear transform, impulse response matching, etc?

I don't think the MATLAB help text explains this:

  Y = FILTER(B,A,X) filters the data in vector X with the
     filter described by vectors A and B to create the filtered
     data Y.  The filter is a "Direct Form II Transposed"
     implementation of the standard difference equation:

a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... + b(nb+1)*x(n-nb)
                      - a(2)*y(n-1) - ... - a(na+1)*y(n-na)


texts: Problem in understanding DDFS (Direct Digital Frequency Synthesizer.)

texts: I need to generate sine and cosine signals using DDFS (Direct Digital Frequency Synthesizer.) I'm unable to get the idea of the phase increment applied as input which changes the frequency of the quadrature signals.


texts:
Is there a way to decompose IIR filter into set of poly phase components, that are All pass. E.g. a an IIR filter  of order M, can be decomposed into a cascade of All zero filter of order 2*M( which can be implemented as polyphase) and all pole of same order( as Direct form), by rationalizing the Denominator. But, I have not been able to find a way to do it directly as sum of all pass polyphase components.

any help?


texts: Sample Rate Conversion between 32K and 44.1K

texts:
I would like to know what are possible/typical efficient implementations (preferably in fixed-point DSP) of synchronous sample rate conversion between 32KHz and 44.1KHz (audio applications). Also, I'd appreciate if you can possibly share DSP utilization (MIPS, code and data memory).

Thanks!

Notes: Just wanted to make my question a bit more clear:

By "synchronous" I meant 32K and 44.1K sampling frequencies are on the same clock domain.
I don't think straight forward poly-phase implementation is a good idea here. It is very efficient for conversion between e.g. 32K and 48K, but upsampling and downsampling factors are somewhat large for 44.1K and 32K
I had an idea to do the sample rate conversion at two steps: first, convert 32K samples to 44K (upsample by 11 followed by downsample by 8, also suggested by Hilmar in the answers section here). Then do 44K to 44.1K conversion using some kind of fractional sample rate conversion (Farrow, all-pass filters, fractional phase interpolator, etc.). I used 7th order Farrow structure but I'm not quite satisfied with distortion and harmonic levels.
My application is real-time


texts: How sine wave is generated using lookup tables

texts:
From this document I am quoting P2,L7

  So what is the incremental distance if we are using a 64 element look-up table instead of a sine function based on 2π? incremental distance = 2k*64/48k = 8/3. In this case increment represents a virtual phase increment or more directly a table index increment.

The radian increment statement I am clear with. Now I am having a basic doubt of how can it be incremented to table index of 8/3 on each sample to be calculated.

Following, some new doubts arise.

Is lookup table method applicable for limited number of Fs, which can be indexed from the lookup table ?
Consider a lookup table of size 256, generated with resolution of π/24. Is it popssible to generate sine value for, say sin(π/3) from lookup table ?

Thanks in advance


texts: Is it not possible to perform non-linear filtering in frequency domain?

texts:
This link contains the following statement:

  In contrast to the frequency domain, it is possible to implement non-linear filters in the spatial domain. In this case, the summations in the convolution function are replaced with some kind of non-linear operator.

Why is it not possible to perform non-linear filtering in frequency domain ?


texts: decorrelating two image maps -- reflected images from laser scattering

texts:
I am stuck on a research problem and do not know what kind of methods to use. I hope people in this forum can give me some good ideas, I've always had good brainstorming sessions here.

My problem is that I have a laser and a stack of thin films made up of three different materials. If I shoot the laser at these thin films I get a circular image of the reflected light from the laser scattering on the films. However, the fourth layer is added and I want to measure the change in thickness of the fourth layer, similarly by shooting a laser at this stack. The other three bottom layers are "nuisance" parameters, but their thickness variations are also captured in the pupil image. How do I filter out the observed pupil image so that the information of the three base stacks are eliminated and only the variations of the fourth critical stack are captured? I have 1000 sets (1000 for 3-stack and 1000 for 4-stack) such that for each data point, the 3-stack and 4-stack films have gone through identical process conditions and there is an image for both these stacks. I've thought of maybe signal transforms?

------- edit --------

Each image pixel of the pupil of the film stack is a nonlinear function of the thicknesses but the gradients at each parameter (as well as the image at a certain parameter value) point can be calculated via an optical simulator.

$pix_i(i = 1...n) = f(h_1,h_2,h_3) + \epsilon_i$

where $pix_i$ is a pixel point of the acquired image and $h1,h2,h3$ are the film thicknesses of a 3-film stack. This can now be linearized around $h10,h20,h30$ to

$pix_i(i=1...n) \sim f(h_{10},h_{20},h_{30}) + \frac{df}{dh_i}(h_i = h_{i0}) + \epsilon_i$


texts: Consider the integrator and check for time invariance

texts:
I'm trying to check the following system for for time-invariance.

$$ y(t) = \int_0^t x(\lambda) d\lambda$$

Please explain me why it is time-invariant.


texts: What is the difference between full octave and half octave pyramid?

texts:
I couldn't find a good source to explain the diffrence between the Full octave and Half Octave pyramid in Computer-Vision.

I saw the Gaussian-Pyramid, and the Laplacian Pyramid, but I didn't see anything about Full Octave - Half Octave Pyramids!

Can anybody please explain the difference between Half and Full Octave Pyramids?


texts: Non-uniform acquisition to fixed sample rate

texts: I'm facing a challenge that requires me to process a signal from an engine knocking sensor. The acquisition is done synchronously with the engine speed (every 0.1 degree) which gives me a range from 50KSa/s to 390KSa/s (related to engine speed range). The sensor bandwidth is 20KHz. My task is to convert this data to a fixed sampling of 200KSa/s for further processing in MATLAB. I'm working in this issue for some weeks now but I couldn't find any solution to it! Is there a common approach to such task?


texts: Recommended Order of Performing Denoising, Deblurring and Super Resolution on an Image

texts: In the normal workflow of image processing, there are multiple operations, increase image contrast, image denoising, image deblur and image super-resolution. What are the sequence/order of performing these different operations. Are there any overlap among these operations?


texts:
Suppose I have an analog signal I want to transmit. After sampling and quantization, I can map the samples to bits. So now I have a bit stream that represents the original analog signal.
My questions are

Why do we choose to map bits to symbols before transmitting? And
what exactly are these symbols?

One can understand a bit by saying '0' is 0 Volts and '1' is for example 5 Volts. So, 3) How exactly do the symbols modify the analog signal that is transmitted?


texts:
I am currently trying to implement an iterative block-wise algorithm in which AR coefficients are computed for each block.
There is a issue with my code where values get too large, and I was wondering how linear prediction handles stability issues. For an onset block for example, the coefficients for a low order IIR-filter may result in an unstable filter, at least from my intuition.

My question is:

Is the linear prediction method able to produce instable sets of autoregressive filter coefficients?

I realize this might be a stupid question, and I feel like I missed something.
Please note that I would like to hear about linear prediction, I am not asking for someone to fix my code problem (yet).


texts: Calculate ScaleVlues of IIR Filter manually from sosMatrix of MATLAB

texts:
while using "design" in matlab to design filters, at the output we can see a ScaleValues matrix that is used to compensate for overflow problem. my question is that how this matrix is calculated? I want to manually calculate it using sosMatrix and p-norms if needed.
thanks a lot.


texts: We know separable convolution helps reduce number of calculations during convolution operation. As usual we see this separability is being applied on convolution kernels. Can't we apply this separability to images as well? If we can do that, therefore, it would be a mathematically valid operation and the total number of calculations will be massively reduced. But it is unfortunate that not all 2D matrices are separable to make 1Ds. So what are the rules for a matrix to be separable and is there any mathematical formulation for that to find the separated form?


texts: Guitar Effects/Filters in real time using low cost DSP?

texts:
I have an c5502 texas low cost DSP.
I can capture sound trough its P2 input and process every separated sample after sending it to the P2 output.
Im trying to implement some kind of effect in the sound, but this DSP has very low memory so i cant storage the signal to process it as a whole after.

There is any way of implementing effects like overdrive or even low pass filters in real time? I have tried somethings and it seems they arent enough to change the sound by modifying only sample by sample (using past results and samples)...


texts: What are the statistics of the discrete Fourier transform of white Gaussian noise?

texts:
Consider a white Gaussian noise signal $ x \left( t \right) $.
If we sample this signal and compute the discrete Fourier transform, what are the statistics of the resulting Fourier amplitudes?


texts: Energy or power signal for continuous signal

texts: I have solved $w(t) = 1dt$ and determined it as power but when $w(t) =\Pi\left(\frac{t}{T_0}\right)$ it is energy.


texts: How to determine SNR required for adding AWGN noise to clean IQ samples?

texts:
I'm doing an experiment w.r.t PSD output. I have generated some 11a  IQ samples and checking its PSD output in MATLAB using pwelch and comparing with the PSD output obtained using hardware.

Here are the block diagram  and output snapshots

wfm from VSG is transmitted at -10 dBm

I realized that VSG---> loopback cable ---> VSA   adds noise to the samples which results in noise floor whose level is at -90ish dBm/Hz . And when I was using pwelch function , noise floor goes down to -140ish dBm/z

To Make it more similar , I am adding some AWGn noise before I input to the pwlch function using MATLAB

iqSamples = awgn(iqSamples,SNR,'measured')

I was doing some trial and error for SNR value and using SNR =50 dB gave me the following output

Few questions here

1)  In this case ,On what parameters does SNR depends?
2)  I' guessing this value might change with hardware and also loopback cable ? But what if I don't change the hardware , loopback cable used and VSG tx_power_level ?

Thanks for going through my simple question. Still trying to learn communications/DSP.


texts: Calculating incoherency in compressive sensing

texts:
CS is based on a choice of a sensing basis $\Phi$ relative to a representation basis $\Psi$. There are many well known pair matrices for $\Phi$ and $\Psi$ like random Gaussian and FFT, and also they should have low coherency which can be calculated with:

$$\mu(\Phi, \Psi) = \sqrt n\cdot \max\limits_{1\leq k, j \leq n} \left|\langle \varphi_k, \psi_j \rangle\right|$$

Some of these Coherency values which are calculated are as: between noiselets and Haar wavelets is $\sqrt 2$. Coherence between noiselets and Daubechies $\rm D4$ and $\rm D8$ are $2.2$ and $2.9$, respectively; random matrices are largely incoherent with any fixed basis $\Psi$.
My question is how can I calculate these values in matlab? can anyone provide a code example for me?


texts:
I have a set of sensors, some velocity-meters and others accelerometers. To process the two groups together, I integrate the accelerometers signals (in time domain, using MATLAB's cumsum), so I'll have all sensor data now in velocity. Knowing the precise arrival time of a signal at different sensors are very important in  determining the location of the signal source. Wondering if I am introducing some phase shift by integration, I tried to estimate the group delay. I am not sure what I am doing is right though. Given that the integrator can be written as:

$$y(n) = x(n) + y(n-1)$$

the filter coefficients will be

\begin{align}
a&=\begin{bmatrix}1 &-1\end{bmatrix}\\
b&=\begin{bmatrix}1 & 0\end{bmatrix}
\end{align}

Giving these values to the MATLAB's grpdelay function (Group delay), I get a constant value across all frequencies of half a sample.

Does it mean that my signal after integration is shifted by half a sample regardless of frequency ?
And what about zero frequency (the mean value), why is the group delay 0.5 sample at 0?


texts: How would you reliably detect scene transitions in a video? The simplest case wouldn't be too hard, but sometimes it might be a fast moving scene, or there might be an effect like lightning that would throw it off.


texts: bit reversed order of FFT matrix for channel estimation

texts:
Although the question seems similar to this one HERE, but  what I want to ask about is little bit different.
Assume we have a signal $X$ whose length is $N$x$1$, we convert that signal into time domain using bit reversed order FFT as: $x = F^{'b}X = p*F'*X$ , where $F^{'b}$ is the inversed bit-reversed order FFT matrix ($F^{b}$). $p$ is row permucation matrix and $F'$ is the inversed DFT matrix.
A cyclic prefix is added into the signal $x$ having $x_{cp} = [cp; x]$. Then that signal is transmitted over a frequency selective channel $h$ resulting $y_{cp} = h*x_{cp}$  where $*$ denotes to the circular convolution operation.
The CP is first removed from the signal $y_{cp}$ resulting the signal $y$.
Based on my analysis, when transforming the signal $y$ into frequency domain using $F^{b}$, as following $Y = F^{b}y = p'*F*y$, the channel is diagonalized where I can get the channel $h = F^{'b}(Y./X)$ it means in that case I use the whole signal $X$ as pilots.
The problem I am facing, when using such pilots from $X$, let's be $X_{1:4:end}$,  and then perform the same steps, the results of $h = F_2^{'b}(Y_{1:4:end}  ./ X_{1:4:end})$ is not equivalent to the channel !! where $F_2^{'b}$ is similar to $F^{'b}$ but with size similar to $(Y_{1:4:end}/X_{1:4:end})$ and $./$ is element wise division.
$NP$: When performing these steps with the normal $FFT$ matrix, everything is working well and I can recover the exact channel using the pilots data.


texts: Is ideal band pass filter (brick wall filter) linear phase?

texts:
I'm very new in digital signal processing.
I have multiple sensors and the way I filters the signals in post processing is:

take FFT of the signals.
put zero on out range of interesting frequency (like brick wall filter).
take IFFT of the spectrum.

I repeat this for each sensor, and compare the phase relation between them in time traces. Thus, the phase must not shift during the filtering process. I wonder the above method distorts the phase or not. Is the ideal band pass filter linear phase?


texts:
I am trying to plot the following function in MATLAB

$$f(x) = \lambda e^{-\lambda(x-\Delta)}w(x-\Delta) $$

where
$$w(x) =
         \begin{cases}
           1 &x \geq 0 \\
           0 & {\rm otherwise}\\
         \end{cases}
    $$

I chose a value of $\lambda$ of 1 and $\Delta$ of 2. I am just not sure how to define $w(x)$ and shift the function by delta. Thank you.


texts: Why would one use a Hann or Bartlett window?

texts:
Suppose we're designing a low-pass FIR filter, and I want to use one of these three windows: Bartlett, Hann or Hamming. From Oppenheim & Schafer's Discrete-Time Signal Processing, 2nd Ed, p. 471:}

All three of them provide the same transition band width: $$\Delta\omega=\frac{8\pi}{N}$$ where $N$ is the order of the filter and is assumed large enough.

However, the overshoot (let's call it $\delta$) is different for each window, an the following inequality holds:

$$\delta_{Hamming}<\delta_{Hann}<\delta_{Bartlett}$$

So if we use a Hamming window, we get the smallest overshoot and a transition band with width $\Delta\omega$. If we use one of the other two windows, the width of the transition band is the same, but the overshoot increases.

This leads me to think that there is no case in which one would use a Hann or a Bartlett window, as the Hamming one is better than them: it improves one aspect ($\delta$), stays the same in another ($\Delta\omega$).

The question is: why would someone choose a Hann or a Bartlett window if a Hamming one can always be used?


texts: How to resample in MATLAB one signal that is supposed to be convolve with another one?

texts:
i have two audio signals .wav and i want to convolve them, the trouble is that the frequency do not fit, they aren´t just the same frecuency-lenght in the wavread arguments. i am supposed to use the lesser frequency to resample the other one using interp1 and splines. I really appreciate your help.
Thanks


texts: How to simplify multiple addition and convolution operations into one convolution kernel

texts:
I need to perform such a conversion to simplify my image processing problem (sharpening, in green are the knowns, in red the unknowns):

\begin{align}
y(n,m) &= \color{green}{x(n,m)} * \left[ \color{red}{f_1(n,m) + f_2(n,m)} + \color{green}{f_3(n,m)}\right]\\
&= \color{green}{x(n,m) + kx(n,m) - x(n,m) * kg(n,m)}
\end{align}

Notice that the convolution done here is two-dimensional. And I know that $$ f_3  = -kg ;$$
where $k$ is a constant. However, I could not find $f_1$ and $f_2$, I tried to use convolution Theorem to switch to FT then going back to time/spatial-domain but it did not  obtain the same result.
Here is a better explanation for the requested problem:

To perform such a process to an input image, instead of performing the three separated steps shown in the top figure, I need to find such a kernel; let's call f where
$$
f = f_1 + f_2 + f_3
$$
and then convolve it directly with the input image to find the same output image described in the block diagram figure.
Any help/idea?


texts: Max useful filter tap count for given fixed point bitwidth

texts:
I have a 10 bit ADC sample stream in which I would like to apply a digital band pass filter. Is there a theoretical filter tap count that would define the threshold of "usefulness"?

I guess my thought process is: There are only 10 bits, so at some point (via increasing the tap count) the attenuation will be so great that even a maximum amplitude frequency component will get attenuated down to a fraction of a bit, and rounded down to 0. At that point, the effects of additional taps could not be seen.


texts: What information does fourier transform carry?

texts:
As one starts learning signal processing, then comes inevitably the topic of Fourier Transforms. Unfortunately I have difficulties not in computing but in interpreting the results of the Fourier Transforms, in particular the one being Continuous-Time Fourier Transform, CTFT, of the signal $x(t)$ which is: $$X(j\omega) = \int_{-\infty}^{\infty}{x(t)e^{-j\omega t}dt}$$

Now I wonder what kind of information does this $X(j\omega)$ give about the signal $x(t)$?  An example is highly appreciated, if possible.


texts: Why is it that increasing the number of quantization levels $L$ results in an increase in the signal's bandwidth?


texts: Could someone please explain to me the relationship between frequency bands and channels?

texts:
Specifically, I am a tech writer working with WiFi hardware, and I need to understand why the 2.4GHz frequency band has only three channels, while the 5.0 GHz band has so many more.

I would presume that, since they're both "frequency bands", they would both have about the same bandwidth, and so would have about the same number of channels.   Yet it appears that the 5.0GHz spectrum is divided into channels about 5MHz wide, and occupies the 4.9GHz to 5.9GHz spectrum, while the 2.4 GHz band has only three or four usable channels (1, 6, 11, and 14), and occupies only the 2.4~2.5GHz spectrum.

Were these allocations strictly arbitrary, or is there some sort of physical explanation for these allocations?  Does anyone know why the decision was made to allocate these frequency bands in the way they have been set up?


texts: Can this robot trajectory smoothing function be expressed as a single convolution?

texts:
I have an Nx3 matrix of poses (x, y, theta) that I need to apply an algorithm on which will cause the trajectory to be smoothed. I am interested in performance and so would like to improve efficiency by describing multiple convolutions as a single convolution.

I am using an averaging kernel matrix as described here that has the dimensions 4x1. I apply this to the x and y coordinates of the computed robot trajectory to smooth it out. The thing is, this is repeated numerous times on the same data. This is best illustrated with some pseudo code.

void ConvolutionCaller(std::vector<signal_element> x_coordinates)
{
    const unsigned int KERNEL_ROWS = 4;
    const unsigned int KERNEL_COLS = 1;

    kernel_type kernel(AVERAGING, KERNEL_ROWS, KERNEL_COLS); // not a real function, for illustration only

    for(unsigned int i = 0; i < x_coordinates.size()/2; i++)
    {
        unsigned int start = i;
        unsigned int end = x_coordinates.size() - i;
        Convolve(x_coordinates, kernel, start, end);
    }
}

After each iteration, the points on the ends of the array get removed from the next calculation.

To illustrate this, consider the following points. Each level represents the points that are being convolved.

1:    A B C D E F G H I J K
2:      B C D E F G H I J
3:        C D E F G H I
4:          D E F G H
5:            E F G
6:              F

The length of the incoming array is variable. Is there a way that I can describe these series of convolutions as a single convolution?


texts: Determine impulse response given input and output: which ROC?

texts:
Let's suppose I have to find the impulse response of a discrete time LTI system given a specified input and its output through the system. I think I'm going to get the $\mathcal Z$-transform of input-output and then as everyone knows
$$H(z)=\frac{Y(z)}{X(z)}$$
The problem is: I want it in time domain, so I need to inverse transform $H(z)$. How will I choose the ROC (hence causality / noncausality)?


texts: Find the frequency of a pole (Discrete Form)

texts:
I am studying a Notch filter. I found its Transfer Function (in Z) and its poles. How can I find the frequency of theses poles (which corresponds to the cut-off frequency)?

Thank you very much for your help


texts: How do I get excatly the same peak amplitude versus frequency when performing FFT?

texts:
I was working on simulation of steam turbine vibration under unbalance condition.
I wish to perform an FFT for the vibration velocity (mm/s) respond and plot the frequency on the x-axis and the real amplitude  on the y-axis. The respond vibration velocity data can be downloaded here:
https://drive.google.com/open?id=0B21C655TFYWJSVFjY1VPeVg0WHM

I am using the following MATLAB code:

Fs =1000; % Sample Frequency
ti = 0:0.001:15;

ti= ti';
data = signal;
N = length(data);

Y(1)=0;
Y=fft(signal);
freq = 0:Fs/N:Fs/2-Fs/N;
freq = freq';
amplitude = abs(Y(1:floor(N/2)))/floor(N/2);

subplot(211)
plot(ti,data)
xlabel('Time[s]')
ylabel('Amplitude')
title ('Time domain signal')
grid on

subplot (212)
plot(freq,amplitude);
xlabel('Frequency [Hz]');
ylabel ('Amplitude');
title('Amplitude Spectrum')
grid on

when executed the code this is what I've got

The time in "time domain signal" was corresponding to increased the rotation load of the rotor . For example at time 0-2 second the rotor RPM was increasing , so the unbalance force will excite the system which is lead to greater amplitude. after the 2s the rotor has reached the maximum load , so the amplitude decreased because the presented of damping inside the system
from the time domain the max peak was in 39.42 mm/s at time 1.248, and then the amplitude goes down and stable with average in 14 mm/s at the rest of the time. I Thought it will give me two spikes at frequency domain with exactly the same amplitude in y-axis which is given above

Why I didn't get the spectrum signal as I wanted, Can someone please help me? Thanks.


texts:
I'm reading the paper Model-Driven Deep Learning for Joint MIMO Channel Estimation and Signal Detection by Hengtao He, Chao-Kai Wen, Shi Jin, and Geoffrey Ye Li on Orthogonal Approximate Message Passing (OAMP) detectors.
There is an step that it is getting me crazy, in Equation $(42)$ in Appendix B. It is the following:

At first, I thought that it was a consequence of a Hypothesis, but then, to derive the next expression in Equation $(44)$, it is used again this formula.

Is there some kind of property which I might be missing?
Regards.


texts: Linear Frequency Cepstral Coefficients, is Filter bank needed?

texts:
I am working on my master thesis on acoustic pattern recognition and have a question to the calculation of cepstral coefficients.
I understand the step with a filter bank in MFCC calculation, it is simply perceived power spectrum by humans ear.
What if the human perception is irrelevant, for example if I am working not on human speech?
I have constructed a linear spaced, 50% overlapped filterbank for the band I need. But it sounds to me, the filterbank is not needed in my case.
If I do the DCT of the log power spectrum, it compresses the most energy on the first quefrencies and it doesn't matter if I feed the DCT with filterbank energies or just the full log power spectrum. I have tested it in Matlab and it seems to be true.
What I want to know, is, if filterbank multiplication is necessary step of calculating cepstral coefficients, if the human sound perception does not matter. I only want to keep basic spectral shape (envelope), all frequencies should have the same "weighting", not like in mel-scale case.
I previously thought, filterbank step would do some kind of dimension reduction, but obviously, dct does exactly this job.
In the pictures above I wanted to show, that the filterbank step does not affect the spectral envelope. Taking a dct of the psd directly and then idct of the first 15 cepstral coefficients leads to the same spectral envelope if multiplicating psd with filterbank first and idct the first 15 cepstral coefficients.
Like previously said, my filterbank consists of 40 linearly spaced triangular 50% overlapping filters.
1)without filterbank multiplication

2) with filterbank multiplication

In case of MFCC calculation: Why it is necessary to multiply the psd with filterbank (in MFCC case)? Why not to convert each fft bin to mel scale directly but first multiply with filterbank and sum up the energies of each filter before transforming to cepstrum? I found tons of papers, books and threads but never the details about a function of suming up frequency bins in filterbank before further processing. In my opinion it is like lowpass filtering the psd, but why, if shortpass liftering (taking only first 13 coefficients in cepstrum) is done in any case? The answer of this question would be the answer to the first question.
I hope it is a bit clearer now. Sorry for my bad english.


texts: How does spatially white noise differ from diffuse noise

texts: In noise reduction, having read that directivity index is used to reduce diffuse noise and white noise gain reduces spatially white noise, I would like to know the difference between both the noise types. Is it that diffuse noise is identically distributed but not white? Hope some one could help :)


texts:
Consider we have received a QPSK signal. We than make I (In phase) and Q (quadrature component) which I understand is nothing but multiplying the received signal by the cos(2*pi*f) and -sin(2*pi*f) Where f is the carrier frequency. Is this creation of I and Q is matched filter or there is some other filtering we do which is termed as matched filtering. I will appreciate any clarification?

Edit: Is it that we use some matched filter on I and Q data. What matched filter we use depends on the transmitter characteristic?


texts: Polyphase decimation filter plot in Octave


texts: On the Use of OMP Algorithm to Estimate Sparse Vector

texts:
As known, Orthogonal Matching Pursuit (OMP) Algorithm is to recover the sparse channel after convolution with another vector. But when I implement that in MATLAB, I don't get the sparse vector correctly. I provided below a simple example of multiplication of sparse vector with a matrix and then I tried to get back the sparse vector, but I don't get the correct results. Could you please guide me how to correct that.  Below is my example code:

   clear all; clc; clear;

    h = [1 0 0 1 0 1 1 0];    %Sparse channel
    V = randn(8,8);           %Matrix
    Yy = V*h.';

   h_esti=OMP(Yy,V,4);             %Perform OMP algorithm

Regarding the OMP function, it's related to the algorithm of OMP as here OMP

NP:  The above code gives sometimes the exact results of the sparse vector but it's not always. !!   I don't know why that, maybe matrix V must have special conditions or something wrong in my code.


texts: Processing and feature extraction from very short signals

texts:
I recently have encountered very short time signals (from three to 12 samples, typically). They appeared for instance in small time frames in engine simulation that should be extrapolated in a robust manner, or gaz measurements taken for instance at $t_0 = 0$ (seconds),  $t_1 = 5$,  $t_2 = 10$, $t_3 = 20$, $t_4 = 50$, $t_5 = 100$. The idea behind this time sampling is that the signal should rise or fall, and may reach some steady-state. Such data cumulates caveats:

Very short,
Sometimes corrupted by one missing data, or one potential outlier,
Uneven sampling.

Traditional tools (Fourier, correlation, fitting) appear of limited use, and are probably unusable. Yet I would like to:

describe those signals with few robust parameters,
estimate offsets and delays between two signals,
cluster them with shape similarity.

I for instance would like to detect "V-shaped" short signals that first go down then up,  obtain a location estimator for the wedge, and separate them from monotonous or down-then-flat signals.

So far, I am performing tedious 3- or 4-point linear or parabolic fits, estimate residues and dispersion to select "a best model", with standard quadratic or robust quantile estimation. My questions are:

Is there recommended literature on very-short signal processing?
Would users share their best-practice experience on such signals, that ought to be processed?


texts: What is the unit of the color axis on a Matlab spectrogram, and bandpower?

texts:
I am new to signal processing, but successfully made a spectrogram with Matlab. It is nice and working, showing the expected output on the graph, but I just cannot understand what the numbers mean on the color axis. The unit of my discrete signal is in pixels.
Now I do not understand the "Power/frequency [dB/Hz]" label of the color bar that Matlab automatically adds. With long googling, I only figured out that the color of a point on this heatmap should be the amplitude=power=loudness (?) (of the given frequency at a given time point).
1, Somewhere I saw in a post that the unit is the same as the unit of the signal. So that means the correct label for my colorbar should be "Pixels"?
2, But then why does the colorbar range from about -150 to 30? How can amplitude values be negative?
3, And the numbers that are represented by the colors for each time and frequency - where do they come from? Are they the numbers that exactly come out of the DFT algorithm (from the 0th element to the N/2th "Nyquist" element)? Or are they somehow mathematically manipulated, or normalized before being plotted to the spectrogram?  If the case is the latter, what is the method of this normalization?
4, What is the output dimension or unit, of the bandpower() function for my "pixels" signal in this case?
I appreciate any helping opinion. Thanks in advance!
Anyway, the spectrogram was produced using this code:
signal = ... %%too long to put here
srate = 1250;

signal = signal-mean(signal); %to get rid of the "DC component"
winsize = ceil(length(signal)/10);
shift = ceil(length(signal)/150);
spectrogram(signal, rectwin(winsize), winsize-shift, winsize, srate, 'yaxis');
ylim([0 2]);

This is the input signal, y axis is in unit of pixels:

This is the spectrogram output:


texts: Why does an image get blurry beyond a limit of zooming?

texts:
As we have came cross a phenomenon where a picture get blurry and more blurry as we zoom in a image beyond a limit.

Why does it happen?


texts: Exponential moving average cut-off frequency

texts:
I am trying to implement low pass filter from this example.

What is the cut-off frequency for this type of filter? Is it $F_s \frac{1-\alpha}{2\pi\alpha}$, where $F_s$ is sampling frequency?


texts:
I am trying to write a Python script that can demodulate an FSK modulated audio file and return the data encoded in the audio.  The data being transmitted is GPS NMEA strings which are embedded as the audio channel in video files.  Basically, text is encoded with FSK modulation, and I am trying to retrieve the text using Python.  The device I am using to encode the data can also decode it, so I have been able to generate the correct output, but I need to be able to do it using software.

I have done some background reading to introduce myself to signal processing and FSK, and I have looked at example scripts, but I feel a little lost in the specific application of building my own demodulator in software.

I managed to write a Python script that runs successfully, although the output is incorrect.  The correct output derived from the encoding/decoding device has 8,280 raw binary (0 and 1) characters, the Python output has 1,344,786.  I think I am missing a symbol synchronizer, but I'm not sure how this works.

My question now is: how can I add symbol synchronization to the script and/or symbol timing?  Are there better examples or explanations of how to do FSK demodulation in Python?  I would appreciate any feedback or direction.  Thank you.

EDIT:
I have changed my original script.  Now there is a problem where the mark and space frequencies (1200 Hz and 2200 Hz, respectively) have the same shape when plotted, and the output of the script is all 1s.  The script works by bandpass filtering each frequency, comparing them, and deciding a 1 when mark is greater than space (based on this article).

Here's a spectrogram (from Baudline) of the audio file:

EDIT: This is my updated script with as suggested in comments:

import scipy.signal.signaltools as sigtool
from scipy import signal
from scipy.signal import butter, lfilter, blackman
import wave
import struct
import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import rfft, rfftfreq

mark_f = 1200
space_f = 2200
Fs = 44100

waveFile = wave.open("Sample4_160224_mono.wav", "r")
length = waveFile.getnframes()
sig = []
for i in range(0, length):
    waveData = waveFile.readframes(1)
    data = struct.unpack("<h", waveData)
    sig.append(data)

# Bandpass filter mark and space frequencies:

low_bpass = signal.remez(5, [.1,.109,.11,.13,.131,.14],[0,1,0])
mark_filtered = signal.lfilter(low_bpass, 1, sig)

high_bpass = signal.remez(5, [.2,.209,.2100,.23,.231,.2400],[0,1,0])
space_filtered = signal.lfilter(high_bpass, 1, sig)

# Envelope detector on mark and space bandpass filtered signals:

mark_env = np.abs(sigtool.hilbert(mark_filtered))
space_env = np.abs(sigtool.hilbert(space_filtered))

# Compare and decision:

seq = range(0, len(mark_env))
rx = []
for i in seq:
    if mark_env[i] > space_env[i]:
        rx.append(1)
    if mark_env[i] < space_env[i]:
        rx.append(0)
    if mark_env[i] == space_env[i]:
        rx.append(0)


texts: Peak to peak amplitude of sum of sinusoidals (harmonic frequencies)

texts: I would like to estimate the peak-to-peak amplitude of a periodic signal whose frequency components are known. This is, I have the frequency spectrum (a peak in the fundamental frequency and other peaks in its harmonics) and I would like to compute the peak-to-peak amplitude. Is that possible without reconstructing the signal in the time domain and then detecting peaks?


texts:
I'm using the Rayleigh Channel in Simulink but I can't calculate the BER. I always get values near to 0.5 which doesn't make sense (even using high EbNo values). [In this simulink model][1] I found a trick to calculate the BER but I also would like to use delays and attenuation vectors.

Any idea of how to calculate the BER? I have tried also with a Matlab script comparing bit to bit but I also get values near 0.5.

Edit1:
I can calculate the BER but it is always around 0.5, regardless EbNo values. I'm using this simulink model.

Edit2:
I'm using delay and attenuation vector so I have problems with the array dimensions:


texts: How is the RMS value greater than its mean square value?

texts:
Currently learning about PSD curves to which I have a query regarding the attached curve.

Why is the RMS value greater than its mean square value. I understand the RMS to be the the square root of the area under the curve and thus should always be less than the area of the curve.

What am I missing?
Thanks


texts:
I am using openCV to find a particular object, and am trying to find a way to make it locate the object consistently. The object's location will be determined by taking 30 frames and trying to find the best guess based on where it is found in each of the 30 frames. Both the camera and object are (mostly) stationary (the object can move slightly, but optimally it will be stationary during the 30 frames).

This image demonstrates what I'm looking for. I know that the green box may not truly be what would be calculated, I just threw it in there to demonstrate. The red boxes are the guesses on each frame, and the green one is what I'm trying to calculate. Are there any known formulas/algorithms for this, or any references on where to start?

Note

I initially tried to just calculate the mode along the X-axis (ignoring width) (with each estimate rounded so that there would be some similarity), and picking a random rectangle whose x value was in that range for X but that was not giving me a very good estimate.


texts:
I am back to college after 6 years of professional life and I need help with the following problem

  [...]
  The standard form of the function is $S_{E}(t) = e^{j2\pi f_k t}$, whose derivation results from the convolution theorem:
  $$
h(t)\star e^{j2\pi f_k t} = \int_{-\infty}^{\infty} h(\tau)e^{j2\pi f_k (t-\tau)}d\tau = e^{j2\pi f_k t} \int_{-\infty}^{\infty} h(\tau)e^{-j2\pi f_k \tau}d\tau = e^{j2\pi f_k t} \cdot H(f_k)
$$
  According to the equation above, the transfer function in the time domain can be determined when the channel is excited with an Eigenfunction $s_E(t)=e^{j2\pi f_k t} $. Is this relationship also valid for the harmonic oscillation $s_O(t)= \cos(2\pi f_kt)$? Please provide your derivation (Fourier correspondence table)."

I need some guidance for this problem or some hint for textbooks.


texts: Transforming acceleration to a world reference

texts: I have a acceleration data relative to the sensor's coordinate and the sensor's rotation relative to the world coordinate.How can I transform the acceleration from the sensor's coordinate to the world's coordinate?


texts: Which image filter can be applied to remove gridded pattern from corrupt jpegs?

texts:
I have around 1,400 jpegs that have been corrupted somehow and have lost the backup images. They all seem to have the same gridded pattern of lines over each (i.e. the gridding does not shift from image to image.

Here's what one of these images looks like:

Are there any image filtering techniques in Matlab particulary or otherwise that will remove or smooth this gridding pattern?


texts: understanding bases and frames for Gabor transform

texts: For the 2D discrete Gabor transform, why is it that we cannot use a set of orthonormal basis for its representation, instead we have to use frames for representing it?


texts: Find the Fourier transform of $g(k)$ from $G(z)$ for frequency $=1/2$

texts:
$$G(z)=\displaystyle \frac{\frac{1}{z}}{1+\frac{5}{6z}+\frac{1}{6}z^{-2}}$$

I found:
$$g(k)=\displaystyle \left(\frac{-1}{3}\right)^k - \left(\frac{-1}{2}\right)^k$$

I don't understand how I can find the fourier transform of $g(k)$ from $G(z)$.


texts:
Let $ x(t) $ be a bandwidth limited signal such as $ \forall |\omega|>\frac{\pi}{T} : X^F(\omega)=0 $ while $ X^F(\omega)$ is the signal's Fourier Transform.

Let us denote $y[n]=\int_{-\infty}^{\infty}x(\tau)sinc(\frac{\tau-nT}{T}) d\tau$

I noticed that my professor said that because the signal is bandwidth limited and the width of the $sinc$ function is $T$ and it's orthogonal property, and with regard to ideal sampling and reconstruction we can say that $y[n]=T\cdot x[nT]$.

I understand that we can treat $sinc$ as a delta function somehow but I'm can't find the right mathematical explenation which had lead to this result.

I'd happy for some insights.


texts: Manually creating a lowpass filter from the frequency domain: what phase?

texts:
In an attempt to gain a better understanding of DSP, I want to create a very simple (1D) lowpass, or I think more correctly "stop-band" or "band-reject" filter, to filter out a single frequency, e.g., f2 in my code example below.

The idea is to build in in the frequency domain, by putting all ones values in every component of the filter's magnitude part EXCEPT of course in the position corresponding to f2. What i don't understand, is what phases am I would be supposed to put in the corresponding LP phase vector? (I think this is related to my problems of understanding phases in general)

For and ideal lowpass filter (brick-wall) I know the corresponding impulse response would be a sinc in the time domain. But e.g. if I built the magnitude part of the brickwall "manually" ones around 0 frequency and 0s for higher freq than the cutoff freq, I would have no idea what to put for the phase ?

My code:

clc;clear all;

fs=1000;
t=0:(1/fs):1-(1/fs);
f1=5;
f2=27;
A1=13;
A2=3;
foffset=3;
posFreqPos=f2+1;
negFreqPos=fs-f2+1;

s=A1*cos(2*pi*f1*t)+A2*cos(2*pi*f2*t);

S=fft(s);
Smag=abs(S);
Sphase=angle(S);

LP_mag=ones(size(S));
LP_mag(posFreqPos)=0;%filter out high freq f2
LP_mag(negFreqPos)=0;

%%%%%%%%%%%%%%%%%%%
% LPphase= ???
%%%%%%%%%%%%%%%%%%%

%the filter built from mag and phase
LPf=LP_mag.*exp(-i.*LPphase);

figure;
plot(LPf)

figure;
plot(s);
figure;
plot(Smag);

I have modified the code here, the first version didn't make sense sorry.
It's really a question about the phase.

The idea is to build a filter such as:

Following the convolution theorem which states that a point-wise multiplication in the frequency domain corresponds to a convolution in the time domain. Of course one simple solution which "roughly" works is to just set to zero the frequencies I want to remove (following the same idea as shown on the image ) in the magnitude image of the FFT of my image, the rebuild the image with

myImage_filtered = real(ifft(myImageMag_filtered.*exp(-i.*myImagephase))); %real(.) to avoid rounding error causing imaginary part to be non-zero

(image source:http://www.robots.ox.ac.uk/~az/lectures/ia/lect2.pdf )


texts: Comparison of Bilateral Filter and Anisotropic Diffusion

texts:
What are the advantages / disadvantages of bilateral filter and anisotropic diffusion for noise reduction?

EDIT: To be more specific - what are the practical differences in terms of quality, speed or flexibility? How should I choose whether to use AD or BF for noise reduction?


texts: Why $x(t) = \cos(\frac{\pi}{3}t)$ and $y(t) = \sin(\frac{\pi}{3}t)$ are considered identical signals?

texts:
Consider the following question that I toke from Signals and systems: Part I exercises, question 1:

  (b) With $x(t) = \cos(\omega_x(t + \tau_x) + \theta_x)$ and
  $y(t) = sin(\omega_y(t + \tau_y)+ \theta_y)$, determine for which of the
  following combinations $x(t)$ and $y(t)$ are identically equal for all
  $t$.

Given that:
$$
\begin{matrix}
\omega_x & \tau_x & \theta_x & \omega_y & \tau_y & \theta_y \\
\hline
\pi/3    & 0      & 2\pi     & \pi/3    & 1      & -\pi/3
\end{matrix}
$$

The solutions manual shows that $x(t)$ and $y(t)$ are identical with these values:

  $\omega_x = \omega_y$, $\omega_x\tau_x + \theta_x = 2\pi$, $\omega_y\tau_y + \theta_y = \frac{\pi}{3}(1) - \frac{\pi}{3} = 0 + 2\pi k$

  Thus, $x(t) = y(t)$ for all $t$.

It toke me sometime to understand this, but still I'm not sure how these signals are identical.

If we substitute the constants we will get:

$$
\begin{align*}
x(t) &= \cos(\frac{\pi}{3}(t + 0) + 2\pi) \\
     &= \cos(\frac{\pi}{3} t + 2\pi) \\
     &= \cos(\frac{\pi}{3}t) \\
\\
y(t) &= \sin(\frac{\pi}{3}(t + 1) - \frac{\pi}{3}) \\
     &= \sin(\frac{\pi}{3}t + \frac{\pi}{3} - \frac{\pi}{3}) \\
     &= \sin(\frac{\pi}{3}t)
\end{align*}
$$

which is clear that $x(t) = \cos(\frac{\pi}{3}t)$ and $y(t) = \sin(\frac{\pi}{3}t)$ are not identical:

Can someone please explain what I'm missing?


texts: Relation between samplingrate and frequency

texts:
I am working on Fourier Transformation, and applying this for recognizing an audioclip.

I have a 9 second long audio clip of a guitar strumming an A-Minor.
The audioclip has a sampling rate of 44100 Amplitudes per second, and a bitdepth of 16 bits.

I do a fourier Transform of the audiofile(green graph), and get a spectrum where the samples are the x-axis. I want to have frequencies along the x-axis, for being able to recognize the pitches, so I again can recognize the chord that is being played.

Instead I get samples. How can I convert this to frequency?

Here is a photo of my spectrums, one of them zoomed in on the samples from 0 to 10 000.


texts:
An input signal + (thermal) noise travels through a channel and can be measured at its output.

Is it possible to use cross correlation between input and output signal to measure group delay? If not, is there a better way to do this?


texts: Global variability index for group of signals

texts:
Suppose I have a method that I can use to generate $n_p$ signals (we can intend them as realizations of an unknown not stationary discrete-time stochastic process). Modifying the method, I can obtain other $n_p$ signals.
I'd like to quantify the "variability" of the several group of $n_p$ generated signals.
The procedure I am using is the following: For each time step I have $n_p$ values and I compute the Interquartile Range (IQR). At this point I compute the average of the IQRs in order to obtain a single value that I can associate to that trial. Another approach is substituting the IQR with the range between 2.5th quantile and 97.5th quantile, but the procedure is the same.
Is this procedure correct? Does exist other more rigorous or correct way to quantify the global variability of the bunch of signals I have generated?
A related question is: variability among signals


texts: Reasoning Behind Additional Phase Shift in DPSK

texts:
In MATLAB's Comm System Toolbox there is an option for 'Phase Rotation', defined as the phase difference between previous and current modulated symbols when the input is zero. This is the first time I've heard of this concept.

Let's take DQPSK as an example. Say my previous symbol had an absolute phase of $0$, (1+j0) and I am trying to encode '01'. Under the DQPSK scheme I'm familiar with, '01' corresponds to a phase shift of $\pi/2$. Therefore the absolute phase of this symbol would be $\pi/2$, (0+j1). MATLAB would describe this scheme as having a phase rotation of 0.

If the same example were to use a phase rotation as $\pi/2$ then the absolute phase of the symbol would be:

$0$ (phase of last symbol) + $\pi/2$ (shift due to modulation) + $\pi/2$ (additional phase rotation) = $\pi$

This brings me to my question. Performing the additional phase shift requires increased complexity at the receiver and transmitter. So what is to be gained from the process of adding an additional phase shift? Why do it in the first place?


texts: Showing that the sum of zero-mean noise is zero. Then computing the convolution of zero-mean noise with a given function

texts:
This is likely to be a quick fix for people with experience in stochastic processes.
Let $ \eta[k] $ be a sequence of Uniform noise, $ \eta \sim U([-M,M]) $. I want to test if the following is correct theoretically
\begin{equation*}
\exists B>0\ s.t. \left|\sum_{k\in\mathbb{Z}} \eta[k] \right| < B.
\end{equation*}
In the general case, I would also want to try to test if
\begin{equation*}
\exists B>0\ s.t. \left|\sum_{k\in\mathbb{Z}} \eta[k] \psi [n-k] \right| <B,
\end{equation*}
What I tried:
Clearly, for $\psi[k]=1$ the two equations above are equal.
For the first one, I tried using ergodicity, which leads to $$ \lim_{N\rightarrow\infty} \frac{1}{2N}\sum_{k=-(N-1)}^{N} \eta[k] =0,$$ but this does not imply $$ \sum_{k\in\mathbb{Z}} \eta[k] =0.$$
For the second one, it's easy to show that $$\left|\sum_{k\in\mathbb{Z}} \eta[k] \psi [n-k] \right|<M\sum_{k\in\mathbb{Z}} \left| \psi [n-k] \right|, $$ but I don't want to assume that $$\sum_{k\in\mathbb{Z}} \left| \psi [n-k] \right|<\infty.$$
Even if the reader might not have an answer, it would be very helpful to know if this is a trivial result in random processes I am not aware of, or if it is a more complex problem. Thank you!


texts: Lightweight audio listener for detecting blip

texts:
The challenge I'm looking at is to design an iPhone component that listens to microphone input and triggers when it hears a particular blip (preferably < 0.1sec duration).

I can design the blip myself, and also false positives are okay.

The key constraint is that the listener is lightweight, so it doesn't drain CPU.

Can anyone suggest a mechanism, or point me in a good direction?

π

EDIT:  this is as far as I have got:

I should be feeding audio into a ~1s buffer

so the first check may throw up lots of false positives,  but this allows a second check to delve into the one second history and determine whether it was indeed a false positive or a valid blip.

so the first check may just be listening for the presence of a particular frequency sustained over 0.1s

to do this I could feed incoming audio into a 100 sample (for example) ring buffer,  and then, 50 times per second multiply the ring-data by a sine wave (giving x) and cosine wave (giving y), effectively manually calculating a single FFT bin x+iy.  then I could flag whenever the phase remains roughly constant over three frames.

or maybe I could use 3 such rings,  length 99, 100, 101 samples.   and monitor the amount of energy getting accumulated in each;  if the 100-sample-ring wins and the neighbours are roughly balanced, that would be an indicator that the 100-ring's resonant frequency has been detected.

but this approach would require feeding all audio data into three rings. it isn't  particularly lightweight...  maybe I could only feed one in 17 (say) samples into each ring, throwing away the other 16.   As 17 is co-prime with 99,100,101  it would fill all cells of the ring before overwriting the first again.


texts: How to determine if the system is linear or nonlinear

texts:
Given a signal

$$y(n)=x(n)\cos(wn)$$

How to determine if the given signal is linear or non linear?

I am getting so confused reading the theory. If someone could help step by step to determine this. It would be great thankyou


texts: Why do DFT frequency buckets need to be divided by sample period?

texts:
edit: This is my first post in this community. I'm sure that my downvoter had a good reason to do so, but could someone please comment and tell me how I can better format my question?

--

I have a DFT algorithm that almost makes sense. The issue is when I go to plot the frequency response. For some reason, the frequency response gets multiplied by the sampling period (see first image).

Understanding this, I can fix it by dividing my frequency response X-axis by sampling period (see second image), but I don't understand why this is an issue in the first place.

Code is posted below - can anyone explain what I am missing?
(example uses a 1 Hz sinusoid)

Here's how I think it should work:

But here's what I actually have to do to make it work:

x_t = sin( 2 * pi * t);     % Input: 1 Hz Sinusoid
s_f = zeros(N,length(x_t)); % Output: Freq spectrum

%%%% init params
    T    = 4;     % (sec) time window
    dt   = 0.1;   % (sec) sample time

%%%% init comp
        N = T / dt;          % (ct) num samples
        n = 0 : N - 1;       % (ct) bucket index vector
        t = 0 : dt : T - dt; % (sec) time vector
smpl_freq = 1 / dt;          % (Hz) sampling frequency
 freq_res = smpl_freq / N;   % (Hz) frequency resolution
        f = n * freq_res;    % (Hz) freq. bucket vector
        b = 2*pi*(f/N) .* n.';

    anlyz_fn = cos(-b) + i * sin(-b);

%%%% run DFT
for k = 1 : N
    val = 2 * sum(anlyz_fn(k,:) * x_t.');
    s_f(k) = val;
end

%%%% Plot Results
subplot(2,1,1);
plot(t, x_t);

subplot(2,1,2);
stem(f(1:N)/T , abs(s_f(1:N))/N);


texts: Fast and Slow motion video detection using Optical Flow

texts:
I'm trying to calculate a "video motion" value in a given video sequence, meaning how fast or slow motion the video is. For instance, if a video is about a car racing, the value is high. Whereas if the video is about two persons standing/talking, then the motion is low.

What comes into my mind is using optical flow which is already an implemented function in OpenCV. I never used it. But I don't know if that's a good idea, and if yes, how to interpret it to a "motion value".

Is optical flow applicable here? How to use it for my purpose?


texts: Slow sampling of signal and averaging over n periods

texts:
Can one in theory achieve as high accuracy as needed by sampling a sinusoidal signal over n Periods? Is there a formula that connects the signal frequency (f), sampling frequency (fs), periods (P) and accuracy (Acc) or can someone explain how accuracy rise with number of periods? Let's say I want to know the signals amplitude with an error of less than 0.1%.

Lets say I want to sample a signal with a sampling frequency exactly four times that of the signal frequency. Let's say the first sample hit the sinusoidal signal at it's peak, the second at a zero-crossing, the third at it's negative peak and the fourth at a zero-crossing. This average will yield (1 + 0 + abs(-1) + 0)/4 = 1/2. Averaging over n periods would not change this average value in theory. Let's say the first value hits 45 degrees off the peak and the next 3 samples follows with 90 degree phase difference. The average would now be: (0,71 + abs(-0,71) + abs(-0,71) + 0,71)/4 = 0,71. Averaging over n periods would not change this average value either.

But I have been thinking.

If one introduces a small phase shift of let's say 1 degree per period based on the difference between the signal frequency and the sampling frequency, one could over 360 periods have sampled along the "whole" sinus with samples at 360 different points on a sinusoidal signal. This of course assumes the signal is periodically (and it is in this case). This would give a pretty good estimate of the sinusoidal signals amplitude, but how much is the error here? Is this something that can be calculated easily with some sort of formula or do I have to use MATLAB?

And what happens in "real" situations when the sampling frequency can't be exactly 1 degree off per period, but maybe 0,9384283437 and we have to sample e.g., 324986234 (just a big number to prove the point that an unrealistic number of periods have to be sampled) periods to be able to sample an integer number of periods. I understand that here there will be a trade-off between needed accuracy and number of periods needed to be sampled, but how can I calculate this?

If what I have written above makes sense and is correct, it seems doable to obtain the wanted accuracy by adjusting the phase shift and number of periods to sample over.

Other: I can understand how some would think of this long text as more of an explanation or help to calculate different things. And this is mostly true as I have no experience or academic background in digital signal processing and therefor need to get confirmation on my idea, thought and understanding of the subject. Things I ask here are things I have not found the answers to by any text book or by googling, even though they for sure are available a lot of places, none of them have been able to completely show me or make me understand this topic and I am therefor asking by writing this text above. Hopefully others may benefit from this questions and the answers provided. Thanks! =)


texts: How to cancel this noise to find numbers of DTMF tones?

texts:
Touch-tone telephones use a dual tone multi frequency (DTMF) scheme to encode key-presses as audio tones:

I have a signal containing 10 number tones. I used frequency response to show what frequencies the signal has, but they are affected by noise (I think this is white noise). Can you suggest me a way to cancel this noise to find frequencies of numbers encoded. Here is frequency response of each number in the signal:

Example: Frequency response of another signal that doesn't have noise, I can compare and find numbers encoded:

My professor gave me two audio data files, one is tones without noise and another is tones with noise. I used DTFT to plot each tone in each file:


texts: Difference b/w Spectral Entropy and Flatness Measure

texts:
What is the difference between Spectral Entropy and Spectral Flatness?
As far as I understand, both the terms can be calculated from the power (or amp) spectrum, and describe the flatness (whiteness) of the spectrum.

If you wanted to distinguish the voiced activity from the unvoiced one using either of these measures, which one would you use and why?


texts: How accurate is a MPU9250 IMU for direction and velocity measurement?

texts:
Pardon the intrusion I've posted this on the Raspberry Pi stack, but I wonder if I might find an answer here more quickly.

I'm currently experimenting with a MPU9250 Inertial Measurement Unit (gyroscope, magnetometer & accelerometer) mounted on a three wheeled car chassis, with two motors. I have mounted the MPU on a breadboard as far as I can from the magnets in the motors, which might throw out the IMU's magnetometer.

I don't need to locate the car's position exactly, but I do need its velocity in the X Y plane (especially heading and to a less extent magnitude). I can, no doubt, find the necessary calculations on line to approximate the velocity but what I'm not clear on is how accurate a MPU9250 will be. I have seen a figure in location error of 150m per minute in a paper from 2007, but nothing more recent referring to velocity.

Can someone point me in a suitable direction (no pun intended) ?

TIA


texts: Read microphones connected to 4x1 USB Hub using Python

texts:
I'm working on a sound source localization project which needs an array of microphones. I have 4 microphones with an Audio Jack plug which is connected to a USB Audio adapter. Last I use a 4x1 USB Hub to connect all the microphone-adapter components to my PC to read the incoming signal using Python PyAudio module.
Here is my configuration:

Here is my Python code:
import pyaudio
import wave

CHUNK = 2
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 8900
RECORD_SECONDS = 2
WAVE_OUTPUT_FILENAME = "output.wav"
NUM_OF_MICS = 4

p = pyaudio.PyAudio()

# Create a stream for each microphone with the IDs 1,2,3,4
streams = [p.open(format=FORMAT,
                  channels=CHANNELS,
                  rate=RATE,
                  input=True,
                  frames_per_buffer=CHUNK,
                  input_device_index=idx) for idx in range(1, NUM_OF_MICS + 1)]

print("* recording")

# Record 2 seconds of Audio for each
frames = []
for j in range(NUM_OF_MICS):
    row = []
    for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
        row.append(streams[j].read(CHUNK, exception_on_overflow=False))
    frames.append(row)

for stream in streams:
    stream.stop_stream()
    stream.close()

p.terminate()

print("* done recording")

# Save audio with the names {1,2,3,4}_output.wav
for j in range(NUM_OF_MICS):
    wf = wave.open(str(j) + "_" + WAVE_OUTPUT_FILENAME, 'wb')
    wf.setnchannels(CHANNELS)
    wf.setsampwidth(p.get_sample_size(FORMAT))
    wf.setframerate(RATE)
    wf.writeframes(b''.join(frames[j]))
    wf.close()

Looking at the problem, I am able to read the microphone outputs clearly when I select just one of them and start recording only using it. However, when I process the code above, the recordings with the names {0,2}_output.wav sounds okay, but the others - {1,3}_output.wav contain only messy sound (at least it is what I hear).
I have tested all the plugs and devices separately, and all of them work. I am open to suggestions.
Edit 1:
When I connect only 2 Microphones to HUB and set the variable NUM_OF_MICS = 2 I get both sounds, {0,1}_output.wav, as normal.
Edit 2
Inspired by the comment of @MarcusMüller, I recorded sound from Mics by multithreading. Again at least one of the saved sounds is just noise.
Here is the code:
# coding=utf-8
# Python3.6
# Class Record a wav in new thread
# Author:Why
# Date:2018.04.23

import threading
import pyaudio
import wave

class RecordThread(threading.Thread):
    def __init__(self, idx, audiofile='record.wav'):
        threading.Thread.__init__(self)
        self.bRecord = True
        self.audiofile = audiofile
        self.chunk = 1024
        self.format = pyaudio.paInt16
        self.channels = 1
        self.rate = 16000
        self.idx = idx

    def run(self):
        audio = pyaudio.PyAudio()
        wavfile = wave.open(self.audiofile, 'wb')
        wavfile.setnchannels(self.channels)
        wavfile.setsampwidth(audio.get_sample_size(self.format))
        wavfile.setframerate(self.rate)
        wavstream = audio.open(format=self.format,
                               channels=self.channels,
                               rate=self.rate,
                               input=True,
                               frames_per_buffer=self.chunk,
                               input_device_index=self.idx)

        while self.bRecord:
            wavfile.writeframes(wavstream.read(self.chunk))
        wavstream.stop_stream()
        wavstream.close()
        audio.terminate()

    def stoprecord(self):
        self.bRecord = False

from time import sleep

audio_record_threads = [RecordThread(idx=i, audiofile=str(i) + '_output.wav') for i in range(1, 4)]
# start
for thd in audio_record_threads:
    thd.start()
sleep(5)
for thd in audio_record_threads:
    thd.stoprecord()


texts: Extract hand written text from US census images

texts:
As many will know, images of all US censuses going back to 1790 are available online http://blog.archive.org/2010/12/22/1790-1930-u-s-census-records-available-free/. Unfortunately the quality of the images is very poor in places and, as far as I know, there are no free processed versions of them available.  If you take an example like the following from the 1920 census, what would be a good method to extract relatively clean images of the handwritten text from the background image and noise?

The original pdf for the page is at
http://wikisend.com/download/737634/page.pdf  as I don't have the reputation points to post it here yet (can someone with more rep upload it?).


texts: Comparison Between Guided Filter (Edge Preserving Filter) and Gaussian Filter

texts:
I am looking for a good example that showing the different between Guided and Gaussian Filters. The example need to show the benefit of Guided filter, (for example: preserving edge...). Could you give me some example for that task? Thanks in advance

I tried some example, but it did not show benefit of Guided comparison with Gaussian

% example: edge-preserving smoothing
% figure 1 in our paper

close all;

I = double(imread('.\img_smoothing\cat.bmp')) / 255;
I = imnoise(I,'gaussian',0.1,0);
p = I;
r = 4; % try r=2, 4, or 8
eps = 0.2^2; % try eps=0.1^2, 0.2^2, 0.4^2

q = guidedfilter(I, p, r, eps);
std_Gb=1;
beta=0.1;
%% Initialization
Ng=ceil(3*std_Gb)+1; Gaussian = fspecial('gaussian',[Ng Ng],std_Gb);
imsm = conv2(I,Gaussian,'same');

[Gx,Gy] = gradient(q );
NormGrad = sqrt(Gx.^2 + Gy.^2);
Gb1 = 1./ (1 + 1* NormGrad.^2);

[Gx,Gy] = gradient(imsm);
NormGrad = sqrt(Gx.^2 + Gy.^2);
Gb2= 1./ (1 + 1* NormGrad.^2);

figure();
subplot(2,1,1);imshow([I, q,imsm],[]);
subplot(2,1,2);imshow([Gb1,Gb2],[]);


texts: Harmonic Product Spectrum limitations in pitch detection

texts:
I've made a pitch detection algorithm using HPS and I'm facing a problem. I'm a beginner with signal processing and this site helped me before, so I though I should ask.

For higher pitches ( eg. >C6:1046.50hz ) I'm starting to get garbage data from the HPS. The higher the pitch the more garbage I get (by garbage I mean frequencies that are not octave errors nor harmonics and are around 1Hz-20Hz)

What I've empirical observed:

the results are worst for higher pitches, if the fundamental is above A6 or so, I get only garbage data.
the FFT works fine even for a very high pitch, (by fine I mean that its peak shows either the fundamental or one of its harmonics, but not garbage)
if I lower the number of harmonics I take in consideration for the HPS, the garbage diminishes, but that makes it harder to discriminate between the fundamental and the harmonics.

Here is my algorithm:

->raw buffer -> hann window, 16384 samples, 50% overlap -> zero padding -> FFT -> HPS

Any help is appreciated!

UPDATE 1: So, there are a few more things I want to add:

The sample rate I'm recording at is 44100 Hz
I've observed that this behavior is barely visible on a guitar, but very visible on an digital piano (for the same played note)
Here is my hps algorithm, maybe someone with greater experience can spot a problem.

int hps(float* spectrum, int spectrumSize, int harmonics) {

int i, j, maxSearchIndex, maxBin;
maxSearchIndex = spectrumSize/harmonics;

maxBin = 1;
for (j=1; j<=maxSearchIndex; j++) {
    for (i=1; i<=harmonics; i++) {
        spectrum[j] *= spectrum[j*i];
    }
    if (spectrum[j] > spectrum[maxBin]) {
        maxBin = j;
    }
}

// Fixing octave too high errors
int correctMaxBin = 1;
int maxsearch = maxBin * 3 / 4;
for (i=2; i<maxsearch; i++) {
    if (spectrum[i] > spectrum[correctMaxBin]) {
        correctMaxBin = i;
    }
}
if (abs(correctMaxBin * 2 - maxBin) < 4) {
    if (spectrum[correctMaxBin]/spectrum[maxBin] > 0.2) {
        maxBin = correctMaxBin;
    }
}

return maxBin;
}


texts: Fine-grained evaluation of speech recognition results

texts:
I know that usually ASR systems are evaluated using WER (word error rate), and I was wondering if it makes sense to use a more fine grained approach. E.g. transforming both the ASR hypothesis and the reference transcription to its phonetic representation (e.g. using an algorithm such as soundex or metaphone), and then taking the WER.

Some half-baked ideas for use cases:

perhaps this evaluation method can help to distinguish between errors that stem from a bad language model to those that stem from a bad acoustic model
when using third-party ASR APIs, where the there's no control over the language model, perhaps it can be used to pick the best hypothesis among the top results (especially when the speech contains non-standard names and other out-of-vocabulary) words


texts:
Suppose an image has noise, but it is exclusively salt noise. What effect will dilation have?
I am looking for a reference so I can answer this question. anyone has any idea?


texts: Bits - symbols mapping in M-PAM beginner question

texts:
I am trying to implement a M-PAM modulator in Matlab without using the built-in functions. I am confused when it comes to the symbols-bits mapping.

Say I have a sequence of bits: 1000110110 and M = 4 which means I encode k = log2(M) bits into each symbol. So, I get the vector s = [2 0 3 1 2]. But to my understanding this is not the proper mapping because the symbols arent symmetrical e.g. 1,-1,2,-2,3,-3. However, in functions like pammod I see examples that produce the symbols with randi that gives the first kind of mapping. Then, the mapping is passed as an argument in pammod. That is really odd for me since later on the amplitude per symbol is computed using the symmetrical mapping like (2m - M - 1)A (2m - M - 1 produces symmetrical symbols) where A is an energy constant and m = 1,2,3...,M.

So is it ok to use the first mapping when computing the Am amplitude but its less viable? Or I am misunderstanding the concept?


texts: Phase locking value / phase synchronization

texts:
I have pairs of EEG signals filtered to give me just alpha bands. For a machine learning problem I have found that calculating the phase locking value between the alpha signals of these 2 channels would be a useful classification feature.

I'm using this paper as a reference: http://www.ncbi.nlm.nih.gov/pubmed/22661936

I'm wondering what the correct method/implementation is to calculate PLV/synchrony in Python?

I have not been able to find any modules/code that would help me with this problem. That paper, for example, calculates synchrony between independent components after ICA, but I'm not employing that method here so not sure if their formula translates or if any adjustments are necessary for filtered signals

The closest thing I have found is this: https://www.nbtwiki.net/doku.php?id=tutorial:phase_locking_value#.VchjR6ZVhBc

However, while the code is laid out nearer the bottom of the page, it appears to be MATLAB code. It looks like there are some MATLAB methods being employed and I'm not sure how that would translate over to Python/numpy/scipy

I'm not particularly familiar with this domain and don't trust myself to port the code over without making logic errors, so it would be useful if someone could point me toward a Python implementation of this.


texts: Hardware advice for machine vision project

texts:
I am working in facial feature detection in video images. I was hoping to get some general advice about camera/lens technologies to determine if I can upgrade my camera/lens.

Basically, the problem is this:

I want to obtain high resolution images of facial features.

I currently use a Thorlabs DC1545M CMOS camera and a 16mm focal length lens. Generally, when I extract the facial features, the image regions have acceptable resolution if the face is about 40cm or less from the camera. If face moves further away from the camera, the resolution of the facial features starts to get too low for my purposes. Additionally, the camera/lens has a short depth of field so the face will often go a little ‘out of focus’ as the face moves.

For this region I was hoping to improve my camera and lens setup. However, I am not strong on camera hardware so I am not entirely sure if what I am thinking is available.

Basically, my ideal camera would do the following:

It would have an optical zoom.
The zoom would be programmable.
It would be able to have a long depth of field so the image stays in focus. Basically the face will be closer than about 100cm to the camera so I would like face to stay in focus.
I would like the camera to be sensitive to infra-red light (Near IR).

One other thing. Right now, I could use off-the-shelf camera/lens. However, I would also be interested in board level camera/lens components.

I was hoping someone could give me ideas about what I should be looking for.

Are there problems with my specification?
Do you know of any cameras/lens with the specification?
Do you have any general advice about what I should be thinking about before looking to buy a camera for this kind of research???


texts: Does it make sense to have complex numbers representing real-world audio signals?

texts:
In this course (Coursera: Audio Signal Processing for Music Applications) the professor uses an example of obtaining the DFT of a complex sinusoid:

\begin{align}
x_2[n]&=e^{\jmath\left(2\pi f_0 n+\varphi\right)}\quad \textrm{for}\quad n=0, \ldots, N-1\\
X_2[k]&=\sum_{n=0}^{N-1}x_2[n]e^{-\jmath2\pi kn/N}\\
&=\sum_{n=0}^{N-1} e^{\jmath\left(2\pi f_0 n+\varphi\right)}e^{-\jmath2\pi kn/N}\\
&=e^{\jmath\varphi}\sum_{n=0}^{N-1}e^{-\jmath 2\pi\left(k/N-f_0\right)n}\\
&=e^{\jmath \varphi}\frac{1-e^{\jmath 2\pi\left(k/N-f_0\right)N}}{1-e^{\jmath 2\pi\left(k/N-f_0\right)}}\,,
\end{align}

where the frequency is expressed as $f_0$ and it has an initial phase.

So it seems like real-world (discrete) audio signals might have complex values when being represented digitally, but does this make sense?
If yes, then how can we interpret this?
Isn’t the value of the input supposed to represent a change in air pressure?
So if for an input signal $x$, say $x[0]$ was $2 + 3 \jmath$, what would this tell us about the pressure on the diaphragm at that point of time?


texts: How should I isolate a single QPSK signal from a noisy band?

texts:
I've worked through a number of PSK demodulation tutorials, but they all start with a single PSK signal that fills the entire sample rate.

But what if the signal is in the real world? What kind of filter would I use to isolate the particular signal of interest? I guess something that preserves the root-raised-cosine pulse shape, so what would that be, and how do I know what the minimum passband width is?


texts:
I had asked a question last night in regards to how to process my data (Noise rejection / feature extraction) but I have a more specific question now that I hope someone can answer.

As mentioned in my other post, I have a microphone based sensor to detect muscle activity in the lower leg during walking, however the data is contaminated by the thud made during heel strike. As both the muscle contraction and heel strike noise are pretty reproducible on each stride I was hoping I could use some sort of feature extraction method to filter my data.

I've been using CWT and I believe they could do what I intend based on my current results. I've been playing around with specific wavelets but the symlets 7 seems to be giving the best results. My hope is that the coefficients obtained by CWT will vary based on whether they're noise or contraction information.

All processing is done in MATLAB. I've obtained the CWT simply by:

CWTcoeffs = cwt(data, 1:128, 'sym7');

and the corresponding coefficients of noise/useful data seem to do what I want, but now trying to use this information to remove what I don't want is proving difficult.

I've also seen a MATLAB function of scal2frq which I hope to use to provide more frequency specific results. As I know, very roughly, what frequency bands I'm interested in I want to use this function to change the CWT scale, but not completely sure how. I believe it's done by:

 s = [6, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 100];
 scale = scal2frq(s, 'sym7', 1/fs);
 CWTcoeffs = cwt(data, scale, 'sym7');

Which does produce results, but I'm not sure if it's correct.

Basically what I'm asking is if this method seems plausible, and if so how might I use the results to damp or remove the noise I'm not interested in.

Thank you!

EDIT: I should probably add some data! Here is someone walking in a straight line for 50 steps: https://www.dropbox.com/sh/jeoa8ll1leq8kbn/8jlEzbbW0R


texts: Resolution and accuracy of a stereo camera

texts:
My question is pertaining to how the parameters of a stereo camera system (focal length, base, height, pixel density) affects the accuracy as well as the resolution of depth measurement.  I do not have a formal background in computer vision or photogrammetry, I have a civil engineering background.

From what I understand, accuracy determines the error in measurement of depth. Say, the depth of a point is 2.1 meter and it is estimated by the stereo camera as 2.2 meter, then the error is 0.1 m.

Resolution is similar to least count, it is the least detectable change in measurement that can be done by the stereo camera system. Example, if the resolution is 1 meter, then it can differentiate between two points that are at depths of 5 meter and 7 meter (because depth difference is greater than the resolution i.e. 2 m > 1 m). BUT it cannot differentiate between two points which have depths 5 meter and 5.5 meter (because depth difference is less than the resolution i.e. 0.5 m < 1 m).

In Chapter 2, section 2.4 of this PhD thesis (Parameter and quantization analysis), what does the author mean by the term del Z , is it the error or the least count in depth measurement ?

In this first paper they have defined del Z as the resolution and in this second paper they have defined it as error. Can you guide me through my confusion?

PhD thesis : Depth recovery and parameter analysis using single-lens prism based stereovision system by KEE WEI LOON

First paper : Method for measuring stereo camera depth accuracy based on stereoscopic vision by Mikko Kytö*, Mikko Nuutinen, Pirkko Oittinen

Second paper : Quantization error analysis in stereo vision by C Chang, S Chatterjee

Also, can you point me to a source (for example a textbook) which deals with how resolution of a stereo camera can be found from it's parameters ?


texts: Recovering signal from magnitude and phase of FFT

texts:
I'm trying to code the basics of an analysis-synthesis system on MATLAB, but I'm getting incorrect results. From the Wikipedia page:

$$
X_k=\lvert X_k\rvert e^{i\angle X_k}
$$

Here's a simple MATLAB code:

y = speech(10:10+127);

yfft = fft(y,128);

spec = abs(yfft);
phase = unwrap(angle(yfft));

Y = spec .* exp(sqrt(-1)*phase);

yinv = ifft(Y,128);

yet y and yinv do not match. What's the issue here?


texts:
I am trying to understand the UWB technology and how it can be used for localization.

Are there any resources where I can study about the algorithms it uses to calculate the direction?

Also why does it able to provide a centimetre accuracy?

For my understanding, it sends pulses in different frequencies within the frequency band. I am not quite sure how the communication is established. Is there a specific protocol used similar to Bluetooth?

Thanks a lot!!!


texts: What is the DFT of a pure cosine wave cos(θ)

texts:
I want to find a DFT of a pure cosine wave cos(θ) sampled at N equally spaced points on the interval $[0, 2\pi)$

so for our cosine wave, I put my $x$ like this

  $x=cos(\phi)$

then I just put it in DFT formula

  $X[k]=\sum \cos(\phi)^{−j2\pi kn/N}$

and use euler furmula

  $\cos(\theta) = (e^{j\theta} + e^{-j\theta})/2$

now we have

  $X[k]=\sum(e^{j\theta} + e^{-j\theta})/2.(e^{−j2\pi nk/N})$

mathematically we can move 1/2 before  $\sum$ and separate the $\sum$ like down(because we have + )

  $X[k]=1/2\sum(e^{j\theta})(e^{−j2\pi nk/N})+1/2\sum(e^{-j\theta})(e^{−j\pi nk/N})$

know I do not know if I doing this right or not!?

and what should I do next?


texts: What are the constraints in design of discrete orthogonal wavelets?

texts:
Can anyone point me to literature that explains a quote from here :
Why is a wavelet transform implemented as a filter bank?

  So not all wavelets can be implemeted perfectly (invertible) with efficient filter banks. It is well known that discrete orthogonal wavelets cannot be real/symmetric/finite-length, except the Haar wavelet. Yet there exists a great deal of discrete wavelets that can be effciient on several signal/image/point cloud/mesh data.

~ Aug 25 '15 at 11:49 Laurent Duval


texts: FSK demodulator by integration if the samples per symbols is 2

texts:
Say I have a binary FSK with +f and -f frequencies and I have two samples per symbol.

Let's consider the "1) multiply with +f/-f then 2) integrate over the number of samples per symbol, 3) take absolute value, 4) take the difference" demodulator.

Lets call this type of demodulator Integrating FSK Demodulator.

If I have only two samples per symbol, then is the Integrating FSK Demodulator the same as if I would just use a differential FM demodulator (which takes 2 consecutive samples into account) ?

If they are different, what is the difference ?


texts: Windows Audio WAVEFORMAT buffer BYTE to 16-bit int

texts:
I am trying to understand audio-buffer processing at the low-level for the first time.

I have the following C++ code copying WAVE-format byte data from capture buffer of Window Core Audio (*ppData in that documentation), into an "AudioSink."

Could someone explain what's happening here (the "WHAT'S GOING ON HERE" in the code)?
I'm confused as to why this works, how the number of channels, number of frames, and the conversion between BYTE and int16 factor into the calculation?  I need to eventually convert this into float data so I need to understand what is happening!

Thank you!!!

int AudioSink::CopyData(const BYTE* Data, const int NumFramesAvailable)
{
    // Data is the ppData returned pointer from IAudioCaptureClient::GetBuffer

    std::lock_guard<std::mutex> lock(m_mutex);

    AudioChunk chunk;
    if (Data == NULL)
    {
        chunk.size = 0;
        m_queue.push(chunk);
        return 0;
    }

    // *****  WHAT'S GOING ON HERE  *******
    chunk.size      = NumFramesAvailable * 2;
    chunk.chunk     = new int16[chunk.size];
    int multiplier = sizeof(int16) / sizeof(unsigned char);
    std::memcpy(chunk.chunk, Data, chunk.size * multiplier);
    bool nonZero    = false;

    for (int i = 0; i < chunk.size; i++)
    {
        if (chunk.chunk[i] == -1 || chunk.chunk[i] == 1)
        {
            chunk.chunk[i] = 0;
        }
        if (chunk.chunk[i] != 0)
        {
            nonZero = true;
            UE_LOG(LogTemp, Log, TEXT("NumFramesAvailable: %d, Sample number %d, Sample value %hi"), NumFramesAvailable, i, chunk.chunk[i]);
        }
    }

    if (nonZero)
    {
        m_queue.push(chunk);
    }

    return 0;
}


texts: fftshift in MATLAB with even number of data points in double sided spectrum

texts:
I have a question with reference to this Table.

With even N, the frequency axis extremes should be $\pm$Fs/2, where Fs is the sampling frequency. However in the array we have only one value corresponding to the Nyquist frequency. Following the notation of the table in the first column, N=10, we have

[$c_{0}$ $c_{1}$ $c_{2}$ $c_{3}$ $c_{4}$ $c_{-5}$ $c_{-4}$ $c_{-3}$ $c_{-2}$ $c_{-1}$]

which after fftshift should become

[$c_{-5}$ $c_{-4}$ $c_{-3}$ $c_{-2}$ $c_{-1}$ $c_{0}$ $c_{1}$ $c_{2}$ $c_{3}$ $c_{4}$  ]

The $c_{-5}$  value corresponds to the Nyquist frequency. So how is our double sided frequency spectrum symmetric when N is even? For real valued function it will be zero, but is there a reason that MATLAB calculates the negative frequency first as shown in the Table?

Example:
A_even=[ 0 0 0 1 1 1 1  0 0 0],

N=10

B=fft(A_even)'

C=fftshift(B)

Then C is equal to

$$\begin{matrix} 0.0000 + 0.0000i\\
-0.3090 - 0.9511i\\
0.4271 + 0.5878i\\
0.8090 + 0.5878i\\
-2.9271 - 0.9511i\\
4.0000 + 0.0000i\\
-2.9271 + 0.9511i\\
0.8090 - 0.5878i\\
0.4271 - 0.5878i\\
-0.3090 + 0.9511i\\
\end{matrix}$$

This implies $c_{-5}$ =  0.0000 + 0.0000i  and $c_{0}$= 4.0000+0000i
Thanks.


texts: How to Solve Image Deblurring with Total Variation Prior Using ADMM?

texts:
How could one use the Total Variation frame work to solve the Deblurring problem?
Specifically using the ADMM as a solver.
One could assume the blurring operator is linear and shift invariant.
What are the advantages of the TV approach? What are the disadvantages?
This is a continuation of How to Solve Image Denoising with Total Variation Prior Using ADMM.


texts: What does minimum entropy deconvolution mean?

texts: I want to use minimum entropy deconvolution method to analyse vibration signals to detect bearing characteristic fault frequencies. I am confused as to what the meaning or exact definition of minimum entropy deconvolution is.


texts: Taylor series approximation in Harris corner detection

texts:
While watching through the computer vision lecture on interest point detection, computing $E(u,v)$ requires computing the quantity
$$E(u,v) = \sum_{x,y}(I(x+u,y+v) - I(x,y))^2$$
In the lecture, $I(x+u,y+v)$ is approximated as $I(x+u,y+v) \approx I(x,y) + I_x(x+u - x) + I_y(y+v -y)$.
The 1st degree taylor polynomial approximation about point $(a,b)$ is given as $$f(x,y) = f(a,b) + f_x(a,b)f(x-a) + f_y(a,b)(y-b)$$
I do not see how to reconcile the equation given above with the $1$st degree taylor approximation about point $(a,b)$ ?


texts: Help in understanding if the maximum likelhood estimation is working properly

texts:
I am learning estimation theory and need  help in understanding for educational purpose how the concept of ML works with the help of a step by step implementation. I am trying to find out the ML estimates of the coefficients of a moving average model. I am unable to understand what I need to do in order to get the log-likelihood curve, so that I can select the coefficients based on the curve. There are implementations in the internet but I wanted to make my own in order to get a clear picture. The way I have done is for the model

 y(i) =  0.6*x(i-1) ;
 z(i) = y(i) + w(i)

where the true coefficient is h = [ 0.6], the input is x and w is zero mean additive white gaussian noise with variance 1. I have used 4 different values of the estimates out of which one value is the true. If the implementation is correct, then I should get estimated coefficient as 0.6 because I am using the true known coefficient in the estimation procedure. However, this is not so. Where am I going wrong?


texts: Optimal FEC option for extremely low SNR situation

texts:
I am new to this site, which I joined with the aim of finding someone to help me with a little doubt.
I am trying to design a system that must be able to work at extremely low (the lower, the better, since that would improve the range) SNR (AWGN channel). Latency and datarate (less than 10Kbps at the source, low resolution imaging) are not a problem, so I am looking for the "best" FEC possible. It will use a BPSK with a roll-off factor of the RRC filter of 0,2.
As of now, the three options I am working with are Turbocodes, LDPC and BCH codes. The one I am considering implementing is an LDPC as outer code and a Turbocode as inner code, with an interleaver in between. However, I do not know whether this corresponds to the optimal configuration of outer and inner code.
For instance, the DVB-S2 standard makes use of a BCH code instead of the Turbo, while other spacial missions tend to use the latter.

Would any other combination of codes reduce the necessary Eb/No in order to achieve relatively low (<1e-04) BER?

How do these codes perform against burst errors? Apart from the interleaver between inner and outer code and a randomizer before the FEC stage, is there any other mechanism to improve this aspect?

What of the two (outer/inner) codes should have the highest coding rate and why?

Those are a lot of questions, but I would really appreciate if anyone could help in some way with any of them.
Thank you in advance


texts: The Gradient of Least Squares of 2D Image Convolution

texts:
Given the objective function:

$$ \frac{1}{2} {\left\| h \ast x - y \right\|}_{2}^{2} $$

Where $ h $ is the 2D convolution kernel and $ x $ is the 2D convolution image and $ y $ is a given 2D image.

What would be:

$$ \frac{\mathrm{d} \frac{1}{2} {\left\| h \ast x - y \right\|}_{2}^{2} }{\mathrm{d} h}, \; \frac{\mathrm{d} \frac{1}{2} {\left\| h \ast x - y \right\|}_{2}^{2} }{\mathrm{d} x} $$


texts: How to select the center frequency and filter type for 5-band digital audio equalizer?

texts:
I have a small team project: use Matlab implement a Gui 5-band digital equalizer using FIR and IIR filters (2 cases) - The sample rate of all audio files is standard audio 44.1kHz. Coding is not my concern, however, I have 2 questions

(1) What are 5 center frequencies that I should choose ?
I saw a homework problems select 500Hz, 1.5Hz, 4Kz, 10kHZ, and 16KHz but I am not sure how the author came up with these number.

(2) Should I use 5 bandpass filters? Or should I use 1 lowpass, 3 bandpass, and 1 highpass filter?


texts: How to plot the root of polynomial in Matlab?

texts:
I obtained this polynomial equations:

$$A(z) = 1 - 0.7987 z^{-1} - 0.125 z^{-2} - 0.511 z^{-3} + 0.06889 z^{-4} + 0.3465 z^{-5} + 0.4809 z^{-6} + 0.04951 z^{-7} - 0.5298 z^{-8} + 0.1828 z^{-9}$$

How do I plot the root of this polynomial equation? I want to observe how the roots are moving inside the system.


texts: Skel to infinity morphological operations on 3D volume

texts:
I have a 3D volume image that consists of 2D tomographic images. In MatLab, for 2D images, we can use bwmorph and call for 'skel' operation to infinity to get a pixel thick overall outline of the image. bwmorph cannot deal with 3D images, however, so I am looking around for implementing "skel" operation for such tomographic case.

I see that MatLab has provided an explanation for thinning algorithm (in 2D) but not skeleton algorithm. They are pretty much similar, but I just want to ask the community first: if I want to implement an algorithm for "skeletonize" all voxels of a volume (the end result should be all objects in the volume becoming 1 voxel thin. Ex. A 3D cylinder becomes a 3D line, a 10 voxels thick in diameter spline should become a 1 voxel thick in diameter spline, etc.), what are some of the things should I be looking for?


texts:
I was reading the book "Spectral Analysis of Time Series" By Herman Koopmans.
On Page 55, he explains that a specific type of non-stationary signal which is the result of adding weakly stationary ergodic noise to a deterministic signal can be decomposed to Wiener spectra. I wonder why there is a need for signal to be ergodic and why weakly stationarity is not enough to derive spectral summation formula for noise and deterministic part?

More specifically based on those assumptions he shows that one has:
$$C_X(\tau) = \lim\limits_{
\tau\to\infty}\frac{1}{2T}\int^{T}_{-T}
X(t + \tau)X(t) dt = C_S(\tau) + C_N(\tau),
\text{ almost surely}.$$

And then
$$F_X(A)=F_S(A)+F_N(A)$$
where $F_Z$ is the spectral distribution of stochastic process $Z(t)$, where
$$X(t)=N(t)+S(t)$$