texts: Do signals with a Fourier transform with discontinuities or zero amplitude (in some frequencies) have Laplace transform?

texts:
I am reading a book on Laplace transform, and in the section on the convergence of Laplace transform for various signals the following theorem is stated, without any proof :

If a signal's Fourier transform be zero in some frequencies, or have discontinuities, it will not have Laplace transform (like sinc function, or periodic signals)

I can not see the proof. For signals with a discontinuous Fourier transform I know that  $\int_{-\infty}^{\infty} |x(t)|dt$ may not converge leading to discontinuities in the Fourier spectra (again, like sinc), but I don't think it will lead to not having a Laplace transform at all.

What is the proof for the above statement? (if correct)


texts: convergence of Fourier transform of $e^{-t}\sin(2\pi ft)u(t)$


texts: Signifance of statistical information in a signal

texts:
I am learning control engineering for some time and I work with a lot of transfer functions and frequency domain design. Reading from textbook, to me everything seems deterministic. Whenever I come across noise, which is either measurement noise or process noise, I typically believe that their effects cancel out in long term in case of Zero mean process. However, when I started reading stochastic process or kalman filters, I see a lot of significance given to statistical properties of signals like mean, variance, correlation, and other moments etc. Having spent so much time on deterministic world, now I cannot understand importance of stochastic world. For example, If someone where to show me a stochastic process modeled as a state space equation with process innovation and ask to predict future events, I would say the mean of the process can be determined by deterministic part of SS equation. The process noise can be ignored since we can't predict anything about it unless it is not zero mean. What does it matter about the variance, or correlation of thr signal? Similarly, if one were to show noisy signal, I would ask to average out n past signals points to remove noise, or if we know spectral information of noisr, I would ask to design appropriate rejection filter and pass signal to it. Again can't think of a reason to put statistical properties here.
I know I am missing something here given that soo much I read about stochastic process, but can't understand what.


texts: How to calculate the frequency of the analog information signal? [FM]

texts: How to calculate the frequency of the information signal from the follow spectrum diagram (it contains only one frequency)? Information signal is also called as original signal but i'm not sure.


texts: How do I prove that delta - sinc function is the same as an (-1)^n times the sinc

texts:
$$\delta(n) - \frac{1}{2} \mbox{sinc} \left(\frac{n}{2}\right) = (-1)^n \frac{1}{2} \mbox{sinc} \left( \frac{n}{2} \right)$$

The picture shows what I've tried


texts: How to correct for delays in a PAM-X signal with orthogonal CDMA?

texts:
I have a receiver which receives data bits at a rate of 5kbit/s. The number of data bits per burst is low (say, 16 bits). These databits are obtained after despreading the incoming signal using an orthogonal CDMA code (8-bit Walsh Haddamard code). This implies that the incoming chip rate is 5*8=40 kchips/s. The actual signal I get from the ADC is an upsampled I/Q version at complex baseband, sampled at a certain sampling rate (e.g. 5Msps).
I implement the system in gnuradio (but the question is general).

I figured that instead of explicitely performing the despreading via multiplication and summing up the values, it is easier to use the cdma_code as a filter. This can be interpreted as a form of matched filtering (I think). However, this simplified version misses an important point: Timing. In the worst case, the downsampling happens at the symbol or bit transitions and the result is garbage. Hence I use clock synchronization based on polyphase filtering (https://wiki.gnuradio.org/index.php/Polyphase_Clock_Sync).

However, I have a multi-stage downconversion system here: I am able time-synchronize the chip stream with the Polyphase Clock Sync block. However, when I apply despreading (by filtering the chip stream with the time-reverse chip sequence and decimating) I again have a time alignment issue: the 8 bit chip code has to be aligned with the input signal.

I tried using the polyphase clock sync block where the matched filter combines the matched filter and the CDMA code as suggested in Marcus Müllers answer below. However, I think such a system is unable to find the correct offset.

Consider this simple MATLAB experiment which generates a sample stream encoding $[1,-1,1,1]$. The receiver simulates the "Polyphase Clock Sync" block in gnuradio by finding the time shift that minimizes $(b\cdot db/dt)_{t=nT}$ where $b$ is a shifted version of the input signal:

fs = 400e3;
fchip = 40e3;
% test bits 1,-1,1,1  and add zero-padding
testdata = [ 0 0 0 0 0 1 -1 1 1 0 0 0 0 0 ]';
% 8-bit Walsh-Haddamard
H = [ 1, -1, 1, -1, -1, 1, -1, 1 ];
SF = size(H,2);
Nbits = size(testdata, 1);

% the test data at the chip rate
testdata_cr = upfirdn(testdata(:,1), ones(1, SF), SF);

% the modulated chip stream
chips = testdata_cr .* repmat(H(1,:)', Nbits, 1);

% upconvert chip stream to sample stream using rrcos (for simplicity)
hup2 = rcosdesign(0.8, 15, fs/fchip);
samples = upfirdn(chips, hup2, fs/fchip);

%% RECEIVER
% define the matched filter (=rrcos + CDMA code) at the receiver
mfilt = upfirdn(H(1,:), hup2, fs/fchip);

x = filter(mfilt, 1, samples);

% This implements a simplified version of the Polyphase Clock Sync block
delays = -fs/(fchip/SF)/2:1:fs/(fchip/SF)/2;
res = zeros(length(delays), 1);
B = zeros(length(x), length(delays));
for m=1:length(delays)
    B(:,m) = circshift(x, delays(m)); % works because of zero padding
    %plot(b);hold all;
    v = B(:,m) .* gradient(B(:,m));
    res(m) = sum(v(1:fs/fchip*SF:end)); % sum samples
end
% find the delays where b * db/dt is approximately zero
zeroxing = @(v) find(v(:).*circshift(v(:), [-1 0]) <= 0);
idx = zeroxing(res);

%plot(delays, abs(res), '-', delays(idx), res(idx), 'o');
% plot the candidates
plot(B(1:fs/fchip*SF:end,idx))

Since this block uses $b$ as an objective function (using the delay index that minimizes the sum of the samples of $b\cdot db/dt$), there must be a global optimum which finds the correct sequence $[1,-1,1,1]$. However, there are multiple optimum delays (values close to zero):

Now I plot the resulting bit stream for all the delays where the objective function is close to zero and only one shift gives the correct $[1,-1,1,1]$ pattern:

I can reproduce this experiment with a gnuradio model as well (https://www.dropbox.com/s/48fy30vwkivahqz/test_polyphase_clock_recovery_cdma_direct.grc):

My question is: How to implement such a system and how would one do this in practice?


texts: How to use rectangular window design to design a length-9 polyphase filter which delays an input signal by 3/5 of a sample? An expression for the 9 coefficients is required.


texts: BPSK vs $\pi/2$ BPSK, what the benefits?

texts:
I have come across modulation techniques that have $\pi/2$ phase shifts from the regular constellations.

For example $\pi/2 $ BPSK vs constellation the regular BPSK.

Other examples include $\pi/2 $ QPSK vs. QPSK

I am wondering what are the benefits of phase shifts like this?

Thanks looking forward for your answers


texts:
I have been trying to come up with a region growing algorithm but I'm not sure that I fully understood the region growing segmentation method (for gray-scale images). Please correct me if I'm wrong:

I start from a seed point chosen by me (brightest value that fits the wanted region ,because the segmentation target is a girl's face).
From the location of that seed point I compare the adjacent points and if their value is between a given threshold and the seed point value then I add it to the seed point map(matrix).
I must try all the valid seed points for adjacent neighbors. The result is just plotting the seed point map (matrix).


texts: How can I determine the order of filter?

texts: This is my first study about signal analysing. I'm very confused about filter order. My problem is how can I know whether its 12-th order, or 2nd order like the book says so? I already knew that slope has 2 choises whether its in n multiples of -6n dB/oct or -20n dB/dec. If the slope is -20 dB/dec then the second order should have -40 dB/dec. For example, An n= 4th order is 24dB/octave slope. But, I saw this example below and pretty confuse about determine the slope of those two line and how can the first line is 12-th order. Its not like the slope reaches -240 dB/dec (-20 x 12) and the second line seems not like -40 dB/dec (-20 x 2). Is there anyone could explain this to me? Thank you.


texts: How to handle cross products in feedback loop?

texts:
I'm trying to simplify the following block diagram from

to the following block diagram

However, h(t), H(s) in time domain, has a cross product in it (gyroscopic torque). How can I represent the cross product in h(t) as H(s) so I can simplify the blocks? The goal is to have 1 transfer function to represent the system. Is this possible through linearization or any other techniques? Should H(s), gyroscopic torque, be injected instead of a feedback block? What are common methods to work around cross products?
[edit] More info: The output of G(s) or Y(s) is rate, w. H(s) is ideally calculating gyroscopic torque, w x Iw, where x is cross product and I is inertia.


texts: How to determine the filter type based on the impulse response?

texts:
When given a discrete impulse response, let us say it is from an FIR filter so it is finite, how can I assume the filter type?
The task is to recognize or to preclude one or more of the following types:

Low pass
High pass
Band stop
Band pass

For example, I read that a zero at $h(n = 0)$ (where h is the impulse response of my filter) means that the filter is a low pass but how can I say that with precluding the band stop immediately?


texts:
I'm currently on an SDR kick and reverse engineering and then emulating all of the remote controls in my house.  There are numerous solutions to transmitting signals over 315 or 433 MHz and you can get super cheap boards available on Amazon to do so.

One of my remotes is operating at 350 MHz (a Hunter ceiling fan).  I have no clue how to cheaply replicate this signal.  I can replicate using a HackRF One, etc, but using a cheap electronics board? I can't even find oscillators super cheap for that specific frequency, and am kinda at a loss.

I know that companies (Hunter, in this case) make these remotes super cheap, but I can't figure out how they are transmitting on that specific frequency (350, NOT 315/433).  I haven't taken my remote apart, but research and FCC lookups suggest Hunter typically uses Holtek chips, but I haven't found anything directly relevant.  The FCC lookup (internal photos) is a bit blurry and doesn't show the actual chip for my specific remote control.

How do I generate a 350 MHz signal with a microcontroller with cheap components?  (i.e. NOT a $350 SDR)


texts:
Anyone know if the Bode frequency shifter has been studied somewhere. I just used an audio plug-in called EchoBode from SonicCharge and this is claimed to use a frequency (pitch) shifting algorithm inspired by the Bode frequency shifter.

The pitch shifting quality on this is pretty darn good I think, thus why I'm asking about it.

Here it's claimed to involve a ring modulator and a Hilbert transform.

Frequency shifting is linear and thus produces inharmonicity, but for small (max. 1-2 semitones) the quality is possibly better than with "granular" pitch shifting approaches. The inharmonicity is also not necessarily distortion or "ring-modulated", but may be even musical for some sounds such as percussive instruments.


texts: How critical is the selection of the window function in STFTs?

texts: I have a sum of periodic signals that I am trying to untangle using time-frequency analysis. I seem to get wildly different results depending on the window length and shape. This is a problem because I want to develop an automated, and hopefully sequential algorithm to do the job.


texts: How to exploit auditory masking to boost intelligibility

texts:
I am currently working on a dynamic equalizer to improve a synthesized voice's intelligibility in noisy environments.

The current implementation of my algorithm simply applies a parametric EQ to the voice at the dominant frequencies of the ambient noise (ex : if a peak around 180Hz is detected in the acoustic scene - from a fan for example - the algorithm applies a PEQ at 180Hz).

This implementation does not take into the account auditory masking phenomenons. It seems to me that it would be more clever to boost the voice at neighboring frequencies in order to try and make it so the voice becomes the masker.

Is it really better to try and tackle the problem this way ? If so, what resources can I look at in order to get some inspiration on how to implement this algorithm.


texts:
Lets say, i have a line and i want to extend the line until the end of the image.
 The line is displayed in the first photo with the green is my basic line, i want to extend it like the second image, until the end of the image.
 I want to do this for all the lines that i have detected.
 Does anyone knows how to do this?


texts: Orthonormal Dictionaries for Band Limited Signals

texts:
If $\mathbf{x} = [x_0, x_1, \ldots, x_{N-1}]^T$ is the time sampled input signal and $\mathbf{Y} = [Y_0, Y_1, \ldots, Y_{N-1}]^T$ is the Fourier transform of the input signal, then a linear relationship between the input and output can be established with the help of a discrete Fourier transform (DFT) matrix and is given as
\begin{align}
\mathbf{Y} = \mathbf{D} \mathbf{x}
\end{align}
where
\begin{align}
\mathbf{D} = \frac{1}{\sqrt{N}} \begin{bmatrix} \omega^{0 \cdot 0} & \omega^{0 \cdot 1} & \ldots & \omega^{0 \cdot N-1} \\ \omega^{1 \cdot 0} & \omega^{1 \cdot 0} & \ldots & \omega^{1 \cdot N-1} \\ \vdots & \vdots & \ldots & \vdots \\ \omega^{N-1 \cdot 0} & \omega^{N-1 \cdot 1} & \ldots & \omega^{N-1 \cdot N-1}\end{bmatrix},
\end{align}
and $\omega = e^{\frac{-2 \pi i}{N}}$ is a primitive $N$-th root of unity. We can also see that, $\mathbf{D}^H \mathbf{D} = \mathbf{I}_N$, where $\mathbf{I}_N$ is an Identity matrix of size $N \times N$. The good thing about DFT matrix it covers frequencies from $[0,2\pi]$ and can be used as a dictionary to represent the input signal. This works well in practice when we don't know anything about the nature of the input signal.

Consider the case when we have some prior knowledge of the input signal. For example, let us assume that the input signal is band limited, i.e., if the signal is sampled at a sampling rate of $f_s$, then the input signal contains frequency components belonging to a specific frequency band, $[f_1, f_2]$, where $f_1 < f_2 \le f_s/2$. In such cases, only those columns of the DFT matrix that belong to the specific frequency range are useful. Instead of using $\mathbf{D}$, we may as well construct a new dictionary, say $\mathbf{D}_o$ with an improved resolution, i.e., instead of $N$-point DFT matrix on all possible frequencies, we have $N$-point matrix, but these points lie in the frequency range of $[f_1, f_2]$. This can be obtained by oversampling the current dictionary $\mathbf{D}$ and only extracting $N\times N$ subset of the overcomplete dictionary which belongs to the frequency range. However, the new dictionary (super resolution) does not demonstrate the orthonormal property of the DFT matrix, i.e., $\mathbf{D}_o^H \mathbf{D}_o \ne \mathbf{I}_N$.

What is the best way to design an orthonormal dictionary for a specific range of continuous frequencies? In other words, how to perform DFT for band limited signals with an improved resolution?


texts: difference between logged power spectrum and power spectrum?

texts:
What is the difference between a logged power spectrum and power spectrum... Well the log part. So can a normal power spectrum be converted to a logged power spectrum just by taking the log of the power spectrum?

Here is the code in which I am trying to convert:

import os
import sys
from os import listdir
from os.path import isfile, join
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sb
from matplotlib.colors import Normalize
import matplotlib
from matplotlib import cm
from PIL import Image
import ast

def make_plot_store_data(name,interweaved,static,delta,delta_delta,isTrain,isTest,isDev):
    Y =  np.array(range(0,static.shape[1]))
    X =  np.array(range(0,static.shape[0]))
    X,Y = np.meshgrid(X, Y)

    plt.pcolormesh(X,Y,np.log10(static.T),cmap=cm.jet,vmin=-6, vmax=2)
    plt.xlabel('Frames')
    plt.ylabel('Frequency(Hz)')
    plt.title('Power spectrum of ' + name)
    plt.colorbar()
    #plt.show()
    plt.savefig(plot+"/"+name+"_plot_static_conv.png")
    #raw_input("Something")
    plt.close()

    plt.pcolormesh(X,Y,np.log10(delta.T),cmap=cm.jet,vmin=-6, vmax=2)
    plt.xlabel('Frames')
    plt.ylabel('Frequency(Hz)')
    plt.title('Power spectrum of ' + name)
    plt.colorbar()
    #plt.show()
    plt.savefig(plot+"/"+name+"_plot_delta_conv.png")
    #raw_input("Something")
    plt.close()

    plt.pcolormesh(X,Y,np.log10(delta_delta.T),cmap=cm.jet,vmin=-6, vmax=2)
    plt.xlabel('Frames')
    plt.ylabel('Frequency(Hz)')
    plt.title('Power spectrum of ' + name)
    plt.colorbar()
    #plt.show()
    plt.savefig(plot+"/"+name+"_plot_delta_delta_conv.png")
    #raw_input("Something")
    plt.close()

    Y =  np.array(range(0,interweaved.shape[1]))
    X =  np.array(range(0,interweaved.shape[0]))
    X,Y = np.meshgrid(X, Y)

    plt.pcolormesh(X,Y,np.log10(interweaved.T),cmap=cm.jet,vmin=-6, vmax=2)
    ##plt.xlim(xmin, xmax)
    plt.xlabel('Frames')
    plt.ylabel('Frequency(Hz)')
    plt.title('Power spectrum of ' + name)
    plt.colorbar()
    #plt.show()
    plt.savefig(plot+"/"+name+"_interweaved.png")
    plt.close()
    if isTrain == True:
        convert = plt.get_cmap(cm.jet)
        norm = Normalize(vmin=-6, vmax=2)
        numpy_output_interweawed = convert(norm(plot_interweaved))
        numpy_output_interweawed.dump(numpy_train+name+"_normalized_interweaved"+".dat")
        numpy_output_interweawed_or = convert(norm(plot_interweaved))*255
        numpy_output_interweawed_or.dump(numpy_train+name+"_interweaved"+".dat")
    if isTest == True:
        convert = plt.get_cmap(cm.jet)
        norm = Normalize(vmin=-6, vmax=2)
        numpy_output_interweawed = convert(norm(plot_interweaved))
        numpy_output_interweawed.dump(numpy_test+name+"_normalized_interweaved"+".dat")
        numpy_output_interweawed_or = convert(norm(plot_interweaved))*255
        numpy_output_interweawed_or.dump(numpy_test+name+"_interweaved"+".dat")
    if isDev == True:
        convert = plt.get_cmap(cm.jet)
        norm = Normalize(vmin=-6, vmax=2)
        numpy_output_interweawed = convert(norm(plot_interweaved))
        numpy_output_interweawed.dump(numpy_dev+name+"_normalized_interweaved"+".dat")
        numpy_output_interweawed_or = convert(norm(plot_interweaved))*255
        numpy_output_interweawed_or.dump(numpy_dev+name+"_interweaved"+".dat")
    print str(name) + " Numpy Stored"

I am trying to store the logged filter bank energies here both as plot and data.
But I seem to be doing it wrong based on the images I get.


texts:
I have a Setup, where I receive 24-bit ADC samples in the two's complement in 8-bit chunks. Usually I just "converted" them into a signed 32-bit integer like this:

sample=((byte1<<24)|(byte2<<16)|(byte3<<8))>>8;

Now, for educational purposes I moved the project to an Arduino Due and want to use the CMSIS-DSP Library of the Cortex-M3.

The DSP Methods Support the Q1.31 Format. I've read a lot of different sources but don't quite understand what this means for me.

As I understood, the Q1.31 format can have values between -1 and 1. Am I supposed to scale my samples somehow? Or is it kind of implicit scaling by just using it with my samples?

Furthermore the documentation provides the following information:

RFFT Size: 512
Input Format: Q1.31
Output Format: Q9.23
Number of bits to upscale: 8

I don't understand what this means for the output I would get.

Can anyone point out to me what this means?
I'm quite new at this :-)


texts:
A discrete signal x is generated by the recursive process
$$
x_n = x_{n-1} - 0.2 x_{n-2} + w_n
$$

where $w_n$ is white noise with zero mean and unit variance. What is the optimum order of a linear predictor for this signal? What are the values of the prediction coefficients? What is the average power of the residual?

I would really appreciate if someone could help me with this question.

It's a past paper question not homework.

Thanks


texts: Pitch shifting with bins creating large feedback

texts:
I am attempting to create a pitch correction algorithm. I started by performing a test. The test goes as such:

Get WAV file
Split it into bins of size n (512 in my case)
Shift each bin by 2 semitones (using a high level pitch shifting algorithm)
Aggregate all shifted bins together to recreate audio file

However, when I do this, a large amount of noise relative to the size of "n" is generated (spectral leakage maybe?)
The smaller the size n, the larger the amount of noise

How do I implement the pitch shifting on a bin by bin basis while minimizing the noise, and how should I adjust for the phase shifting that the individual pitch shifts create?

Audio clips and code here (last clip in notebook is the one with all the added noise):
https://colab.research.google.com/drive/1cpRhPpvXY_9XZidjOLKk_wW15EnkqLEX?usp=sharing

My code that attempted to fix the problem, but failed:

def win_taper(N, a):
    R = int(N * a / 2)
    r = np.arange(0, R) / float(R)
    win = np.r_[r, np.ones(N - 2*R), r[::-1]]
    stride = N - R - 1
    return win, stride

def pshift(key, x, f, G, overlap=0):

    notes = frequencies(key)

    N = len(x)
    y = np.zeros(N)

    win, stride = win_taper(G, overlap)

    for n in range(0, len(x) - G, stride):
      w = manipulate(x[n:n+G] * win, sr, f)
      y[n:n+G] += w
    return y

Tapered function taken from here: https://lcav.gitbook.io/dsp-labs/granular-synthesis/effect_description


texts: Amplitude estimation of sinusoid in known spiky spectral noise

texts:
What is the "best" way to estimate amplitude of a known-frequency sinusoid in the presence of known spiky spectral noise (i.e. noise comprising a few spectral peaks at known frequencies)?

By "best", I mean highest accuracy and lowest variance for a given sampling period (assume the sampling rate is greater than the Nyquist frequency).
The phases of the spectral noise peaks are unknown, but the phase of the sinusoid of interest can be provided if it's useful.

The approaches I am aware of are:

Perform a DFT at the frequency of interest, and design the window function such that its nulls/zero-crossings are located at the known noise frequencies.
Use a least squares estimator (which is basically a DFT with a rectangular window?, and which wrongly assumes that the noise samples are uncorrelated), e.g. as described in this survey paper.

I can't think of a better way than method (1), which does not benefit from phase information, but I'm wondering if a better approach could be used which may even take advantage of phase information of the signal of interest.

Just as a note, though I don't quite understand why, I noticed that the nulls of a rectangular window fall at integer multiples of the frequency that completes exactly one cycle in the sampling period.


texts: What is the best way of filtering EEG signal for the specific frequency band?

texts:
I have an EEG data with a sampling rate is 500 Hz. Actually, there are too many ways to filter EEG signals. However, the abundance of options is not valid for me. I have to use a causal, linear-phase FIR filter with a small group delay as possible. I also want to -3dB attenuation at cut- off frequencies.
The problem arises at this point.  Look at the figure below.

I applied 30th order FIR filter (hamming window 4-30 Hz) on the continuous (non-epoched) EEG. The side-lobe attenuation for higher frequencies is satisfactory but the lower frequency components for this filter failed.
I don't want to use rectangular window because of relatively low side-lobe attenuation. How can I design ideal filter to make possible my intention?


texts:
The basic idea of up-sampling is to add $M-1$ zeros after each sample.
I need to make upsampling(factor of 3) of the function $rcosdesign(\beta, M, T)$ using the ZOH filter in Matlab.
$\beta=0.25$,
$M=6$,
$T=4$.

I didn't get a full understanding of the upsampling using this filter, so i need help on how this should be done.

Thanks in advance!


texts: Compensating for poor illumination across a specific image axis - possible solutions?

texts:
A friend of mine is working at an institute for nano-membranes. Currently they are using ImageJ and do a lot of manual (in my opinion inaccurate) work to process some membrane "photos" (images generated by a measurement process, I have remove the label at the bottom, which contains lens type, scale etc.). The results are mediocre and the director wants to change the software. However from what I discovered it's the lack of any knowledge in image processing that's the issue and no software can fix that.
One of the main goals is to find a way to calculate the pore size (yes, the pores are not circular at all so it's a different type of diameter :D). In order to do that they are converting the image to 8-bit mono and based on a manually set threshold attempt to generate a binary one. From there they do I don't know what but the final result is rather poor.
I checked one of the photos (image below). From years back when I was doing some image processing I know that adjusting contrast, smoothing, equalizing the histo etc. are vital pre-processing steps to ensure optimal results. Apparently no one at the institute knows that.
While looking at the photo and experimenting with it I noticed that there is an illumination problem on the horizontal axis. This is visible even before generating a binary image:

From left to right the image is getting darker. This (among other issues) would explain the weird results they are getting when the binary image shows up. From what I see the right most membrane wall (not the pores) is probably as dark as part of the pores on the left most side.
I gave a task to my friend to ask around what's up with the illumination in that microscope they are using but meanwhile I would like to explore a way to artificially compensate for this issue.
I did some digging and apparently converting to YUV and equalizing the luma (Y) should work. I would like to also explore other methods so that I can compare the final results. Any help would be appreciated.


texts: "Desired signal" in LMS adaptive filters?

texts:
I'm trying to understand how to specify the "desired signal" in adaptive LMS filters such as the following: This one, or this one page 7, or this one.

It seems like the example there uses it for noise suppression?
But why is the desired signal input + noise?
Isn't it what we want to get rid of, rather than desire?

I'm trying to use LMS for "arbitrary magnitude response" filtering (as suggested here).


texts: Understanding the units of wavelet time & frequency resolution

texts:
While using a continuous wavelet transform for my research project, I came up with some questions.
Having a set of equations for a Morlet wavelet,

$\psi(t)=\sqrt{\frac{2}{\pi}}e^{-t^2/2}e^{i6t}$
$\hat{\psi}(\omega)=2e^{-(\omega-6)^2/2}$

I have calculated the time and frequency resolution (i.e., $\Delta t$ and $\Delta \omega$, respecitvely) such that

$\sigma_\psi^2=\frac{\int_{-\infty}^{\infty}(t-t_0)^2|\psi(t)|^2dt}{\int_{-\infty}^{\infty}|\psi(t)|^2dt}=\frac{1}{2}$ and $\sigma_\hat{\psi}^2=\frac{\int_{-\infty}^{\infty}(\omega-\omega_0)^2|\hat{\psi}(\omega)|^2d\omega}{\int_{-\infty}^{\infty}|\hat{\psi}(\omega)|^2d\omega}=\frac{1}{2}$ where $t_0=0$ and $\omega_0=6=2\pi f_0$
$\Delta t=\sigma_t=s\sigma_\psi$ and $\Delta \omega=\sigma_\omega=\frac{\sigma_\hat{\psi}}{s}$ where the scale $s$ is approximated with $\frac{f_0}{f\cdot \text{sampling period}}$

I have been trying to calculate the Heisenberg box as the intervals $[t-\frac{\sigma_t}{2},t+\frac{\sigma_t}{2}]$ and $[\omega-\frac{\sigma_\omega}{2},\omega+\frac{\sigma_\omega}{2}]$, but the computation resulted with counterintuitive values, with $\Delta t$ being extremely large and $\Delta \omega$ being extremely small for almost every $t$ and $\omega$ values I plugged in.
As I read some previous posts (including here), it seems the problem may be coming from the units of the resolutions. I read that the units of $\Delta t$ and $\Delta \omega$ are

$[\Delta t] = \frac{\text{samples}}{\text{cycles}\cdot\text{radians}}$
$[\Delta \omega] = \frac{\text{cycles}\cdot\text{radians}}{\text{samples}}$

If I convert samples to seconds, the resulting intervals for the Heisenberg box seem to make sense. However, even if I change samples to seconds, the units still include cycles in them, and I do not know how I should interpret the values qualitatively.
My main questions therefore are (1) if the equations defining $\Delta t$, $\Delta \omega$, and $s$ are mathematically correct, and (2) how I should change the units of time and frequency resolution so I can interpret them in seconds and Hz.
Thank you very much.


texts: How to extract the maxima and minima of a noisy period input signal

texts: I have a (rough) known period sine wave coming in, held in an array, with superimposed noise. I need to find and count the maxima and minima (in C). Any suggestions or algorithms? The signal has already been received and buffered, so not real time.


texts: Why must the Region Of Convergence (ROC) contain infinity and the system function be a right-sided sequence for it to be causal?

texts: I need the simple logic on the condition a system becomes causal. We know that causal contains only past values. I can't relate this with the Region Of Convergence (ROC) concept.


texts: Nyquist-Shannon sampling theorem: implications on matching data records?

texts:
I have two data records $R_1$ and $R_2$ with sampling periods $T_1$ and $T_2$, where $T_1$ < $T_2$. These records arise from sampling and filtering two signals to remove any noise (including aliasing noise) from signals with shorter periods. This implies that the data in $R_1$ and $R_2$ are not instantaneous observations but represent average states on time scales of $T_1$ and $T_2$, respectively.

I want to fit a model $R_2 = f(R_1)$ and, thus, I want to match the two records as if they would've been sampled simultaneously, i.e., as if they would have the same sampling period.

I tried this by

(A) Upsampling $R_2$ to $T_1$;
(B) Downsampling $R_1$ to $T_2$;
(C) Downsampling both, $R_1$ and $R_2$ to $2 \cdot T_2$.

Afterwards I evaluated the performance of the model with cross-validation and found that the best match was obtained with (C).

I believe this is a consequence of the Nyquist-Shannon theorem, which says that $R_2$ contains complete information only from signals with periods of $2 \cdot T_2$ or longer, while events with shorter periods (for instance, $T_1$) are not resolved by $R_2$.

This means that I cannot determine accurately the relation $R_2 = f(R_1)$ at periods shorter than $2 \cdot T_2$. Therefore, the Nyquist-Shannon theorem seem to have obvious implications on how to match two records:

For instance, to upsample $R_2$ as to match $T_1$ would not be correct, since we have inaccurate information about $R_2$ on the time scale $T_1$. On the contrary, observing the Nyquist-Shannon theorem implies matching the two signals by downsampling both of them to a period of $2 \cdot T_2$ (or longer), a time scale where both records would contain accurate information. My questions are:

Is this notion correct, i.e., is the downsampling of both records to $2 \cdot T_2$ the correct way of matching the sampling period of $R_1$ and $R_2$?
If yes, could somebody provide a quote for this from a text book or a paper, as well as some prominent examples in the literature where two records or signals are matched like this, for instance from signal analysis, acoustics, electronics, meteorology, etc?


texts: Why is state-space representation more numerically stable than zeros-poles representation?

texts:
Matlab documentation says things like:

For high order filters, the state-space form is the most numerically accurate, followed by the zero-pole-gain form. The transfer function coefficient form is the least accurate; numerical problems can arise for filter orders as low as 15.

http://www.mathworks.com/help/signal/ref/besself.html

Conversions between the TF, ZPK, and SS representations involve numerical computations and can incur loss of accuracy when overused. Because the SS and FRD representations are best suited for numerical computations, it is good practice to convert all models to SS or FRD and only use the TF and ZPK representations for construction or display purposes.

http://www.mathworks.com/products/demos/shipping/control/GSModelTypeConversions.html?product=CT#9

You can represent numeric system components using any model type. However, Numeric LTI model types are not equally well-suited for numerical computations. In general, it is recommended that you work with state-space (ss) or frequency response data (frd) models, for the following reasons:
The accuracy of computations using high-order transfer functions (tf or zpk models) is sometimes poor, particularly for MIMO or high-order systems. Conversions to a transfer function representation can incur a loss of accuracy.

http://www.mathworks.com/help/control/ug/conversion-between-model-types.html#f3-1039600
I understand why zpk is better than tf, and know that ss can handle MIMO systems that the others can't, but is ss also numerically better than zpk?  Why?  Matlab generates filter prototypes in zpk and then converts them to ss for doing filter transformations, which seems odd since you can do the filter transformations directly in zpk without converting back and forth.


texts: Invertible multi-resolution representation of audio/speech signals

texts: What are the invertible (preferably linear) representations of an audio/speech signal which captures the essence of signal in different resolutions and details. Basically, I am looking for Laplacian/Gaussian pyramid, not for images, but for audio signals. The interesting aspect of it for me is that it keeps the coarse-level perceptual details and gradually fills in the fine-level perceptual details.


texts: Vivado Design Suite Reed-Solomon Decoder

texts:
in the description of Reed-Solomon Decoder v9.0 p 20

ERR_CNT Element
The ERR_CNT element gives the number of errors, erasures, and
punctures that were corrected. The width of the element depends on the
input parameters n and k. The width is equal to the number of binary
bits required to represent (n-k). If n-k = 16, for example, the
ERR_CNT element is five bits wide

Could someone explain me the example. 'If n-k = 16, for example, the ERR_CNT element is five bits wide'.
I thought it will be 8=(n-k)/2
EDIT 1: In the example n-k =16, then the number of errors ( error correction capability) is (n-k)/2 or I can compute it as 2*e+E<=(n-k), where e - errors, E- erasures


texts: Average spectrum representation - SonicVisualiser

texts:
I try to have a signal (speech) represented in time and frequency domain  (waveform, spectrum and spectrogram). I use Sonic Visualiser and for spectrum representation it shows an analysis at a given point in time.
I wonder what representation should I use to represent a selected area of the waveform e.g. a word, in frequency domain (spectrums). Sonic Visualiser doesn't give averaging options.

Vasiliki


texts: Digital Signal Processing DSP Overview study documents

texts:
Well, I couldn't find better expression to say what I want :(

I'm looking for a DSP study source, that doesn't dive too deep, and covers "all" or most of DSP topics, I just want to have an overview of it, then, as a next step, it will be easier to go deeper.

A PDF file, an online file, video course, tutorial, ... I french we say "Résumé de cours" or "course summary" but it didn't give me what I expected!

Plz, for those having no answer, plz, tell me how to ask about it and google it

Thanks in Advance


texts: Is there a condition for bandpass sampling?

texts:
Consider a signal that has lowest frequency component $F_l$ and highest frequency component $F_h$.
According to the theory of bandpass sampling, this signal can be sampled and succesfully recoverd if sampled at a frequency ($F_s$) twice the difference between highest and lowest frequency.

that is, $F_s=2 \cdot \left(F_h-F_l\right)$.

My doubt is , Is there a condition or restriction on $F_h$ and $F_l$ for bandpass sampling?


texts: How to implement Viola-Jones algorithm in Matlab?

texts: I am new in Image Processing and I want to implement Viola-Jones algorithm along with Haar Features for face detection in Matlab. Is there any proper documentation for this?


texts: Does the impulse response of a system have any physical meaning?

texts: In other words, what does the impulse response tell us about the characteristics of the system? For simplicity, let's assume we deconvolve a discrete output and a discrete input to obtain an impulse response that has n points. Does the amplitude of the first (or second, or third...) point indicate something? Does the length n tell us anything?


texts: Is RMS of a sound wave good measure of loudness?

texts:
I'm not talking about FFT, just the raw sound wave and the RMS of it.

Thanks


texts:
I have a very long data up to 8 millions of samples and want to decimate it to order of 1000s. I'm using following Matlab code to do this:

f = numberOfSamples/N; %N is number of points after decimation
p = factor(f); %
temp = rawData; %with length of numberOfSamples
for i = 1:length(p)
    temp= decimate(temp,p(i),10); %decimate with 10th order iir filter
end

Number of samples before and after decimation is not known, but the ratio, i.e. decimation number, is an integer for sure(that's given.) In other words, those are input to my program.
How can I decimate(including the decimation filter) the data in chunks and have the same result? One chunk computes some part of the decimated signal and the other chunk computes another part, etc.
I hope question is clear, any help is appreciated.


texts: Of the thousands to millions of frames that a video might have, how is a particular representative frame chosen to be the thumbnail?


texts: Speex echo cancellation takes a long time (~20s) to converge

texts:
I have been experimenting with Speex's echo canceller during the past few days.

I got the echo canceller to work, however, it takes a long time until it actually begins filtering out the echo. It seems like the adaptive filter takes a long time (~20s) to converge for some reason, after which it works quite well. I'm using a tail length of 100ms, but I tried changing that to shorter (and longer) - doesn't help.

Therefore I was thinking maybe I should save a working echo state to file, and read that everytime I start the app, instead of initialising an empty one every time. Does anyone have any experience with that? Speex has no built-in functionality to do that so I'm wondering whether this is even the right approach?


texts: Well known waveforms or signal equations for filter testing

texts:
I'm testing a software based DSP filter. To test I'm generating some sine waves and adding them together. I'm about to start trying to generate more complicated input signals with trigonometric functions. My question is whether there is a set of well known waveforms with algorithms that can be programmatically generated?

A simple example I currently use to generate an input waveform is:

yl_sum =  np.sin(2*np.pi*x / (freq * 3)) + np.cos(4*np.pi*x/(freq*2)) + np.cos(7*np.pi*x/(freq*2))

I was thinking there might be an existing set of algorithms along these lines that are a good basis to start testing with?


texts: Compute objective speech quality from Anritsu data

texts: I want to compute an objective speech quality however what I have right now is the Anritsu raw data (layer between the Base Station Controller and the Mobile Switching Center), this raw data does not contain the Noise power , the original signal power nor other needed data to deal with (Bit error rate , Frame error rate...). Is there any way to compute the speech quality MOS at the layer between BSC and MSC or I have to get data from a layer of low level.Thanks for support.


texts: The cutoff frequency is 0.05 Hz. The DC offset of the signal is 5mv. How to determine when the signal will stabilise to the baseline?


texts: DCT step suppress high frequencies in MFCC extraction process

texts:
I'm trying to get MFCC from speech audio data. I'm using 26 Mel Filter on 0-24kHz spectrum. My MFCCs doesn't look correct to me, cause always first bins have high values and values getting smaller through the high frequency bins, even with high frequency audio data.

Then I realized that the cos((PI/N)*(n+0.5)*k) part in the DCT Type II formula, causes this result. Here is how the value of that cos() part changes by increasing the number of mel filter bin:
http://img402.imageshack.us/img402/5994/dctresult.png

When I multiply the mel filter bank energies with that cos() part, the MFCCs have only low frequencies and high frequencies are getting suppressed. MFCC result of a "s" sound has a frequency of 5khz-10khz:
http://img9.imageshack.us/img9/4279/mfccresult.png

Here is my code of DCT(Discrete Cosine Transform) step:

numofMelFilters = 26;
numofMFCCs = 26;    // This ll be 12..
for(int k=0; k<numofMFCC; k++){
   for(int n=0; n<numofMelFilters; n++){
   MFCC[k] += melEnergies[n] * cos((PI / (double)numofMelFilters) * (n + 0.5) * k);
   }
}

I can't find out what I am doing wrong, any help will be appreciated. Thanks in advance..


texts: Does converting an FIR filter from causal to non-causal remove phase delay?

texts:
Let's say I have a causal 3-tap FIR filter:
$$y[n] = ax[n] + bx[n-1] + cx[n-2]$$
Assuming I have access to all the data prior to filtering and generate a similar non-causal filter:
$$y[n] = ax[n+1] + bx[n] + cx[n-1]$$
Would this new filter have the same frequency response but with different phase delay?


texts: Lowest frequency within pitch detection in polyponic sound

texts:
I perform some tests where I run cepstrum pitch detection algorithm over polyphonic sound. Result shows that there is almost always occurrence of lowest frequency of tones played simultaneously.
I think this is because the lowest frequency has the longest period. But I do not know if it is true or why it is so.
Can you somebody explain this or why there is lowest frequency? Or suggest some publications?


texts: Confusion between samples per second and samples per symbol

texts:
My understanding of sampling frequency is when we have an analog signal x(t) we convert it to a digital signal. Assume the sampling frequency is denoted by $f_s$ then the sampling time $T_s$. In my understading this is denoted the number of samples per second.

In MATLAB programs, I have come across generation of base band signal. The authors have upsampled the base band signal and the sampling rate was stated to be 3 samples per symbol.

My question is what does samples per symbol mean.Assuming we have QAM symbols are we repeating it three times?

Thanks


texts: Grouping clusters using Mahalanobis distances

texts:
I need to know the "number of clusters" in a dataaset.
To find the number of clusters, I am using a Gaussian Mixture model fitting,
bear with me,
Because the underlying distributions (each cluster) are not Gaussian, the GM tends to give very bad fits, because it is trying to compensate for the skewness of the data by increasing the variance of the Gaussian it fits and things like this. I figured, I may be able to solve this by fitting more Gaussians than are clusters expected to be in the data and then based on the distance of clusters find out which ones are true clusters and which ones are fits to the same cluster.

Now my problem is I have a distance matrix (Mahalanobis distances), distances between the fitted Gaussians coming out of the Gaussian mixture model, but I have no reliable way of counting the clusters,

to make it a bit more clear, if I have two real clusters in the dataset, and I fit 6 Gaussians, I expect to get 1-5 of them fall on top of one of the real clusters and the remaining 5-1 of them on top of the other cluster. This means looking at the distance matrix I expect to see quite a few (maybe 5) large distances [these are between-cluster distances] and lots of small distances [within-cluster distances].

here is a sample of the distance matrices I have, the dendrograms are just to help "see" the structure and have no additional information.

if anyone is interested in the raw(more raw) data, I can provide the data but if you don't have the domain specific knowledge (this is a spike sorting problem, in a neurophysiology context) it will not be easy for me to describe the data event in a few pages.

Any comments?


texts: What is the link between the homography computed over 2 images and the homography computed over the same images upside down?

texts:
With OpenCV, I compute the homography between, say, these two images:

and

Don't worry about the strange white form on the right side, it is due to the smartphone holder I use. The homography, given by findHomography() function (using points detected with the Fast feature detector and the HammingLUT descriptor matcher), is:

A = [ 1.412817430564191,  0.0684947165270289,  -517.7751355800591;
     -0.002927297251810,  1.210310757993256,     39.56631316477566;
      0.000290600259844, -9.348301989015293e-05,  1]

Now, I use the same process to compute the homography between the same images that have been rotated by 180 degrees (upside down), using imagemagick (as a matter of fact, I would be equally interested to know the relation for rotation of 90 or 270 degrees...). Here they are:

and

With these images, the homography becomes:

B = [ 0.7148688519736168,  0.01978048500375845,  325.8330631554814;
     -0.1706219498833541,  0.8666521745094313,    64.72944905752504;
     -0.0002078857275647, -5.080048486810413e-05,  1]

Now, the question is how do you relate A and B? The two first diagonal values of A are close to the inverse of the same in B, but it's not very precise (.707805537 instead of 0.71486885). My ultimate purpose would to use the wanted relation to transform final matrix, avoiding to compute a costly image rotation.


texts: Analytically determine a PSD from a transient function

texts:
This question is related to a series of questions I have asked about the units of PSD and ESDs. I include it as a separate question as it may have worth in isolation.

As I understand it to compute the power spectrum density from some transient signal one takes the approach of computing the truncated Fourier transform
$$\mathcal{F}_T(\omega) = \int_{-T/2}^{+T/2} e^{-i \omega t} f(t) \ \ dt$$
Taking the absolute value square and then taking the limit as $T\rightarrow \infty$
$$\text{PSD} = S_{x}(\omega) = \lim_{T\rightarrow\infty}\frac{1}{T}|\mathcal{F}_T(\omega)|^{2}$$
When ignoring the normal dimensioning of units as described here by a very nice answer by Matt L., and also descibed here and in the Wikipedia article here, we get the familiar units of a PSD of $\rm{[V^{2}/Hz]}$.

My question

So that is the background and I believe I follow it (please say if there is a mistake or something overtly wrong!)

But If I want to analytically derive a function for a PSD or $S_{x}(\omega)$, I always end up with zero as the $\lim_{T\rightarrow\infty}$ kills the expression because of the factor of $1/T$. Is this the correct approach to analytically deriving a function or lineshape for a PSD with correct units? The end goal is to use it to fit a function to spectra acquired with an FFT spectrum analyser.


texts: SNR calculation when noiseless signal is not known

texts:
I have a noisy signal. Then using filtering techniques I got the estimated noiseless signal. I dont have the original noiseless signal. I have calculated SNR the following way:
$$
\textrm{SNR}=10\log\left(\frac {\textrm{Estimated Noiseless Signal}^2} {\left(\textrm{Estimated Noiseless Signal-Noisy Signal}\right)^2}\right)
$$

Is this method right?


texts: Why the transfer function is equal to the output in this case

texts:
In this description of transfer functions on the z-plane (image linked), I'm confused by equation 1.49, which says that $H(f)=v_{out}(f)$ when $v_{in}(f)= 1 * e^{j 2 \pi (f/f_s)}$. (For another matter I'm confused that they're kind of conflating the frequency response and the Z-transform, but since the point of this section is evaluating the Z-transform on the unit circle to get the frequency response I guess I see what they're trying to say).
Equation 1.49 is confusing to me since it's saying that for this given input, the output is the same as the transfer function. But I don't see how this is the case here. I would see how this would hold for an input whose phasor is equal to 1 but I don't think that's what's going on here. My understanding of how the output of the system could be equal to the transfer function is that it's true for an input whose phasor is 1, like in this description:
Suppose I have an LTI system with freq. response $H(\omega)$. If I input a complex exponential signal $x(t) = e^{j \omega t}$, then the output is the same complex exponential but scaled by the complex frequency response, i.e. $y(t) = H(\omega)e^{j \omega t}$. Hence, the output $y(t)$ is not exactly equal to the input, but a scaled version of the input.
However, expressing the same thing in terms of phasors, then $x(t) = (1e^{j0}) e^{j \omega t}$, where the phasor of $x(t)$ is $X = 1e^{j0}$. This means that the phasor of $y(t)$ is $Y = H(\omega) = |H(\omega)| e^{ j\angle H(\omega)}$. Now you can say that the output phasor is equal to the transfer function, since the input phasor is equal to 1.
But in the example above, the input is not a phasor equal to one since it has nonzero phase.
Am I missing something here?


texts:
I am trying to take a signal $F(t)$ that has been sampled at some time DelT, I then wish to pass this signal through a channel $H(s)$. To do this I am sampling my signal $H(s)$ at DelT time intervals then finding the Z-transform $H(z)$. How would I go about applying this in matlab?

Currently I am using c2d to convert s-domain to z-transform for my channel but am unsure how I can go about the convolution with my sampled signal which is just an array of numbers. I have tried to take the fft of sampled $F(t)$ then use freqz of $H(z)$. To begin with I am just trying to apply a simple time delay $e^{-st}$ to the signal.


texts:
My understanding is that a distinct sound will generate waves of identical amplitude and frequency, but that most things (such as people's voices, music intsruments, etc) produce multiple distinct "sounds" (waves) at the same time.
My understanding is that the base wave generated by something that does this (something like a human voice) is called the fundamental, and that all the other "secondary" sound waves/signals generated are referred to as the harmonics. And that the set of waves as a whole (the fundamental and any accompanying harmonics) is referred to as the timbre.
Hence, my understanding is that the "sound" we hear with our ears is really the timbres of the things making the sounds (some type of aggregation/composition of its fundamental plus any other harmonic waves generated).
So to begin with, if my understanding above is incorrect or misled, please begin by correcting me! Assuming my understanding is more or less correct however...
In this video of a digital oscilloscope in use you can see (around 0:40 seconds in) that when the author speaks, only a single wave is produced. Whereas, given my understanding of "sound" as being the timbre, I expected to see multiple waves displayed on the screen (one for the fundamental and any others for the respective harmonic waves).
My question: is this oscilloscope displaying the author's "timbre" wave (some type of aggregating or composition of his voice's fundamental plus any accompanying harmonic waves)? Or is it somehow filtering out the harmonics and only showing his fundamental wave? Or is my understanding of sound waves inherently flawed?


texts:
What is the difference between Rate , throughput and  capacity ? Their unit are all bps/s,but it seems that there are something different between them,can anyone tell me?

My research is optimizing something in energy harvest and SWIPT,and in the internet,it said the throughput and capacity have some difference,but i did't understand it.

WIKI:

Capacity: capacity is the tight upper bound on the rate at which information can be reliably transmitted over a communication channel.

throughput:
throughput is the rate of production or the rate at which something is processed.

rate formula : $time \times log_2(1+SINR)$

Because the unit of them are different,so i think maybe they should be the same,just apply to different place,but i am not sure about this!
When i maximize the rate,do i also maximize the throughput and  capacity ?


texts: Removing low frequency vibrations from measured signal

texts:
Suppose I have two sensors $s_1$ and $s_2$. $s_1$ measures the desired heart signal (with most of the frequency content below 100 Hz), and the other is a reference sensor picking mainly background noise.

Due to the pumping of the blood in the heart, there is also low frequency vibrations, mainly below 10 Hz that contaminates both sensors. The sensors are spatially separated, making direct cancellation unfeasible.

The figure below shows the frequency content of both sensors ($s_1$ is blue and $s_2$ is red), following discrete Fourier Transform. The visible peak is the 50 Hz mains hum.

Nonlinear denoising is effective in removing mains hum without compromising the signal. However, it seems to be ineffective in removing the low frequency vibrations. The figure below shows the effect of applying it to $s_1$

My question is how can these vibrations be removed from $s_1$, without causing too much distortion to the desired signal?


texts: Odd problem with really long sinc filters

texts:
I'm trying to build a "perfect" low-pass filter as an exercise to test that I've understood some basics in signal processing.

I've computed the required length of a sinc function such that at either end the value is 0 for a given integer bit depth of output. For example, 16-bits would require a filter that is 41722 taps.

I'm then applying this filter to a frequency sweep file sampled at 48kHz, with Fc set at 0.5, thus it should act as a low-pass filter with the cutoff frequency at 12kHz.

When I feed this filter some data I get unexpected results. For the 16-bit filter, the low-pass effect is clear, but there is data beyond 12kHz as well as other corruptions. For a 20-bit filter, 667543 taps, the output is totally wrong.

In the 16-bit case, applying a blackman window to the sinc function improves the output and makes it look correct, but this doesn't help in the 20-bit case.

I've attached a couple of images to illustrate the problem. I'm fairly certain that my sinc function is generating correct data. I'm using vDSP_convD to apply the filter (I've also tested with a handwritten function, with no change.)

Am I misunderstanding how a sinc function can be used as a low-pass filter, or am I running into other problems?

This is the output of the 16-bit, 41722 tap filter:

This is the output of the 20-bit, 667543 tap filter:

This a graph of -200..200 on the 41722 tap filter:

This is the frequency part of the FFT of the centre of the 41722 tap filter.


texts: Interpolating irregularly missing data points of regularly spaced data

texts:
If I have a set of regularly spaced sample data (spacing $\delta x$) and some of my data is missing (zero) but not at regular intervals, i.e.

$[a_0, (missing), (missing), (missing), a_4, a_5, (missing), a_7, a_8, a_9, a_{10}, ...]$

Can digital signal processing techniques be used to interpolate the missing data?

I've only read of interpolating by a FIR or IIR when the missing data is every nth element.

There is a lot more data present than missing.

The interpolation can be done offline.

The first or last data point(s) might be missing.


texts:
At this USGS very good site about rms noise in sensors, a phrase regarding third octave bands (the original topic) appeared.

  The figure displays the minimum vertical seismic noise directly as rms amplitudes in a bandwidth of one-sixth decade. By coincidence, these amplitudes may also be interpreted as average peak amplitudes in a bandwidth of one-third octave (a standard bandwidth in acoustics)

One sixth decade factor is $10^{1/6}=1.467799$; the 10th factor $10/6=1.666666$, and one third octave factor $2^{1/3}=1.259921$, none of them being comparable.

It happens actually to be comparable with one tenth decade factor $10^{1/10}=1.258925$.

Note the rms and peak distictions... Why the author state as coincident both log factors?

In addition, the same paragraph continues with:

  An example: the minimum vertical ground noise between the periods of 10 and 20 sec is at -180 dB relative to  ${\rm 1 m/s^2}$, thus  ${\rm 10^{-180/20}\;m/s^2 = 1\;nm/s^2}$ average peak in one-third octave.

Which is ok, but then:

  Since the bandwidth considered is a full octave, the total average peak amplitude in this band is  ${\rm\sqrt{3}\;nm/s^2}$.

In here i honestly dont know why a $\sqrt 3$ factor appeared...


texts: Count heart beat from audio capture using smartphone

texts:
I am working on a project where I am required to perform heart rate BPM calculation from an audio signal captured using smartphone microphone / hands-free. Constraint is not to use ML. So I am left to play around with filters and shannon.

I am having difficulty cleaning the noise from signal.

Here is what I have so far.

[read audiofile] -> [decimate signal by factor 5] -> [low-pass filter butterworth 350 Hz Order 6] -> [normalize] -> [signal^2 (convolution in TD)]

Use squared signal to workout a threshold and attenuate anything below threshold from the original signal, use shannon energy envelop.

While this pipeline works for most cases when the environment is relatively quiet. But it fails when there is grounding noise or other sharp noises.

I am attaching the samples for anyone who would like to assist.
Audio Samples
https://app.box.com/s/jli6dut9v4ttrqnmuzjqhkxy701izh2q

I would like help on
a) removing grounding noise
b) removing crackles
c) enhancing beats or removing noise floor in general.


texts: Understanding correlation in image processing using examples

texts:
I have been trying to understand the intuition behind the correlation. I understand from this guide that correlation is a way to detect a known waveform in a noisy background. I have seen from this SO answer that correlation can be used for template matching. So I decided to try it and hence the reason for my confusion.

Consider a 2D array,

+---+---+---+---+
| 1 | 1 | 1 | 1 |
+---+---+---+---+
| 1 | 1 | 1 | 1 |
+---+---+---+---+
| 0 | 0 | 1 | 1 |
+---+---+---+---+
| 1 | 1 | 1 | 1 |
+---+---+---+---+

I did correlation without padding with the below array,

+---+---+
| 0 | 0 |
+---+---+
| 1 | 1 |
+---+---+

The output I got is,

+---+---+---+
| 2 | 2 | 2 |
+---+---+---+
| 0 | 1 | 2 |
+---+---+---+
| 2 | 2 | 2 |
+---+---+---+

I was expecting a maximum value where the smaller array was present at the big array. But I got multiple peak values. Can you help me understand why this happened and how to overcome it?

Thank you.


texts: Distinguish between chords and single notes

texts:
I am implementing a pitch detection system where I detect pitch in single notes (guitar).

I recently found this library, that detects chords in an audio signal.

When there are chords in the signal, this has proved great. The accuracy is great and it is also quite fast. However, it also detects chords when a monophonic melody is playing. That's why I want to implement an algorithm to distinguish between moments when there is melody playing or chords playing.

The chord detection algorithm returns something like this:

[(  0. ,   1.2, u'N') (  1.2,   3.4, u'E:maj') (  3.4,   5.5, u'F:maj')
 (  5.5,   7.6, u'F#:maj') (  7.6,   9.7, u'G:maj')
 (  9.7,  11.7, u'G#:maj') ( 11.7,  13.8, u'A:maj')
 ( 13.8,  16. , u'A#:maj') ( 16. ,  18.1, u'B:min')
 ( 18.1,  20.4, u'C:maj') ( 20.4,  22.5, u'C#:maj')
 ( 22.5,  24.7, u'D:maj') ( 24.7,  26.6, u'D#:maj')
 ( 26.6,  28.4, u'E:maj') ( 28.4,  39.7, u'N') ( 39.7,  41.1, u'D#:maj')
 ( 41.1,  46.1, u'N') ( 46.1,  48. , u'A:maj') ( 48. ,  52.3, u'E:maj')
 ( 52.3,  52.7, u'N')]

Where each element of the list represents the start time, end time and chord. "N" stands for no chord.

I tried looking at mean and variance difference in the chromagram and spectrogram but nothing was very different as to make a rule out of it.

I also tried to take the 3-4 strongest peaks in every frame. If those peaks are close to integer multiples of the lowest one, then they are harmonics so there is probably one note. The problem is that in low notes (for example the low E string) there is a lot of inharmonicity anyway, so if I take the three peaks for a single E2 note played, one of them will probably not be a multiple.

Is there a good way to do this? Papers I read focused on labelling the chords but not finding if they were played.


texts:
The goal is to use a Kalman filter to estimate velocity from noisy position measurements. I am attempting to implement a version of the filter used in the example on the Wiki page Kalman Example for predicting velocity. However,  attempts have so far been unsuccessful.

I believe my confusion is tuning the processes noise matrix $Q$ using the so called $G$ matrix and the acceleration scale factor $\sigma^2_a$ where
$$G = \left[\begin{matrix} \frac{\Delta t^2}{2}  \\ \Delta t\end{matrix} \right]$$

and

$$ Q = GG^T \sigma^2_a$$

In my simple simulation, the position is defined as
$$p(t) = A\cos(2\pi f t - \phi)$$ With $A = 0.5$ $f=2$ and $\phi = 0$, the implied velocity signal is
$$v(t) = \frac{dp(t)}{dt}= -\pi f\sin(2\pi f t - \phi)$$

The position is sampled at a rate $F_s = 15 kHz$ with noise $\eta$ added of variance $\sigma^2_\eta = 10^{-4}$ to generate the observation signal $z(t)$.

In the filter
$$ F = \left[ \begin{matrix} 1 & \Delta t \\ 0 &1 \end{matrix} \right] $$
$$ H = \left[  \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right] $$
$$ R = \left[  \begin{matrix} \sigma^2_\eta & 0 \\ 0 & 1 \end{matrix} \right] $$
$$ P_0 = \left[  \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right] $$

If $\sigma^2_a$ is the variance of the acceleration $a(t)$, where
$$ a(t) = \frac{dv(t)}{dt} =  -2 \pi^2 f^2 cos(2\pi f t - \phi)$$

then $\sigma^2_a = 1.2 \cdot 10^4$. This values seems unusually large. The resulting filter outputs are shown here:

Any suggestions would be greatly appreciated for tuning the parameters correctly. Thank you.


texts: sound source localization - finding source vector

texts:
This may sound a stupid question - but I am working on some simple microphone array beamforming sound source localization stuff.  I think I understand how to use beamforming to find the TOA of the sound source between 2 microphones (positioned, say on the x axis), and therefore how to find the angle, phi. If the source is positioned normal to the z axis then this makes theta (the azimuth) equal to pi/2. However how do I find the r coordinate of the source vector?  As I understand it , I cant localize the source without this coordinate.

Any help much appreciated, thanks in advance


texts: Filter Cascade: Additions and Multiplications per input sample

texts:
Recently I was reading "Optimum FIR Digital Filter Implementations for Decimation, Interpolation, and Narrow-Band Filtering) by Crochiere and Rabiner (1975).
To estimate the number of decimation Stages and factors, they are targeting to optimize the total number of multiplies and adds (per second) calling this number $R_T$. With $R_T$ being sum of multiplies and adds of each stage:
$R_T = \sum_i^K R_i$.
When playing around with Matlab, I found the Matlab function designMultistageDecimator, in one  example they compare a multistage approach with a single filter by calculating the cost (with the function cost ), here however, it is multiplication and addition per input sample.
I would have assumed that the cost behaves in the manner, that it is the total sum of all cost per stage.
For the single filter, which will be then compared to a cascade, I understand the result, having 753 coefficients and a decimation factor of 48, that roughly there are 16 mults and 16 adds per input sample.
But when it comes to the filter cascade, in the example given by Matlab

Stage one has 17 coefficients (13 non zero) and a decimation factor of 3
Stage two has 11 coefficients (7 non zero) and a decimation factor of 2
Stage three has 15 coefficients (9 non zero) and a decimation factor of 2
Stage four has 63 coefficients (49 non zero) and a decimation factor of 4

The estimated multiplications are ~7.2 and additions ~6.6 per input sample.
This confuses me, I would have assumed that is roughly ~25 multiplication and ~25 additions. Just taking the last stage having more or less 50 non zero elements and a decimation factor of 4 would add at least 12.5 operations, or not?
So my questions are,

How are the costs, in the sense of multiplies and adds computed for a cascaded design in matlab using the function cost? (Thanks @TimWescott)

Why is it not the sum of multiplication and add per stage? A sample at the output has to see at least on o the polyphaser trees of the last stage having at least 12 coefficients or not?

Follow up question:

After the answer by @TimWescott, I understand now the math behind the result of the cost funciton. However, I am asking myself how to interpret the output of the cost function? Is on sample, given this example, really only seeing ~7 multiplications / ~7 additions?
In therms of dsp-terminolgy what would the calculation of operations int the following way:

13/3 + 7/2 +9/2 +49/4 = ~25
represent?


texts:
I have this signal:
$$
X(f)= 2\delta(f)+ \delta\left(f-\frac 1{T_0}\right)+\delta\left(f+\frac 1{T_0}\right)+\textrm{rect}\left(\frac{f-\frac 4{T_0}}{\frac 2{T_0}}\right)+\textrm{rect}\left(\frac{f+\frac 4{T_0}}{\frac 2{T_0}}\right)$$

I must calculate the energy. How can I find
$$\int \lvert \delta(f-f_0)\rvert^2df\quad?$$


texts: Car engine audible through AM radio -- what is this called?

texts:
A car's engine rotates in the range of 500 RPM to 6000 RPM. This is in the audible range. The car's engine is activated using spark plugs which are an electrical system at the same frequency (or some harmonic).

Turning on the radio to an AM receiver, you can sometimes hear a sound at the frequency that the engine is spinning. I believe this happens because the electrical system radiates EM with a broad spectrum and it is enveloped at the audible RPM rate. The broad spectrum intersects with the receiver frequency selection.

Is there a name for this type of system?

Are there any effective DSP techniques for selecting and "receiving" the RPM sound in this scenario?

My application is a transmission scheme similar to the above. My receiver will be a software defined radio.


texts:
I am trying to understand if there is an inherent advantage to using CIELAB for color-based segmentation.

I segmented the cytoplasm from the image above, where the left image below is from RGB color clustering, and the right one is from CIELAB clustering, where a and b matrices were used.

You can see that there are very slight differences between the methods, where in this case, CIELAB clustering seems to work a bit better, but there are other examples where it doesn't.

So my question is, can you give me the reasons for using CIELAB?

If it's too much of a bother to explain, a good article reference would be nice, it would be better if it includes some mathematical explanation as well.


texts:
while converting analog signal to digital equivalent,we have a process that is called analog to digital conversion and it has two main steps/stages sampling and quantization? I am confused whether y axis is discretized in sampling stage along with x axis or only y axis is dicretized in quantization stage since x axis is already discretized in sampling stage?

Initially i thought that sampling only involves discretization of x axis but now i was watching following youtube lecture where it tell at approximately between 10 min and 11 min that discretization of both x and y axes are done during sampling stage?

https://www.youtube.com/watch?v=xUCsfKA8bi0&list=PLm_MSClsnwm9I2iviE0YKt6PZTyQCYc8j


texts: How to include phase noise in sinusoidal kalman filter model?

texts:
I am modelling simple sinusoidal motion using a Kalman filter from the following equation of motion:

$ \ddot{x} = -\omega^2x $

So my matrix equation of motion is:

$$
\begin{bmatrix}
  \dot{x} \\
  \ddot{x} \\
\end{bmatrix}
=
\begin{bmatrix}
  0 & 1 \\
  -\omega^2 & 0 \\
\end{bmatrix}
.
\begin{bmatrix}
  x \\
  \dot{x} \\
\end{bmatrix}
$$

and my system dynamics matrix was

$$
A = \begin{bmatrix}
  0 & 1 \\
  -\omega^2 & 0 \\
\end{bmatrix}
$$

I then performed the transformation $
\mathbf{F(t)} = \mathcal{L}^{-1} \left( s \mathbf{I} - \mathbf{A} \right) ^{-1}
$ to get the state transition matrix like so:

$$
F(t) = \begin{bmatrix}
  \cos(\omega t) & \dfrac{\sin(\omega t)}{\omega} \\
  -\omega \sin(\omega t) & \cos(\omega t) \\
\end{bmatrix}
$$

Where I then replaced $t$ with my sample time $T_s$ where $T_s = \dfrac{1}{F_s}$ where $F_s$ was my sample frequency.

I then used this to extract my sinusoidal signal. The signal I am tracking is a sinusoid which experiences stochastic changes in phase. I am able to increase the value multiplying the process noise covariance matrix $\mathbf{Q}$ in order to make the filter react faster to these changes in phase, but that also means it lets through more unwanted noise.

If I apply a Kalman with a high value multiplying the process covariance matrix I get the following:

Where grey is the raw signal, blue is the true signal and red is the Kalman filter output. This reacts quickly to the changes in the phase of the sine wave but lets through much of the rest of the signal and noise as shown in the PSD of the filtered and raw signal below:

Where blue is the PSD of the raw signal and orange of the PSD of the filtered signal. From this I can see that very little noise has been removed.

If I decrease the factor multiplying the process noise covariance matrix such that the confidence in the model is increased then the output is less noisy but takes a long time to react to changes in the phase of the wave, as shown in the plot below:

The PSD of this filtered signal compared to the raw signal is shown below:

My question is how can I include this phase noise in my model such that it reacts quickly to phase changes without letting through large amounts of noise?


texts:
Fir filter confusion

I am trying to get some knowledge about FIR filters. According to above link FIR filter is just the convolution of a sampled input signal to impulse response of a filter. I have done some research and according to some texts FIR is the same as calculating the moving average of the input samples and there is no talk about impulse response. It seems if we take the moving average we can create a filter.

I would appreciate it if someone could help me to understand FIR filter . According to tutorials here we make FIR filter by just delaying the samples .https://greatscottgadgets.com/sdr/10/


texts: Relation between a Fourier series harmonic component and its power

texts:
My question is about the meaning of power spectrum derived from the Fourier series coefficients.

Fourier series is shown below:

$$f(t)=a_0+\sum_{n=1}^{\infty}a_n\sin(\omega_n t)+\sum_{n=1}^{\infty}b_n\cos(\omega_n t) $$

where
$\omega_n = 2\pi n f $

Since the Fourier-series above is summing sines and cosines for all the harmonic frequencies to obtain a periodic signal $f(t)$, at a particular frequency the the sine and cosine sum together with offset can be written as:

$$a_0 + a_n\sin(\omega_n t) + b_n \cos(\omega_n t) $$

One can show the Fourier-series coefficient for each harmonic as:

But textbooks shows the power spectrum instead as:

Why is the power magnitude equal to the square root of the sum of squares of the sine and cosine components? How can I derive this:

$$\text{Magnitude} = \sqrt{a_n^2 + b_n^2}$$

from the following:

$$ a_0 + a_n\sin(\omega_n t) + b_n \cos(\omega_n t) $$


texts: Why Should the Sum of Masks / Kernel / Filter in Image Processing be One?

texts:
I am studying pyramids (expanding and reducing) and I am a newbie.
Why should the sum of the convolution mask be one when we are using gaussian distribution?

According to When should the sum of all elements of a gaussian kernel be zero? and Why is sum of values of an edge detection filter zero? it should be zero not one.

I am confused.  Any precise explanation is really appreciated.


texts:
I need some help with applying the properties of Fourier Transform.

We define the windowed Fourier Transform of $f \in L^2(R)$ as
$$Sf(\mu,\xi)=\int_\mathbb{R}f(t)g(t-\mu)e^{-i\xi t}dt$$

Prove that for $f=e^{i\eta_0t}$, we have $Sf(\mu,\eta)=e^{-i\mu(\eta-\eta_0)}\hat{g}(\eta-\eta_0)$

All I can obtain till now is this.
$$Sf(\mu,\eta)=\int_\mathbb{R}e^{i\eta_0t}g(t-\mu)e^{-i\eta t}dt=\int_\mathbb{R}e^{-it(\eta-\eta_0)}g(t-\mu)dt$$

I know that I need to apply some properties of fourier transform but I am not sure how. Thanks in advance.


texts:
I have read the description of the Kalman filter, but I am not clear on how it comes together in practice. It appears to be primarily targeted at mechanical or electrical systems since it wants linear state transitions and that it is not useful for anomaly detection or locating state transitions for the same reason (it wants linear state transitions), is that correct? In practice, how does one typically find the components that are expected to be known in advance to use a Kalman filter. I have listed the components, please correct me if my understanding of what needs to be known in advance is incorrect.

I believe these do not need to be known "in advance":

Process noise $\mathbf w$
Observation noise $\mathbf v$
Actual state $\mathbf x$ (this is what the Kalman filter tries to estimate)

I believe these need to be known "in advance" to use a Kalman filter:

The linear state transition model which we apply to $\mathbf x$ (we need to know this in advance, so our states must be governed by known laws, i.e. the Kalman filter is useful for correcting measurements when the transition from one state to another is well understood and deterministic up to a bit of noise - it is not an anomaly finder or a tool to find random state changes)
Control vector $\mathbf u$
Control input model which is applied to control vector $\mathbf u$ (we need to know this in advance, so to use a Kalman filter we also need to know in advance how our controls values affect the model, up to at most some gaussian noise, and the effect needs to be linear)
Covariance $\mathbf Q$ of the process noise (which appears to be time dependent in the wikipedia article, i.e. it depends on the time $k$) - it appears we need to know this in advance and over time, I assume in practice it is taken as being constant?
A (linear) observation model $\mathbf H$
Covariance $\mathbf R$ (which appears to also be time dependent in the wikipedia article) - similar issues to $\mathbf Q$

P.S. And yes I know many of these depend on time, I just dropped all the subscript clutter. Feel free to imagine small letter $k$ to the right and down from each variable name if you would like to.


texts: Example of Fourier Transform not existing for real-life signals?

texts: I got curious based on this question here, but basically, is there ever a real-life signal that exists where its Fourier transform does not exist? If a signal is not finite energy, then its Fourier Transform does not exist, so what might be an example, (if any), of such a signal in real-life?


texts: Discrete Kalman filter for a continuous system

texts:
The question is related to the implementation of a discrete kalman filter given a description of the system model in continuous time.

I will give an example. Suppose we have a mass, spring and damper system as below:

The differential equation describing this system is:

$$\ddot{x} = -\frac{k}{m}x - \frac{b}{m}\dot{x} + \frac{1}{m}F$$

Therefore, if the system states are:

$$\begin{bmatrix}
x \\
\dot{x}
\end{bmatrix}$$

Then, the state space matrices are (assuming we can only measure position):

$$A = \begin{bmatrix}
0 & 1 \\
-\frac{k}{m} & -\frac{b}{m}
\end{bmatrix}$$

$$B = \begin{bmatrix}
0 \\
\frac{1}{m}
\end{bmatrix}$$

$$C = \begin{bmatrix}
1 & 0\\
\end{bmatrix}$$

$$D = \begin{bmatrix}
0
\end{bmatrix}$$

I would like to implement a discrete kalman filter for this system, following the regular discrete system convention:

$$\hat{x}_{k} = A\hat{x}_{k-1} + Bu_{k} + w_{k}$$

$$z_{k} = C\hat{x}_{k} + v_{k}$$

Of course, the A, B, C and D matrices of the continuous system are not the same ones as for the discrete system.

I have tried to convert the continuous system to a discrete one (using ZOH, see also here) but it didn't seem to work.

Any ideas on how to tackle such a problem? An example would also be nice.


texts:
If one has two signals (say, two acceleromters mounted perpendicularly) and a piece-wise resultant acceleration signal is determined, it appears that frequency content information cannot be determined on the resultant signal using an FFT.

Can someone comment on why this is so?

It may be that the process of determining the resultant converts the negative content in the individual signals through the process
$$r(i) = \sqrt{x(i)^2+y(i)^2}$$ which "loses" information (not sure if that is the best way to describe it). This same effect can be seen if one takes a single acceleration signal and processes the FFT of the absolute value of that signal.

Is there any way of still being able to assess frequency content of a resultant vector?
Is it even worth pursuing?


texts: Zero-padding vs. nonzero-padding in computation of auto-correlation with FFT

texts:
Isn't the usual zero-padding in the computation of the auto-correlation function with FFT just one of many possible extrapolations of the original signal?

If I have a measured signal which has good reason for having non-vanishing mean (e.g. the signal from an accelerometer which includes a gravity offset of 9.8 m/s^2 in static equilibrium...), wouldn't it be more appropriate (to 0'th order) to extend the signal outside its measured bounds by the respective last value inside the boundaries.

To be honest, I am not at all confident that I understand the role of an offset in the original signal in general. Because it can change the shape of the autocorrelation curve almost completely.

Side note: I am using the autocorrelation function in the LPC procedure/Yule-Walker equations. Maybe someone can explain to me, how an offset influences the result, or if the result is valid at all (should the signal have zero mean for LPC to work?).


texts: Signal distortion under non-linear channel

texts:
The channel is given to have these characteristics, and its required to study the affect on Frequency Modulated signal and its demodulation.
Since there are no sharp corners (like during clipping) will there be a significant difference in the frequencies? Can a regular high-pass filter be used still to demodulate the FM signal.


texts: Difference in information between IQ Sampling vs. Real Sampling at $2F_s$

texts:
As per my current understanding we use IQ sampling as way to increase the useful bandwidth to Fs rather than $F_s/2$ when viewing the FFT because the IQ sampling removes the negative frequencies and the entire $0-F_s$ band contains useful frequencies and not images of first half spectrum.
My questions are:

Is there any difference between this and sampling at twice the original sample rate?
And if I am sampling at $2F_s$ can that data be used to create the same IQ data as sampling I and Q components individually at $F_s$ or would there be a difference?


texts: Compression of Multivariate Phase Signals

texts: I have a data matrix $X$ whose columns are composed of instantaneous phases of recordings from different electrodes. In other words, each column keeps a periodic sawtooth signal with a range from $[-\pi,\pi]$. I am interested in compressing this dataset by PCA, but the application of PCA on phase signals sounds counter-intuitive to me. Is there any principled way of achieving this?


texts: What is the amplitude of the impulse resonse

texts:
I'm learning how to construct a discrete signal as a sum of impulse responses of the system. The final formula is then:

$$
y[n]=  \sum_{k= -\infty}^\infty x[n] h_{k}[n]
$$

My question is, what is the amplitude of the impulse response, because i thought an impulse response was already a scaled response to the unit impulse inputted into the system? But here they are multiplying again with a scaling factor of x[n]? So is the unit impulse's amplitude just 1 then?


texts: Butterworth filter approximation: derivation and output poles

texts:
I am having trouble understanding the exact derivation of the butterworth filter and how it results in the output of the poles. I have researched multiple lecture series and textbooks and this is my understanding so far:

An idealised low-pass filter, i.e. a brick wall, can be realised with the equation below as as $n$ tends to infinity?
$$
\lvert H(j\omega)\rvert = \frac{1}{\sqrt{1+\omega^{2n}}}
$$

This is the amplitude response - i.e. the magnitude of the frequency response?
Now by squaring this amplitude response and setting $s = j\omega$ you get the following:
$$
\lvert H(s)\rvert^2 = \frac{1}{1+\left(\frac sj\right)^{2n}}
$$
What does squaring the magnitude of the frequency response get you?
I understand that $\lvert X(f)\rvert^2 = X(f)\cdot X^*(f)$?
The result of these two terms(/transfer functions?) $H(s)$ and $H(-s)$. Subsequently you are only interested in the $H(s)$, why? I understand it's poles lie on the left of $s$-plane and therefore the system is stable? but what about $H(-s)$?
You then obtain the poles from the resulting derivations and get a resulting transfer function. This transfer function and its related co-efficients can be implemented physically with the appropriate R and C values?

Any help would be greatly appreciated!

Regards


texts: Is deep learning killing image processing/computer vision?

texts:
I'm looking forward to enroll in an MSc in Signal and Image processing, or maybe Computer Vision (I have not decided yet), and this question emerged.

My concern is, since deep learning doesn't need feature extraction and almost no input pre-processing, is it killing image processing (or signal processing in general)?

I'm not an expert in deep learning, but it seems to work very well in recognition and classification tasks taking images directly instead of a feature vector like other techniques.

Is there any case in which a traditional feature extraction + classification approach would be better, making use of image processing techniques, or is this dying because of deep learning?


texts:
I have two questions and I am very confused about the concepts

Can a Markov process of order one also be a a Martingale?
Is any Markov process of order one also a Martingale?

For 1. I would say yes, since a Markov of order one is also an AR(1) it would be a martingale if c=0 and phi=1. However, I am very confused about the second. My answer for 2 would be no, but I cannot explain it properly.
Can anyone maybe help me?


texts: Text in image is low or high frequency component?

texts: Text present in captured images is high frequency or low frequency component?Why?


texts: DOA estimation; Music (Multiple Signal Classification) algorithm

texts: Why do we say that signal subspace and noise subspace are orthogonal in e.g. MUSIC algorithm? precisely, Suppose we have 2 sources (signals) which are WSS, in WGN in a uniform linear array. After computing the covariance matrix of received data "Y=AS+N", and decomposing R (covariance matrix) into 2 subspaces, we say that these 2 subspaces are orthogonal. Why?


texts: Relation between Gaussian and bi-Gaussian distribution

texts:
A Gaussian Doppler Spectrum can be seen as a bi-Gaussian Doppler spectrum in wich only one Gaussian function is present ( the second having a zero power gain) ?

any help will be really appreciated


texts:
I'm trying to learn Q notation but I don't understand why 1.01 in the Q2 number format equals -0.75. How is that calculation done? I can understand that 1.1 equals -0.5 because the leading 1 means the number is negative and the first digit after the binary point is 1 which means 1*2^(-1) which is 0.5 and therefore the number is -0.5. Similarly, 1.01 should equal -0.25 and not -0.75.

It is 1.11 which is -0.75 or what is my mistake?


texts: How to quantify amplitude of oscillations in marginally stable systems?

texts:
Transfer function pole on the Imaginary axis indicates that the system is marginally stable which in time domain can be represented as a sinusoidal motion with constant amplitude and frequency of the Imaginary axis pole. In some applications, oscillations with small amplitude might be acceptable.

Is amplitude of oscillation a (only) function of initial condition of the system?
How to intuitively quantify amplitude of the oscillations for marginally stable system?


texts:
I was reading Chapter 2 from "Telecommunication Breakdown" by Johnson and Sethares and came across this paragraph:

  However, sometimes it is more cost effective to perform certain tasks
  in analog circuitry. For example, if the transmitter modulates to a
  very high frequency, then it may cost too much to sample fast enough.
  Currently, it is common practice to perform some frequency translation
  and some out-of-band signal reduction in the analog portion of the
  receiver. Sometimes the analog portion may translate the received
  signal all the way back to baseband. Other times, the analog portion
  translates to some intermediate frequency, and then the digital
  portion finishes the translation.

And so I was wondering, if I wanted to do carrier recovery digitally, where in the receiver chain would I perform such task? I guess I'd need to translate input RF signal to IF and then perform carrier recovery digitally but in order to do so, I need to know the frequency and phase of the RF signal to translate it to IF, don't I? And I can only do that by carrier sync/recovery.


texts: Question on sketching the amplitude spectrum of signals

texts:
I can't seem to understand the sketches of the amplitude spectrums provided in my tutorial solutions.

For this part , I understand that X(f) is basically sampling (T/Tp)sinc(Tf). But from what I understand , the amplitude spectrum is a plot of |X(f)| against f. With that being said, shouldn't the sketch in the solution of the sinc function have no portions that go below the x axis? Since |sinc| means that you flip the negative portions up.

Same problem as question 1, why are there negative magnitudes for the frequency components 12pi and -12pi? Given x(t) , X(f) would just be a sum of dirac delta functions , and any negative signs can be changed to a phase. As such , there shouldn't be any negative magnitudes in the amplitude spectrum.

I'm suspecting that maybe there's a difference between a continuous-frequency spectrum and an amplitude spectrum, but question 2 tells me otherwise.

Thanks for the help!


texts:
The following statements are from Wikipedia page of Keying

  Keying or digital modulation applies to transmitting a digital signal
  over an analogue passband channel.

  When a digital signal is to be
  transmitted over an analogue baseband channel, the modulation
  technique is termed line coding.

To me, both of the lines seem same. The only difference I see are the terms passband channel and baseband channel.

I see both of these terms used interchangeably on the internet because we only care for the message that we get from passband channel which is obtained after filtering baseband channel.

So, what's the difference between Line Code and Keying?


texts: Significance of sequency ordering in Walsh-Hadamard matrices

texts:
So I've been doing some reading into Hadamard and related matrices (Slant, Walsh, , and have observed that there are three typical "orderings" of the rows based on various criterion. E.g. "Natural", "Dyadic", "Walsh" (or Sequency http://fourier.eng.hmc.edu/e161/lectures/wht/node3.html).

One of the books I'm reading is "Introduction to orthogonal transforms with applications in data processing and analysis" by Ruye Wang (of which a copy can be accessed freely here http://fourier.eng.hmc.edu/book/lectures/mybook.pdf )

In this book there is a chapter (8) dedicated to some of these matrices. In particular is the Hadamard matrix. It states a definition of sequency:

  "..the sequency s of each row, defined as the number of
  zero-crossings or sign changes in the row. Similar to frequency,
  sequency also measures the rate of changes or variations in a signal.
  However, sequency can measure non-periodic signals as well as periodic
  ones"

Later on in the discussion of making the Hadamard matrix into a seqeuency ordered Walsh-Hadamard matrix it states:

  "The rows (or columns) of the WHT matrix H, ... , are not
  arranged in the order of the sequencies, while it is desireable to
  arrange them according to the sequencies in a low-to-high order,
  similar to how the DFT coefficients are arrange."

In the section on the Haar transform, it makes a brief explanation comparing the Fourier, Walsh-Hadamard, and Haar transforms:

  "It is interesting to compare the Haar transform with other orthogonal
  transforms such as the Fourier, cosine, Walsh-Hadamard, and slant
  transforms discussed before. What all of these transforms, as well as
  the Haar transform, have in common is that their coefficients
  represent some types of detail contained in the signal, in terms of
  different frequencies (Fourier transform and cosine transform),
  sequencies (Walsh-Hadamard transform), or scales (Haar transform), in
  the sense that more detailed information is represented by
  coefficients for higher frequencies, sequencies, or scales"

One can observe an analogy between the fourier and sequency ordering ( Aittokallio et al, 2001 - Testing  for  Periodicity  in  Signals: An Application  to  Detect  Partial  Upper Airway  Obstruction  During  Sleep:

  Walsh  functions with even  and  odd  orders  are  called the cal and
  sal functions,  respectively, and  they correspond to  the cosine and
  sine  functions in Fourier  analysis.  One should note, that in
  contrast to harmonic functions the

TLDR

Now, i've been seeing the Walsh-Hadamard matrix in various papers regarding locality sensitive hashing, and approximate randomization, random projections etc. Returning to the Walsh-Hadamard, my confusion is that I'm trying to form an intuition behind the significance of using a sequency ordered Hadamard matrix as opposed to just a standard Hadamard matrix, in general, and in instances when the WH matrix is combined with other matricies to induce randomization (e.g. see Subsampled Randomized Transform, e.g. Tropp 2010 - IMPROVED  ANALYSIS  OF  THE
SUBSAMPLED  RANDOMIZED  HADAMARD  TRANSFORM)


texts:
I need to generate a sine signal using a DAC with a certain THD specification, say 0.1% @ 1KHz. As a first approach I’m considering it to be an ideal DAC along with an ideal LPF for aliasing removal in order to define the minimal resolution in bits so I could achieve the desired THD. To optimize the quality consider I’ll generate the signal using the full scale. Is there a direct method to find the optimal resolution?

I really appreciate any insights!


texts: Question regarding filter implementation - Audio EQ Cookbook

texts:
Some of you may know the infamous Audio EQ Cookbook. You can take a look here.

We tried to implement the functions there to achieve a  implementation for a Lowpassfilter.
However, when we try to lower our variable cutoff-frequency, we have some issues. With decreasing cutoff-frequency the signal is increasing in volume. Reaching a distinct treshold at around 4000- 6000Hz the filter stops working, because it computes samplevalues that are ever increasing, reaching around 2000000 shortly after lowering the cutoff frequency.

We checked our code multiple times,and the functions from the Cookbook should be right. If someone wants to see the code i can hand it to you later.

For any hints or solution we are more than thankful.

EDIT: The important part of the code.

float Filter::processFilter(float sample)
{
   float unprocessed = sample;

    float processed = (unprocessed) + (computeB1() * x_n_1) +
        (computeB2() * x_n_2) - (computeA1() * y_n_1)
        -(computeA2() * y_n_2);

    x_n_2 = x_n_1;
    x_n_1 = unprocessed;

    y_n_2 = y_n_1;
    y_n_1 = processed;

    return processed;
}


texts:
Are all isotropic bandpass filter kernels, wavelets?

Are there any properties that the radial frequency profile has to meet to be considered a wavelet?


texts: Cost function for LTI system identification

texts:
I am currently reading and trying to understand a paper (Kulkarni and Colburn, 2004) that utilizes system identification methods to approximate head-related transfer functions.

The general approach is to

Compute an autoregressive (all-pole-) estimate of the transfer function using the autocorrelation method for linear prediction.
Use the AR estimate as a starting point to compute a pole-zero-representation of the system transfer function iteratively.
Evaluate the result of the estimation process on a logarithmic scale (Error in dB).

For the iterative procedure, the authors are proposing a cost function

$\hat{C} = \frac{1}{2\pi}\int_{-\pi}^{\pi}|H(e^{j\omega})A(e^{j\omega}) - B(e^{j\omega})|^2 d\omega $,

where $\hat{H}$ is the system transfer function, $A$ is the DTFT of the recursive coefficients and $B$ the DTFT of the transversal coefficients.
I understand this approach originates from this paper (Kalman, 1958).

This cost function is then extended for the iterative process as

$\hat{C}_i = \frac{1}{2\pi}\int_{-\pi}^{\pi}|\frac{H(e^{j\omega})A_i(e^{j\omega})}{A_{i-1}(e^{j\omega})} - \frac{B_i(e^{j\omega})}{A_{i-1}(e^{j\omega})}|^2 d\omega $,

where the index $i$ denotes variables corresponding to the $i$th iteration.
The iterative modification originates from this paper (Steiglitz and McBride, 1965).

In order to find a solution on a decibel scale, a weighting function $W$ is introduced:

$\hat{C}_i = \frac{1}{2\pi}\int_{-\pi}^{\pi} |W_i(e^{j\omega})|^2 |\frac{H(e^{j\omega})A_i(e^{j\omega})}{A_{i-1}(e^{j\omega})} - \frac{B_i(e^{j\omega})}{A_{i-1}(e^{j\omega})}|^2 d\omega $,

which is introduced in the paper as

$W_i(e^{j\omega}) = \frac{\log\left( H(e^{j\omega})\right) - \log\left( \frac{B_{i-1}(e^{j\omega})}{A_{i-1}(e^{j\omega})}\right)}{|H(e^{j\omega})A_{i-1}(e^{j\omega}) - B_{i-1}(e^{j\omega})|^2}$.

I understand this weighting function is the squared error in logarithmic scale between true and approximated transfer function, divided by the first cost function.

However, i have trouble understanding the process of arriving at the iterative cost function for several reasons. I would like to ask the following questions:

Why is the first cost function $\hat{C}$ preferred to, say, $\frac{1}{2\pi}\int_{-\pi}^{\pi} |H(e^{j\omega}) - B(e^{j\omega})/A(e^{j\omega})|^2$ in the first place? what does it do?
In the iterative cost function $\hat{C}_i$, what is the purpose of dividing by the recursive proportion of the last transfer function estimate?
For what reason is a weighting function introduced for logarithmic error minimization, rather than just using its numerator as a cost function directly?

I would really appreciate any help or pointers into the right direction.


texts: A special case of 2 jointly Weak-Sense Stationary (WSS) stochastic processes

texts:
I know that 3 conditions must be met in order a pair of stochastic processes $X(t)$ and $Y(t)$ to be characterized as jointly WSS:

1. $X(t)\;\; WSS$

2. $Y(t)\;\; WSS$

3. $R_{xy}(t_1,t_2) = R_{xy}(t_1 - t_2) = R_{xy}(t_2 - t_1)$ which means that their cross-correlation function should depend only on the difference $T = t_1 - t_2$.

My question is: if the first 2 conditions are met but the cross-correlation function does not depend on any variable (I mean that it's a constant e.g. $R_{xy}(t_1,t_2) = 0$) can we assume that the two stochastic processes $X(t)$ and $Y(t)$ are jointly WSS?


texts:
Consider a signal with a sample rate $f_s = 44.1$ kHz. Let us upsample the signal by a factor of $L = 2$ and interpolate the zeros.

An ideal lowpass interpolator would have a gain of $L$ and a cutoff frequency of:

$$f_c = \frac{f_s}{L}$$

An ideal lowpass filter has an infinitesimally small transition band.

In practice I see real lowpass interpolators have a small transition band centred around $f_c$.

The transition band can be quite large, say, $0.45 f_s$ to $0.55 f_s$.

My question is: why do we centre the transition band of a practical lowpass interpolator around the ideal cutoff frequency? By doing that the practical lowpass stopband is above the ideal cutoff which does not make sense to me as that will allow a small unwanted spectral image from the $0.45 f_s$ to $0.50 f_s$ region to creep into the new signal. The obvious alternative is to make the stopband of the practical lowpass $0.5 f_s$ and put up with a passband starting at $0.4 f_s$ assuming we can't make the transition band steeper. There must be some reason this isn't the way it's done.