texts: Can you decimate / downsample a signal in frequency domain just like you can interpolate / upsample it?

texts:
To interpolate a signal I can just zero pad it in the frequency domain. If I want to decimate the signal, can I just discard some part of the frequency domain?

So in MATLAB this works:

sInterpolated = abs(ifft(ifftshift(padarray(fftshift(fft(s)), nextra/2, 0, 'both'))));

Would the opposite also work (correctly)?

Sshifted = fftshift(fft(s));
Sdecimated = Sshifted;
Sdecimated(1:nless/2) = [];
Sdecimated(end-nless/2+1:end) = [];
sDecimated = abs(ifft(ifftshift(Sdecimated)));

Here s is the (real) input signal, nextra is the number of extra samples in the interpolated signal and nless is the number of decreased samples in the decimated signal.


texts: Is there a common name for the first order IIR averaging filter?

texts:
Is there a term to describe this IIR averaging/smoothing filter?

$ y[n] = \alpha x[n] + (1 - \alpha) y[n - 1] $


texts: Why do we need >= 95% throughput for LTE Sensitivity measurement according to 3GPP

texts:
According to 3GPP 36 series for LTE, for LTE Sensitivity measurements we need >=95% throughput. How is this 95% value determined? Why it is not 98% or 88%.
Thanks in Advance!


texts: How to detect Premature ventricular contractions (PVCs) in a ECG-signal

texts:
I want to know how to detect a  Premature ventricular contraction (PVC) in a ECG-signal. A PVC is best seen from the V1-lead in an Electrocardiogram.

Figure 1: A) PVC coming from the left ventricle, B) PVC coming from the right ventricle
The definition of a PVC can be found here


texts: How do I perform Spectral Analysis (FFT, Windowing, Detrending) on Sonic Anemometer Data?

texts:
I am having trouble with all of the forums that I have looked at thus far.
I have one day's worth of Sonic Anemometer data. I want to see the spectral analysis of this data. When the anemometer data was being logged it appears that the frequency ranges between 31 and 32 hz. I am looking to analyze this data in thirty minute chunks and I would just like some guidance as to how to go about this.

I have already removed the bad data (stray data points with 98 m/s winds x.x).  I am not sure if I am supposed to detrend the data then apply a Hamming window and take the Fourier transform, or if I'm supposed to just apply the Hamming window and then take the Fourier transform.

Also should I calculate the sampling frequency for each 30 minute interval since it appears to change or is that change insignificant? (or should I analyze the whole data set together?)

Sorry for the long post but I have been hacking away on forums all week and I cannot seem to find a consistent solution.


texts:
I am working with uniformly-spaced time series data where I am interested in knowing whether there are changes in temporal auto-covariance. The mean can be assumed constant. Visually, there are no abrupt/obvious changes in variance or temporal correlation.

Intuitively, it seems to make sense to divide up the data into contiguous blocks, compute for each block the sample auto-covariance at some number of lags, and compare the sample auto-covariances for each block. I suppose that one could apply procedures to see if the per-block auto-covariance estimates come from the same distribution (which, I guess, would imply stationarity).

Can anyone point me to a some papers where this sort of thing has been done?
Also, are there other methods out there which could apply?
I have seen unit root tests. While an AR process may be appropriate, I'm not sure if the non-stationarity can be described by a unit root--perhaps instead slowly time-varying AR coefficients?

I have also seen some wavelet approaches, which seem to focus on detecting abrupt changes, which is not the case here.


texts: I have PSD data from an computational aeroacoustics analysis, which is in the units of Pa^2/Hz. I want to convert this to dB/hz; would it be correct if I use PSD[in dB/Hz] = 10log10(PSD[in Pa^2/Hz]) or is there another way of doing this that I am not aware of?


texts: Filter that is like low-pass filter but for intensity?

texts: Is there a type of filter for processing spectrum data that will subtract spikes in intensity? I was thinking of something like a low-pass filter but that takes away data if the intensity is too high. I am trying to do this since there is a lot of bright intensity measurements in a certain frequency range that are making it hard for me to see other data.


texts:
The first step  in MFCC is to split the signal into frames and  referring to this discussion on MFCC at this link (Help calculating / understanding the MFCCs: Mel-Frequency Cepstrum Coefficients) @pichenettles said that  the frames are usually  overlapping.
my question is why they are overlapping ?. And if they don't , for example
"frame 0 is from 0->440 and frame1 is from 440 ->880 " does this affect the process of feature extraction using MFCC method?

And also why a widowing function must be applied to the frame ?

Thanks.


texts: Practical Least Squares FIR filter design: How to find a realistic desired response

texts:
I'm using Matt. L.'s lslevin.m function to design long ($N\approx 400$) filters to an arbitrary phase and magnitude specification. The specification is the result of a numeric optimization and does cover frequencies between 200Hz and 19kHz. I found that the designed filters show poor approximation of my desired frequency response $H_1[k]$:

Apparently my desired response it hard to meet. Making the filters longer only amplifies the ripple. So I added a linear phase term $H_2[k] = H_1[k]e^{-j\frac{N-1}{2}\omega[k]}$ in the hope to make the desired response a little more realistic to meet. I am not sure why this is requried or why it makes things better, but it appears to be doing something. (Adding a (predictable) phase term to my filters is okay in my scenario as long as two filters designed with the same length have the same phase term added) Here's the result:

However, outside the range of specified frequencies I see huge spikes in the magnitude response (which is to be expected, because I don't control those regions at all):

So I extended my specification by padding $H_2[k]$ with zeros on both sides. I give a weight of 2 to all points inside my specification and a weight of 1 to all the padded zeros - my hope is that I will get a band-pass behaviour with my desired phase and magnitude response in the passband and some sort of suppression outside the passband. I don#t really care about those regions but the huge magnitude from the previous example makes the impulse response have very large coefficients with varying sign which is impossible to implement. With the padding added, things start to look better.

As you can (maybe) see, there is some ripple above 19kHz but in this case it stays low. If I increase the filter length $N$ to 600 or more - hoping to increase the accuracy of LS approximation in the passband - those ripples become extremely large, with the maxima reaching up to +50dB. Which makes this filter impossible to implement.

So as you can tell, I'm not entirely sure what I'm doing. How can I find a gradient of the linear phase term that yields the best approximation? How can I prevent huge magnitudes outside my important region of 200Hz-19kHz?


texts: Can the FFT representation of a signal be modified w/o creating glitches?

texts:
I've read that modifying the bin values in the frequency domain after a FFT poses problems that lead to glitches when one takes the signal back to time domain using iFFT. This is caused iirc because the modified data does not align "continuously" anymore to the bins (and discontinuities $\implies$ artefacts). Because of this it's e.g. not recommended to perform ("ideal filter") equalisation in the frequency domain.

But since there are e.g. interpolation methods,

Are there ways for doing processing such as shuffling or removing bins in the frequency domain such that one can retain sound quality? E.g. by "synthesising" new data using interpolation methods.

In the context of audio something seems to be feasible, since there exists plug-ins such as this that seem to do filtering in the frequency domain:


texts: Is the system represented by the equation $y(t) = x(2t)$ time invariant?

texts:
I came across this problem in the text book Signals and Systems - Oppenheim (Example-1.16).

To solve this, I followed the following algorithm (described in the book earlier for a separate problem):

$$\begin{align}
y(t) &=x(2t)\\
y_1(t)&=x_1(2t)\end{align}$$

Let $x_2(t)=x_1(t-t_0)$ and
$y_2(t)=x_2(2t)$

$$\begin{align}
\implies y_2(t) &= x_1(2(t - t_0))\\
&= x_1(2t-2t_0)\end{align}$$

Now, $y_1(t-t_0) = x_1(2(t-t_0)) = x_1(2t - 2t_0)$.

Since $y_2(t)$ and $y_1(t-t_0)$ are equivalent, the system should be time-invariant.

However, the book takes a different(graphical) approach, wherein the time-shifted $y(t)$,  $y(t - t _0)$ is $x(2t - t_0)$ and the resulting system is time-varying.

I would like to understand why is there this inconsistency between the mathematical and the graphical approach.


texts: Converting Audacity Filter Curve EQ into transfer function and applying it to a signal via python

texts:
First of I am very new to Signal Processing and to python in general. I am trying to write a script where I would feed a voice recording into it, internally apply an eq and have the modified signal returned. Researching the topic I found some ways to process a signal via transfer functions in python, however I only found functions like a low-pass filter etc. which would not fit my needs as I have a specific eq manipulation in mind. I constructed the required filter curve eq in audacity:
If my limited understanding of signal processing is correct I would need to convert the continous curve into a discrete transfer function and then apply this transfer function to the input signal. However I have no clue how I would go about converting the curve into a Transfer-function. Furthermore, as it is the first time I am working with python I have very limited knowledge on how to implement this process in a python script. I would greatly appreciate any help you could provide me, thanks!


texts: How to measure a detector's performance under extremely complex real-world environment?

texts:
I am trying to formalize my understanding of how best to measure the performance of a binary detector. (See previous question here). I had looked into ROC curves for doing this however based on previous research and feedback here I think ROC curves are too simplistic. Here is the problem I face:

Context:

I have a microphone that is setup in a park. The mic takes in inputs and an algorithm runs in the background that is supposed to detect the rustle of leaves. (Animal approaching, something in the bushes, etc). It does this by insert time-frequency-detection-scheme here, but that is not the issue. The end result of course is a 'Yes' or 'No', (So a binary detector), indicating whether or not leaves are indeed rustling.

Main Question(s):

How can/should I characterize this detector's performance, vis-a-vis true positive and false positive rates? (If that is the wrong way to go about it, then what is the right way?)
I understand that to generate a false-positive analysis, requires a false-positive model. In this case, the false-positive model is not something simple like white noise, but spans almost any signal possibility. Therefore, how can we model all those possibilities?

Thoughts:

My current solution/thought is to measure a true-positive rate and false-positive rate to characterize detector performance. (For given settings/thresholds).

Thus, for given and fixed detector settings, I test its true-positive rate by rustling leaves (within a specified range), and see if it detects the incidents. This will give me a true-positive rate. (A consistent 'Yes').

However I am stumped as to how to measure the false-positive rate.

I do not understand how to do this, because the mic is outside and subject to anything - cars, people, animals, thunder storms, just life. In other words, just about any combination or permutation of signals imaginable is possible. How then does one test its false positive rate?


texts:
Sooo .. I've been thinking about this stuff. We all know that we sound different from what we hear of our own voice. It is easy to find out how others hear us by recording oneself and listen to it.

But what about the other way around?

Is there a way to transform our voice in a way that others can hear us as we perceive our own voice? I find it to be a quite interesting question. Sadly I couldn't find anything on the web after a couple google searches. Has nobody thought about this or is it impossible because of some reason that I'm not seeing?

Any leads on this would be appreciated :).


texts: Discrete time systems work on sampled continuous time signals. We need samples only at discrete time to be fed as input to a discrete time system. Does this mean discrete time systems are clocked so that the values only at discrete time are available to the system? How are these discrete time systems implemented physically?


texts:
Does this measurement result comply with the specification or not? Why?

The upper limit of a test is 50 m/s and your measurement result is 46.912 ± 10 m/s.
The lower limit of a test is 5 mT and your measurement result is 6.1 ± 1.1 mT.
A test is specified such that the result must be 15 ± 0.5 kW and your measurement result is 15.4 ± 0.1 kW with a confidence level of 95%.


texts: How does SURF handle image boundaries in key point description?

texts:
I am stuck on the key point description stage of my SURF implementation, which is based on An Analysis of the SURF Method.
The authors extend the image borders through a mirroring process that extends each image direction by the maximum filter size. They have not explicitly stated what the actual padding is but I believe it should be at least $L_\text{max}+(L_\text{max}-1)/2$.
The descriptors supposedly use a $20\sigma\times20\sigma$ window centered around each key point to obtain the necessary information, with $\sigma=0.4L$, $L$ referring to the scale parameter of each key point.
My confusion arises because this requires the descriptor of a key point with $L=49$ to look for information in a $392\times392$ window. In reality, the actual filter size that is used is based on $l=\lceil0.8L\rfloor$, but this does not resolve anything, it does not even account for the fact that each sampled position is the centre of its own $(2L+1)\times(2L+1)$ window.
These dimensions seem much too large, given that the images that the algorithm is tested on are comparable to the window calculated above.
Padding the images with additional mirroring does not seem like a reasonable solution, given that it would require entire copies of the original images to be mirrored. Excluding the key points that include the boundaries does not seem reasonable either, otherwise there would be no point identifying them as key points. I could scale down the $\sigma$ parameter, but it seems like I should be able to get things working without doing this. Is my understanding of this description process flawed?


texts: 3 dB cut-off frequency of first-order IIR high-pass filter

texts:
As descipbed in this great answer (thank you Matt L.), the suggested exact formula was very precise.
I need a first order high-pass with similar precision.
EDIT: (clarification)
The low-pass filter discussed in the link above was this one, derived from the simple RC filter.
What I'm looking for is the discrete version of the simple high-pass RC filter with a formula for getting the exact alpha term (that's what Matt L. did) for an amplitude response of -3dB at a given cutoff frequency.
I've tried and measured the low pass version and it worked as expected.


texts: Audio EQ Cookbook without frequency warping

texts:
The famous http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt offers a set of [real] biquad filter calculation formulas that generally work fine.

However, when filter's frequency approaches Nyquist frequency the Q (bandwidth) specification of a filter becomes greatly distorted - usually it shrinks a lot (even though the author mentioned that he performed a necessary pre-warping).

I'm in quest for filter formulas that do not have such strong bandwidth distortion. I need peaking/bell, band-pass, low-pass, high-pass, high-shelf, notch filters. I know this can be done as previously I've bought a peaking/bell/band-pass filter formulas with less distortion, but they are still not perfect and I need other filter types.

So, I'm also willing to pay for the solution if the price is right.

Alternatively, if one could point me to an optimization algorithm that works with Z-domain filters that would be great, too. Unfortunately, most usual optimization algorithms do not work well in Z-domain - they can't optimize a set of parameters to match a desired frequency response (probably due to periodic functions used to calculate the frequency response).


texts: confusion between frequency and amplitude in digital to analog and vice versa conversion

texts:
bandwidth is defined as the difference between the highest frequency and lowest frequency.

amplitude is the distance between the, let's call it a crest and a trough, in a wave.

cycle is the time per wavelength -- (a crest and a trough)

period is the time in seconds to complete a cycle.

frequency is the number of periods in 1 second, measured in hertz.

.................................

based on this, i have a few questions i'd like to focus in on.

a signal sent from source to destination can be either analog from a-z, digital a-z, or can start digital, and then is modem'd (modulated/demodulated) at a device (modem) at the source, sent across the medium, and then vice-versa'd at the destination.

my question is how is the digital converted to analog.

my downstream rate, for example, is 32,339,000 bps. so according to the text i'm reading to convert this to analog we need a frequency of N/2, which is ~16,000,000 Hz.  I'm just typing this out as I try to figure it out, i'm totally lost at this point.  Is this the first harmonic?  then they suggest to make the shape of the analog signal look more like that of the digital signal, we need to increase the bandwidth to 3N/2, 5N/2, or 7N/2.  are these sub harmonics? (i just made that up) 3rd harmonics, 5th harmonics, and 7th?

so, according to the book, the vertical lines represent infinite frequency, while the horizontal lines represent zero frequency.  this really confuses me. the conversion, when anaolog looks to me like an amplitude.

any help is appreciated

thanks


texts: Constructing Contour for Star QAM Equalization

texts:
I am trying to equalize the 16 Star QAM using known blind channel algorithms such as CMA,MMA,SCA,RCA,IRCA,CXA,SCXA.I now need to contruct a new contour for equalizing the 16 Star QAM.As it is in circular shape the CMA Contour is well suited.But I need another new contour to apply to equalize it.Are there any other contours available except the contours used in previous mentioned algorithms?
16 Star QAM Figure is given below:


texts: Any experiences for plotting a stationary wavelet transform?

texts:
I am experimenting with wavelets for my thesis and am currently working with the stationary WT pywavelets provides.
There are very nice plots for CWTs, but does anyone know a technique for producing a plot that gives a good overall understanding of the produced SWT?
Right now I am basically just producing a list of details coefficient plots for each level, and not regarding the averages at all.

I hope this question belongs here.
Cheers!

EDIT:

I really just iterate through the transform and plot each details coefficient vector.
(I'm aware the example uses DWT and not SWT, but it should be analogous)

fig, axes = plt.subplots(3, 5, figsize=[14, 8])

c = pywt.wavedec(data1, 'haar', mode='periodization')

for i in range(0, 5):
        axes[0, i].plot(c[i],c = "r")

The result then looks like this:


texts: How do I find transfer functions from a state space representation?

texts:
Suppose I have a MIMO system in state space representation, for example:

$A=\begin{bmatrix}
1 &2  &3 \\
 4&5  &6 \\
 7&8  &9
\end{bmatrix}$

$B=\begin{bmatrix}
2 &3 \\
 5& 7\\
9 & 1
\end{bmatrix}$

$C=\begin{bmatrix}
6 &7  &11
\end{bmatrix}$

$D=0$

I have used random number to fill these matrices. I am using Matlab. Now, suppose I want to find the transfer function from the input $u$ to the to an output $x_2$ for example, how is it possible to do this?

I know that I can from this matrix create the state space representation. So, suppose I want the state space representation of a plant, I would do this:

G = ss(A,B,C,D)

and if I want to get the transfer function from it I could do :

G = ss2tf(A,B,C,D)

and so from here I could plot the frequency response:

bode(G)

but now, suppose I want to obtain the transfer function from the disturbance to the output, or the transfer function from the input $u$ to the output, how can I do this ?

[EDIT] For example, how do I obtain the sensitivity function from a state space representation of a MIMO system? Or the control sensitivity function?


texts: Omega-K algorithm implementation for synthetic aperture radar

texts:
I have been trying to develop Omega-k algorithm for SAR image formation. I am using the equations from chapter 8 in digital processing of Synthetic Aperture Radar data by Cumming and Wong. The steps I implemented are:

Range compression
Range IFFT
Two DFFT
Bulk Azimuth compression to a reference range (using eqn. 8.3)
Stolt Mapping (using eq. 8.5)
IFFT

I have confusions about the steps 4 to 6. Is there any norm for choosing the reference range in eqn. 8.3? I substituted eqn. 8.3 with 8.5 for stolt mapping and tried to interpolate the 2dfft spectra. However, the interpolation doesn't work. Do I need to compress the signal again after stolt mapping?

Any relevant answers will be highly appreciated. Thanks.


texts: Logarithmic fourier transform(LFT) on audio signal

texts:
I am trying to analyze the musics as possible as precisely.
Of course I tried FFT, but got some problems.

I found low frequencies have very low resolution than human's hearing. I tried very long time FFT to resolve this problem, but even analyzing with 8192 samples/s in 44100Hz sample rate(Means lack of time resolution), I got not enough resolution on low frequencies.

I found there are few solutions.

Firstly, a quadratic interpolation on FFT bins.
But it seems not a perfect way. Problems of this method are:

1. 'If i want to determine freqs between the freq bins, which three bins should I select to do an interpolation?'

2. 'Even I do this, there are no actual additional informations on result. I know interpolations are kind of tricky method.'

Secondly, extracting each freq bins with desired frequency, so I can extract the bins logarithmically.

But have a critical computational cost problem: (maybe over)N^2.

Thirdly, LFT(Logarithmic Fourier Transform).

This requiers logarithmically-spaced samples and gives me result exactly what I looking for with incredibly fast speed; https://stackoverflow.com/questions/1120422/is-there-an-fft-that-uses-a-logarithmic-division-of-frequency

But I have no idea with that algorithm. I tried to understand the paper and implement it, but it was impossible because of lack of my english and mathematical skills.

So, I need a help of implementation of LFT.


texts: How to initialize observation Matrix in Kalman Filter when there is no clear relationship between measurement and state?

texts:
I am try to use Linear Kalman to do time series prediction. I understand that I have to define a model process matrix which indicate how system state evolve, and a measurement matrix H which convert state variable to measurement space. However in my problem, there is no clear relationship between my measurement and state, so there is no way to just give 1 to some element in H to pick up the same physical meaning in state variable X, and 0 to other irrelevant component.
Under this situation, how do I design H matrix?
I have read a paper, it propose method below which use some data to train all the matrix, including H. But I don't understand how to deduce? can some one shed light on this?


texts: How an algorithm can be developed to count numbers and bolts in the image below.


texts: Suppose PSD of a signal $x(n)$ is $ PSD_{xx}(\omega)=1$. Now if a window function $w(n)$ of length $ 0\le n \le N-1$ is applied to $x(n)$, what will the new PSD be?


texts:
I'm designing a low pass filter to identify the DC content of a signal. The most important aspects of my application are the accuracy and the speed of the identification.

I would like to know if the phase lag brought by the filter plays an important role in my problem, because I have developped a filter that has a great performance in time (it identifies the DC component very fast and accurately), but its frequency response is poor in terms of phase. Do I really need to worry about it in this situation?


texts: At what stage do we compute the approximations and details while performing a DWT?

texts:
$$
\int_{-\infty}^{+\infty}{f(t)\psi_{j,k}^\ast(t)dt}\ \textrm{with}\ \psi_{j,k}(t)\ =\ a_0^{-j/2}\psi(a_0^{-j}t\ -\ b_0k)
$$
If this is the expression for the wavelet transform, how does this lead to wavelet decomposition and at what stage do we compute approximations and details?


texts:
Currently I am learning dense optical flow by myself. To understand it, I conduct one experiment. I produce one image using Matlab. One box with a given grays value is placed under one uniform background and the box is translated two pixels in x and y directions in another image. The two images are input into the implementation of the algorithm called TV-L1. The generated motion vector outer of the box is not zero.

Is the reason that the gradient outer of the box is zero?
Is the values filled in from the values with large gradient value?

In Horn and Schunck's paper, it reads

  In parts of the image where the brightness gradient is zero, the velocity estimates will simply be averages of the neighboring velocity estimates. There is no local information to constrain the apparent velocity of motion of the brightness pattern in these areas.

and

  The progress of this filling-in phenomena is similar to the propagation effects in the solution of the heat equation for a uniform flat plate, where the time rate of change of temperature is proportional to the Laplacian.

Is it not possible to obtain correct motion vectors for pixels with small gradients? Or the experiment is not practical. In practical applications, this doesn't happen.


texts: I am doing a project in which i have a "recorded voice". Now i have applied the noise reduction and get the "filtered voice". Now i want to calculate the SNR of recorded voice and filtered voice in matlab. I do not have pure voice for reference (As in all the previous post, pure signal is taken as reference in calculating SNR). I am confused how to do it. Please help !!


texts: Define comb function in terms of exponential function

texts:
I have one signal with $N$ samples and I want to downsample it by factor of $M$. Essentially my downsampler is comb function which takes every M$^{th}$ sample while others are set to zero, i.e.,

$$
\check{Y}_k=\sum_{n=0}^{N-1}\sum_{m=0}^{\frac{N}{M}-1}x[n]\delta(n-mM)e^{-j\frac{2\pi nk}{N}}\tag{1}
$$
where $x[n]$ is original signal, $\check{Y}_k$ is downsampled signal, and $n$ are time samples .

How is comb function $\delta(n-mM)$ define in terms of exponential function ? i.e.

$$\sum_{n=0}^{N-1}\sum_{m=0}^{\frac{N}{M}-1}\delta(n-mM)=\sum_{n=0}^{N-1}\sum_{m=0}^{\frac{N}{M}-1}e^{??}$$

Also what is the definition of comb function in frequency domain?


texts: How can I generate a cross spectrum? HFSWR

texts:
I have two sets of data (V1 and V2), each is an array of 4096 by 512 complex voltages (raw). I have already applied windowing, range processing and doppler processing leading to the generation of the range-Doppler map.

Now I wish to calculate the cross spectrum V12 using V1 and V2. Where should I start? Can I use the equation below? And if I were to use the said equation, do the parameters FFT(B) and FFT(A) correspond to the ouput of my Doppler processing? What does N^2 mean?


texts:
I have the task related to Radon transform which contains a subtask which uses resampling by means of DFT.

Let's consider the non-periodical discretized signal (Fig.1) (for example the string of pixels) having 515 pixels length. In my implementation for resampling contains following steps:

Cyclic left shift (Fig.2).
Add zeros to the center in order to the length of signal became 2^n (in our case 1024-515 = 509 zeros we must have add) (Fig. 3).
Get DFT from this signal (Fig. 4).
Cyclic right shift. (for shifting low frequencies to the center) (Fig.5)

Fig.1

Fig.2

Fig.3

Fig.4

Fig.5

The main question:

Why we must perform cyclic shift of the signal and add zeros exactly in the center? (I assumed what this made the signal periodic)
Zeropadding makes interpolation DFT spectrum, is it correct? (I asked and someone says what it is not quite so)
Maybe someone can explain in simple way what happens with signal after zeropadding.

I have made some experiments in a Matlab and found out that any other sequence of actions can not give required result.

Now let's consider two cases:

a) (THIS CORRECT VARIANT) We has the non-periodical discretized signal (for example the string of pixels) which will be cyclic shifted to left and filled zeros in the center after that will be obtained DFT from this and to shift it back.

b) We has the non-periodical discretized signal (for example the set strings of pixels) which will be filled zeros from left and right  after that will be obtained DFT from this.

What the difference these DFT spectrums?

I have read some books but not found the answer of this zeropadding's case. It seems this can be found only by own experience.

Answer in book:

A. C. Kak and Malcolm Slaney, Principles of Computerized Tomographic Imaging, Society of Industrial and Applied Mathematics, 2001 on page 25


texts: Visualizing the "frequency shift" theorem in FFT

texts:
I was trying to visualize the frequency shift theorem in MATLAB, which states that if the Fourier transform G(f) is shifted by a constant $f_o$, its inverse transform  g(t) is multiplied by $e^{j2\pi tf_o}$.

Say one makes two symmetric real valued Gaussians (G(f)) in the frequency domain as shown in the code below as a function of bin numbers. The peaks are symmetrically displaced from the center bin by a constant. When the inverse FFT is applied G(f), the output g(t) looks look the attached photo. A displaced Gaussian in the frequency domain should produce a Gaussian multiplied by cosine waves.
Intuitively, it does appear like an exponential decay times a cosine wave.

a) The FFT of a Gaussian is a Gaussian, but g(t) looks like exponential decay times a cosine.
b) Another point is why do we see a two-sided symmetric output in the time domain? Shouldn't we see only one sided result in the time domain?

What is the discrepancy here in the time domain?

Thanks.

Frequency Shift Theorem

W=[1:1:9001]'; % bin numbers

n=1; % Gaussian shape, n=1 Gaussian

H=10; % Height of Gaussian

s=25; % standard deviation in frequency domain

w_left=1400; % Position of Gaussian as bin numbers

w_right=length(W)-w_left; % Position of Gaussian as bin numbers

G_left=H*exp(-((W-w_left).^2/(2*s^2)).^n);

G_right=H*exp(-((W-w_right).^2/(2*s^2)).^n);

GShifted=G_left+G_right;

Inverse_GShifted=real(ifft(GShifted));

figure (1)

subplot (1,2,1)
plot (W, GShifted,'r', 'LineWidth', 1.5);
title ('Shifted Gaussian in Frequency Domain')
xlabel('Bin Numbers (Frequency)')
ylabel('Real')
xlim([1 9001])

subplot (1,2,2)
plot (W, Inverse_GShifted,'b', 'LineWidth', 1.5);
title ('Inverse FFT of Shifted Gaussian')
xlabel('Bin Numbers (Time)')
ylabel('Real Part')
xlim([1 9001])


texts: looking for simplified version of motion capture for simplified situation where objects are solid and have no joint (no internal degree of freedom)

texts:
The whole question is about a simplified algorithm for tracking a single solid object which has no joint, with assumption that i have full control on adding some markers in real world to it.

For example i want to find full coordinates (Center of orange Coordinate system and direction of each orange axis) of the car in the following image:

Assume i have control over adding as many markers(Stars) with required features(Shape, color, position) to my object(dreamy car) in real world.

Notice i am looking for some algorithms which mainly rely on finding position of my markers, which could be detected very fast by some simple color threshold.


texts:
I have a digitized acoustic data of length L in which a pulsed signal (chirp) of finite duration and bandwidth is merged starting at some time instant t1 and ending at time instant t2. I wan to calculate SNR of this pulse signal. What is the best way to calculate this SNR?

Thanks & Regards


texts: How to find inverse of convolution integral?

texts:
If $x^{-1}(t)$ and $ y^{-1}(t)$ denote the integrals of x(t) and y(t)  defined by

$x^{-1}(t)=\displaystyle\int_{-\infty}^{t} x(\lambda)d\lambda$

$y^{-1}(t)=\displaystyle\int_{-\infty}^{t}y(\lambda)d\lambda$

then,

$(x*y)^{-1}$ which denotes the inverse integral of (x*y )is equal to:

(a) $x^{-1}*y^{-1}$

(b) $x*y$

(c)$x^{-1}*y$

(d)$x*y^{-1}$

i tried it follows:

from both conditions above we can easily infer following

$\dfrac{d}{dt}x^{-1}(t)=x(t)\implies sX^{-1}(s)=X(s)$

$\dfrac{d}{dt}y^{-1}(t)=y(t)\implies sY^{-1}(s)=Y(s)$

then i multiplied both(keeping in mind multiplication in freq. domain corresponds to convolution in time domain)

$s^2[X^{-1}(s)Y^{-1}(s)]=X(s).Y(s)$

$s[X^{-1}(s)Y^{-1}(s)]=\dfrac{X(s).Y(s)}{s}$

$[sX^{-1}(s)Y^{-1}(s)]=\dfrac{X(s).Y(s)}{s}$

$[X(s)Y^{-1}(s)]=\dfrac{X(s).Y(s)}{s}] \implies x*y^{-1}=(x*y)^{-1}$

and also,

if i would've written as

$s[X^{-1}(s)Y^{-1}(s)]=\dfrac{X(s).Y(s)}{s}$

$[X^{-1}(s)sY^{-1}(s)]=\dfrac{X(s).Y(s)}{s}$

$[X^{-1}(s)Y(s)]=\dfrac{X(s).Y(s)}{s}\implies x^{-1}*y=(x*y)^{-1}$

so, options (c,d) both should be correct but in the book the answer is given as

only option (c)

so , where i am doing mistake, and what should be the correct answer, i'm stuck

with this book's faulty answers...so,please help


texts: Estimation of Two Closely Spaced Frequencies?

texts: What is the best frequency estimation algorithm for two closely spaced frequencies in term of the minimum frequency spacing achieved?


texts: FIR design : compute coefficients for the same frequency response at another sampling frequency

texts:
I would like to know if there's a standard way to obtain the FIR coefficients for a sampling frequency $F'$ when the coefficients are for a sampling frequency $F$.

I would like to implement the filter described in ITU R BS.1770-3
(the oversampling FIR filter, page 18).
The filter coefficients are given for a sampling frequency of 48 kHz.

What would be the way to derive the coefficients for another sampling frequency?

Edit december 28 2012

I wonder if there's a meaning in my request.
The described filter is used on a 48 kHz sampling frequency audio signal that has been transformed into a 192 kHz sampling frequency signal by stuffing 3 zeros between each original sample. It is the second step of an oversampling method.
The signal $[x_0, x_1, ..., x_n]$ is first transformed into $[x_0, 0,0,0, x_1, 0,0,0, ...,x_n,0,0,0]$. The filter I have mentioned is applied on this zero-stuffed signal.

If I understand correctly (which might not be the case), the cut-off frequency of this low pass filter can be expressed relative to the sampling frequency.
Given this context, and the desired result which is a sort of evaluation of the reconstruction of the audio signal into the analog domain, wouldn't this relative to sampling frequency cut-off frequency be appropriate for any sampling frequency ?

Let's say the cut-off frequency of the filter is $\alpha \times F_s$ ($\alpha$ should be around 0.125 for a 22 kHz analog upper bandwith ?), wouln't this $\alpha$ value be the good one for others sampling frequencies ?
If I have an original signal at 8 kHz sampling frequency, a four time oversample would lead to a 32 kHz sampling frequency, and I can suppose that the reconstructed analog signal would have an upper bandwith limit at approximately 4 kHz ?

End of Edit december 28 2012


texts: Is it possible to remove the non-random noise in the signal by averaging?

texts:
Ex: We're measuring vibration Frequency response of a structure, and at the same time there is a constant source of vibration (noise) from a pump. The pump is exciting the structure by sinusoid correspond to its constant rotational speed.
Is it possible to remove the sinusoid which is induced by the pump using averaging technique (Signal averaging)?


texts:
There is a recursive way of finding threshold in the image using histogram that are biomodal, and is as follows:
An automated procedure for bimodal histograms :

Select an initial estimate of T
Compute the means of the two regions determined  by T
Set the new T as the average of the two means
Repeat steps 2,3 until the difference in T in  successive iterations is smaller than a predefined  parameter

I have an old exam question below and I dont know how to solve it. all I know the T is $114$ and if this also helps total number of pixels are area first triangle+are of second triangle area + 4000 pixels. I am stuck on how to calculate step 2 to get me going.
Old Exam Question
explain why the isodata threshold of image is equal to $114$.


texts: Is Mask R-CNN a good fit for what I want to do?

texts:
I'm looking at isolating the foreground from a set of photos, and I think I want to use instance segmentation so that I can try to gauge how well-focused the main subject of each photo is.
I have rudimentary experience of Yolo/darknet (but want to move beyond simple bounding boxes). I've never used python, and am mainly a PHP developer. Happy to learn whatever's needed though, but I don't want to spend a day messing around only to find I've picked the wrong tool for the job, or that it's far too complex and I can't get my head around it!
I have a server with a 1080 GPU in it. Speed is kind of important, but so long as it's less than a couple of seconds per photo, that should be ok. Is that feasible? The photos are 10MP+ in size, but I'm guessing it's standard practice to size down to (say) 1MP first, or whatever.
I have millions of photos that I want to run this against, to help weed out poor-quality shots.
Where should I be looking to get started? I see a lot of mentions of Mask R-CNN, but I don't know if that's a good fit or if there's better/faster/easier options out there right now?
Furthermore, should I use existing yolo/darknet bounding boxes, and somehow import them into Mask R-CNN et al, or is it better to start afresh and let Mask R-CNN deal with all of it?
Thank you!


texts:
Assuming that we have a continuous signal $v(t)$

$$v(t) = \int_0^t g(u)\, \mathrm du\tag1$$

where $g(t)$ is white noise.Then take the derivative of it.

$$\frac{\mathrm d}{\,\mathrm dt} v(t) = g(t)\tag2$$

Then sample $v(t)$ so that we get discrete-time model, and calculate the finite-difference instead of derivative

$$ v\left( (n+1) T_s\right) - v\left(nT_s\right) = \tilde g \left(nT_s\right) \cdot T_s \tag3$$

where $T_s$ is sampling interval.

I'm told that $\tilde g(nT_s)$ is the low-passed white noise, so how to prove it?


texts: Number of trials to judge performance of Compressive Sensing recovery algorithms

texts:
I'm trying to get a conclusive numerical value for Mean Squared Error (MSE) as the performance metric of a few CS sparse recovery algorithms.
To do this, I vary the number of measurements ($M$) taken from an $N$-dimensional vector with $M\ll N$ using the sensing matrix $\mathbf A \in \mathbb K^{M\times N}$. The goal is to find the MSE at each $M$.

At the moment, randomly generated sparse signals are sensed using random sensing matrices ($\mathbf A$), leading to $M$ measurements from which the original sparse vectors are then recovered. For each $M$, I generate 30 sensing matrices and 30 signals for each $\mathbf A$. This totals 900 trials for a single $M$.
I first find the difference between the original and reconstructed signal. Then I find the $l_2$ norm of the difference (error) vector. This value is found for all trials for a single value of $M$, then squared and averaged to find the MSE at that value of $M$.

I am curious if there is a lower limit to the number of trials I should perform for each MM so that I get a conclusive value of MSE? How do I defend against a person who says I should do more?

Kindly point me to the appropriate forum if the question is not relevant to this domain.


texts:
I am trying to generate a multitone signals with low crest factor and as suggested in the Boyd's paper I am using the quadratic phase distribution:

$Phase(k) = \pi(k - 1)(k - 1)/N$

where $N$ is the number of tones in the signal and $k$ their frequency indexes.

This formula works well, giving the expected crest factor ($CF <= 2$), only if the frequency indexes are strictly sequential (e.g. $k = 2,3,4,...$) but if the indexes are not sequential (e.g. $2,5,7,11,...$) or, even worst, logarithmically distributed (e.g. $1,2,4,8,...$) the resulting $CF$ is very often much higher than $2$.

I played quite a lot with the above formula, trying differ combination of $k$ and $ N$, but without any success.

What is strange, to me, is that the lowest $CF$ is always obtained by using sequential $k$ values ($k = 1,2,3,4,...$), regardless of the actual position of the frequency index.

Just to complete the story, using the Shapiro-Rudin sequence I get more or less the same behavior.

Now my question is: do you know a way to amend the above formula to get low $CF$ with any arbitrary frequency index distribution or another phase generator algorithm suitable for this scope?

Ciao and many thanks for the attention.

Franco


texts: Why is phase range between $-\pi$ and $+\pi$ (instead of $0$ and $2\pi$)?

texts:
I wonder why the phase range in DSP applications is between $-\pi$ and $+\pi$.
For example, why is that not between $0$ and $2\pi$?
This question popped when I was reading about synchronization in digital communications.
It said instead of $\arg( Im(x) / Re(x) )$ we can use just $Im(x)$ because they are of the same sign because phase (here $x$) is always between $-\pi$ and $+\pi$ !!!


texts: Relation between Normal Phase Shift of a wave and Phase Modulation

texts:
I am little confused with the Phase Modulation and the phase of a sine wave. I get the phase modulated wave from the google images as below:

Phase modulation has the form:
$$PM(t)=A_c \cos\big(2\pi f_c t+(xA_m)\big)$$
Considering the message signal as
$$ m(t)=A_m\cos\big(2\pi f t\big)\text,$$
and $x$ as the phase modulation index.
Basically, I see $\cos(\theta)$ denotes a wave with some frequency. If we consider in this form - $\cos(2\pi f_1 t)$, it is a cosine wave with frequency $f_1$. And if we add a constant time factor with the unit of seconds, we get something like: $\cos(2\pi f_2 t+t_1)$. I am able to see this as a right phase shifted cosine wave with time $t_1$.
But during phase modulation, we actually change the phase of the wave as per this form:
$$PM(t)=A_c\cos\big(2\pi f_c t+(x A_m)\big)$$

Now what I am confused is that the term $(x A_m)$ has the unit of radians or seconds?
Based on the figure, I am able to assume $x$ has the unit of radians/Volt making the unit of $(x A_m)$ as radians, so that the final phase modulated has an abstract form $\cos(\theta_1+\theta_2)$ which could be some other frequency of the original carrier wave. I am just guessing this but I am not sure. If you could please let me know if this assumption is valid, it would be helpful.

If it is valid, then why do we call it as a phase modulation?
For a phase modulation, I see that the modulated waveform should be something like - $PM(t)=A_c\cos(2\pi f_c t+(x A_m))$ where $x$ should be in the unit of (seconds/volt). Now the phase of the carrier wave changes but I am not able to imagine the waveform.

This does not exist but isn't this the pure phase modulation?

Now, the next hardest part which I am concerned is that, I see that phase modulation is an analog modulation scheme. Let's assume that at a time instant $t_1$, the Phase modulation system calculates the amplitude of the message signal and changes the frequency of the carrier wave proportionally. At time instant $t_2$, this frequency changes to the next value depending up on the message signal.

Now, how fast does the system notice the phase changes of the message signal?
Is that given by the carrier frequency or something else? (Since it is looking the amplitude of the message signal at a specific time instant, can we see it like -the message signal is somehow sampled, its amplitude is quantized to some constant (having the unit of radians) and then added to the angle of the carrier wave?

The reason why I am curious about this is that we can see the phase modulation as the frequency of the carrier wave is changed but that frequency should remain hold at least for one cycle to make it significant.


texts: Separate two measured combinations of two signals with different time delays

texts:
I have two signal s1(t) and s2(t) that I want to extract but I can only measure:

y1(t) = s1(t) + s2(t-d1)

y2(t) = s1(t-d2) + s2(t-d3)

The time delays d1, d2 and d3 are unknown, though I have a rough estimate for d2.

Maybe (but only if necessary) I could approximate this by shifting y2 so that

y1(t) = s1(t) + s2(t-d1)

y2(t) = s1(t) + s2(t-d3)

Is there any way to separate the signals?
What happens if I have three measurements and three signals?


texts: Undecimated DWT vs. CWT. In what cases is one preferable over another?

texts:
Talking about undecimated DWT let's focus here on SWT algorithm.

SWT is said to be:

numerically more stable due to Mallat algorithm. And the inverse operation is capable of returning the original signal which is not the case with CWT
SWT is computationally faster than CWT

On the other hand:

SWT works on dyadic scale while with CWT you can choose any scale sampling

Are there any other factors supporting the choise of one or another alternative?


texts: Frequency modulation of $m(t)$ in MATLAB

texts:
I have a message signal defined in the below interval
$$
m(t)=\begin{cases}1&, 0\leq t < \frac{t_0}{3}\\[2ex]
-2&, \frac{t_0}{3}\leq t <\frac{2t_0}{3}\\[2ex]
0&, \frac{2t_0}{3}\leq t < t_0\end{cases}
$$

where $t_0 = 0.15\ \rm seconds$, and sampling frequency $F_s=2\ \rm kHz$.

My MATLAB code in order to construct $m(t)$

t0= 0.15;
Fs= 2000;
t1= 0:1/Fs:t0/3- 1/Fs;
t2= t0/3:1/Fs:2*t0/3 - 1/Fs;
t3= 2*t0/3:1/Fs:3*t0/3-1/Fs;
m1= ones([1, length(t1)]);
m2= -2*ones([1, length(t2)]);
m3= zeros([1, length(t3)]);
m= [m1, m2, m3];
t= [t1, t2, t3];

I'm trying to find frequency modulation and the following formula is wanted to be used
$$
x_{FM}(t) = \cos\left(2 \pi  f_c t + 2\pi  k_f \int_{-\infty}^t m(x) dx\right)
$$
with carrier frequency $f_c=200$Hz and deviation constant $k_f= 50$.

Only for or while loops are allowed while we find integral. In order to integrate, I have made this for loop

result=0;
j=1;

for i= 0:1/Fs:t0- 1/Fs
   result= result + m(j);

    %% result2 will be used as we integrate it over 0 to 0.15
   result2(j) = result;
   j= j+1;
end

Please tell me, is something wrong with this integration?
I plotted this and it seems correct to me.

If the integration is true, then why frequency didn't change at all when plotting this signal.

xFM= cos(2*pi*fc*t + 2*pi*kf*result)

Full code here


texts: Constant Modulus Algorithm and the Gradient Operation

texts:
CMA is a blind channel equalization algorithm with the details presented above. I am facing 3 difficulties and shall appreciate help

Q1: Does $H$ and the bar over $\bar{y_k}$ represent the Transpose symbol?

Q2: When calculating the gradient, $\Delta J(w) = 2E{({|y_k|}^2 - 1). \Delta(w^Hx_kx_k^Hw)}$, how does the gradient $\Delta(w^Hx_kx_k^Hw)$ becomes $x_kx_k^Hw$ ? Is there a formula ?

Q3: Equations : The final Equations are given by $w_{k+1}= w_k - \mu x_k({|y_k|}^2-1)y_k^T $ (T = transpose). While doing steepest ascent, we usually take a step in the opposite direction of the gradient. So, the minus should have become positive as according to the logic given in Least Mean Square.

I was looking at the Matlab implementation given here http://www.mathworks.com/matlabcentral/fileexchange/39482-blind-channel-equalization/content/lms.m
The Equations given in this impelemtation from lines 109 -- 113 are different from the ones in theory (excerpt above). The Equations in the implementation are :

for i=1:K
   e(i)=abs(c'*X(:,i))^2-R2;                  % initial error
   c=c-mu*2*e(i)*X(:,i)*X(:,i)'*c;     % update equalizer co-efficients
   c(EqD)=1;
end

What is correct? Can somebody please show the correct version?


texts: What is purpose of correlation kernel? IIs it high pass filter or low pass filter?

texts:
I am research about correlation kernel and I have some questions that need your help. Let see the pp. 3302-3303 in the paper:

  Changyang Li, et al., Robust Model for Segmenting Images With/Without Intensity Inhomogeneities

The special kernel is defined as:

$$W(|y-x|)=\dfrac{\gamma}{1+\dfrac{1}{\sqrt{2\pi\omega^2}}e^{\dfrac{(y-x)^2}{2\omega^2}}} $$
where $\gamma$ is a normalizing weight obtained by:

$$\gamma=\left(\int \left( 1+\dfrac{1}{\sqrt{2\pi\omega^2}}e^{\dfrac{(y-x)^2}{2\omega^2}}\right)^{-1} \mathrm{d}y\right)^{-1} $$

and $\omega$ is a Gaussian kernel.

I implement it with support from Mr. Rayryeng. This is comparison of Gaussian filter (right side) and correlation filter (left side). The gaussian looks like the low pass filter, whereas correlation kernel is as high pass filter. Could you help me explain the purpose of correlation kernel comparison with gaussian kernel? Which is benefit? To what kind of images apply the correlation kernel to? Thank you.


texts: Linear-phase lowpass filters: frequency responses alignment

texts:
These two filters have very similar frequency responses, but those responses are not identical except at a single frequency $\omega_0$. I want to find $\omega_0$.

One way I've seen that done is like this:

  $$\begin{align}
Y_1(z)&=X(z)+2X(z)z^{-1}+X(z)z^{-2}\\
Y_2(z)&=X(z)+X(z)z^{-1}
\end{align}$$

  if $Y_1(z)=Y_2(z)$

  $$
\begin{align}
\Longrightarrow 1+2z^{-1}+z^{-2}&=1+z^{-1}\\
\Longrightarrow z^{-1}+z^{-2}&=0\\
\Longrightarrow z\left(z+1\right)&=0\\
\Longrightarrow z=e^{j\omega}=-1\\
\Longrightarrow \omega=\pi\\
\omega_0=\frac{f_s}2
\end{align}
$$

But, to be perfectly frank that is quite confusing to me I don't quite know what's going on there, would someone please break it down for me?

Another way I've seen it done is like this:

  $$
H_1\left(\omega_0\right)= H_2\left(\omega_0\right)\rightarrow 1+2e^{-j\omega_0}+e^{-j2\omega_0}=1+e^{-j\omega_0}.
$$

  With algebraic simplification the above equality can be written as:

  $$
e^{-j\omega_0}=-e^{-j2\omega_0}.
$$
  Here's the tricky part,...we multiply both sides of the above equation by $e^{j\omega_0}$ to give us:
  $$
1=-e^{-j\omega_0}.
$$

I guess they're equivalent, but, in what ways specifically are they identical and in what ways are they divergent?

If someone could help me to see I would be so grateful.


texts: How to overcome different MFCC coefficients distributions from different speech datasets?

texts:
I am using MFCC values as features for a machine learning model of speech, detecting age from a voice recording of a person.

I work with voice datasets I found on the web: common-voice and vctk.

Each utterance is ~3 seconds long. I calculate the MFCC values in frames of 25ms with overlap of 10ms, and then average over the whole utterance. In addition, I calculate std of the coefficients. I am using python librosa library for the calculation.

I plot the values I get for ~16,000 utterances in each dataset, and get different  distributions.
I would expect the distributions to be similar as the number of examples is big and should represent the entire population.

In the attached histogram you can see the 2 first coefficients for all utterances (average MFCC value in each utterance and std of the MFCC values in each utterance).

What might be the cause of these differences?

I looked into Cepstral Mean Subtraction / Normalization, but the papers I rely on are using the mean MFCC values for the entire utterance (for each MFCC coefficient) as a feature for the utterance. In this paper for example, the mean and std values of each MFCC coefficient are used. If I use normalization, I will get zero mean for each MFCC coefficient for the entire utterance. Can I use some kind of a channel normalization in a algorithm that is based on the mean MFCC values?


texts: In process of image zooming, Sampling rate changes or stays constant?

texts: When we zoom an image, our sampling rate will be changed(increased) or sampling rate will not change because of zooming operation?


texts: Digital PLL loses lock every time mesage crosses zero

texts:
I think my digital PLL is almost ready, but I've encountered this problem and I don't know what might be causing it, so I'd appreciate if you could help.

I'm using the DPLL in a Costas loop. It seems to work fine but whenever the message crosses zero, lock is lost. After that, it ends up locking again. You can see here:

Input to the Costas loop is:
$$
x(t) = m(t)cos(2\pi f_ct+\theta_{in})
$$
$$
m(t) = cos(2\pi f_mt)
$$
where $f_m << f_c$

Not sure if this is a known phenomenom (it probably is) but I haven't been able to find anything related. It'd be nice if you could point out what's going on and/or how to fix the temporary loss of lock?

One way I've managed to get it "working" consisted of squaring the message signal (although phase error rises a bit when message goes near zero), but I don't wish to square it so that wouldn't be of use to me.

This is the Costas loop I'm implementing for this test:


texts: Video stitching for static scene (infinite loop video)

texts:
I have a video that is a panoramic video of a static scene. Just to be clear, I am not talking about a spherical 360° degree video but a video that starts in some direction and then does a full 360 horizontal tour either clock or counterclock wise (direction is known). The video then cuts approximately off when a complete tour is completed (~10° error). The video is most likely between 10 to 20 seconds long. I would like to modify the beginning and end of the video of in such a way that if I play the video in a loop the user has the impression he sees a never ending video (end and beginning should have a seamless transition). The main problem is that beginning and end might be slightly vertically shifted and tilted with respect to one another. Otherwise I would only need to find a frame that matches.

My question is therefore I do best solve this problem. Should I look into image stitching or are there more specific algorithms for this type of video stitching. When I search for video stitching I mostly come across 360° video stitching. Pointers to the appropriate literature are also very welcome.

EDIT: You might be wondering why I don't just create a panorama picture as the scene is static. I want to take advantage of the camera that adapts to the lightning changes.


texts: Why do people calculate impulse response? Generally systems are designed after modelling the possible input signals and calculating the appropriate filters for the desired outputs. Where does impulse response calculation become important?


texts: Which anti aliasing filter algorithm for efficient audio resampling?

texts:
I'm building a real-time audio resampler (think pitch bend) that needs to have a several different performance vs quality configuration options. I understand that I'll need to apply a low-pass filter before resampling in order to avoid aliasing.

The requirements for the first filter are this:

very efficient
better than nothing

For this filter, I don't mind if I have a very slow roll-off, or if there's significant phase distortion. I just want it to be as fast as possible, and to attenuate frequencies above nyquist to some degree.

The requirements for the second filter are:

reasonably efficient
significant reduction in frequencies above nyquist

I'm guessing that I'll want to go with one of the classic algorithms I hear about for the second filter (chebyshev, butterworth), and potentially something like a recursive moving average filter for the first.

I realize my question may so vague as to be useless ("very efficient" and "reasonably efficient" are obviously relative terms!) I realize that filter selection and design is an art that one can spend a lifetime on. I'm quite inexperienced with DSP and am just looking for a couple algorithms I can get my hands dirty with. I'm hoping someone with audio experience can pip up and say "here are my general purpose, go-to algorithms for efficient lowpass filtering".


texts: Why does the frequency in fft plot of the baseband modulated signal isn't changing at the receiver

texts:
I have designed a transceiver system for cellular frequencies(800MHz). On the receiver side, I have converted the band signal to baseband signal through digital mixing. I have added the Inphase and Q phase signal to generate the qpsk signal. But when I plot the fft of the signal, then the frequency in fft plot is not changing in spite of changing the carrier frequency at the transmitter.

ws = (0.28*pi);%input('stopband edge frequency in radians,ws1 = ');
0.63*pi = 16.25MHz || 18.2MH = 177  30%  40% = 0.28, 0.2 wp = (0.2*pi);%input(' passband edge frequency in radians,wp1 = '); cut off frq. = 0.485*pi = 12.5MHz(old), fs =51.5MHz 13MH= 0.126

tr_width = ((18.2-13)/130);

n = ceil((6.6*pi)/tr_width); %Hamming Window is used if (mod(n,2)== 0)
    N = n+1; else
    N = n; end

wc1 = (ws+wp)/2;

if N<=0
    error(' N should be greater than zero');  end

if wp > pi
    error('cut off frequecnies should be less than pi'); end

hd = zeros(1,N); % N =285 alpha = (N-1)/2; %142

 k = 0 : 1 : ((N-1)); % length = 142  n2 = k-((N-1)/2);
     for temp = 1:N
      n1=temp-((N-1)/2)-1;
      if(n1~=0)
            hd(temp) = sin(wc1*n1)./(pi*n1); % Nagoor Kani
      else
          hd(temp) = (wc1/pi);
      end   end

 k = 1 : 1 : N;
    w_ham(k) = 0.54-0.46*cos(2*pi*(k-1)/(N-1));   hn = (hd.*w_ham);

w1 = 0 : (pi/(17)) : pi;
    hw1 = hd_0 * exp (-1i*w1*alpha);
    hw2 = 0; for m = 1 : 1 : alpha
    hw3 = hn(m) * (( exp(1i*w1*(1-m))) + (exp(-1i*w1*(1-m+2*alpha)))); % generation of complex equivalent
    hw2 = hw2 + hw3; end

hw = hw2 + hw1;   h_mag = abs(hw);

figure(9); stem (n2,hd,'b') title('impulse response of ideal low Pass Filter'); xlabel('Discrete time n'); ylabel('hd(n)'); grid on; hold on;

len= length(w_ham);

L1_r =0:1:len-1; [mag,w] = freqz(hn,1,length(hn));    % [H,W] = FREQZ(B,A,N) returns the N-point db = 20*log10(mag);     % complex frequency response vector H and the  pha = angle(mag);            % N-point frequency vector W in radians/sample of the filter
                              low_inp = filter(hw,1,inph_r);           % Filtering the input signal low_qp = filter(hw,1,qph_r);


texts: Inverse Fourier of Two-Pole Transfer Function

texts:
I would appreciate if someone could walk me through this derivation.

I have a transfer function in the frequency domain, which has two poles

$$\tilde{H}(\omega) = \Big(\frac{1}{1 + i \omega \tau_1}\Big)\Big(\frac{1}{1 + i \omega \tau_2}\Big)$$

For a single pole, the inverse Fourier transform is:
$$\mathcal{F}^{-1}\Big\{\Big(\frac{\tau}{1 + i \omega \tau}\Big)\Big\} = \Theta(t) ~ e^{\displaystyle -\frac{t}{\tau}} $$

where $\Theta(t)$ is the Heaviside function since this is a causal filter. (See this answer.)  I also plugged the above $\tilde{H}$ into Wolfram Alpha and got the expected result:

$$\mathcal{F}^{-1}\Big\{\tilde{H}(\omega)\Big\} = \frac{1}{\tau_2 - \tau_1} \Bigg( ~ e^{\displaystyle -\frac{t - t_d}{\tau_2}} - e^{\displaystyle -\frac{t - t_d}{\tau_1}} \Bigg)\Theta(t - t_d)$$

where $t_d$ is the time after which the causal filter is effective.  I'm not sure if it's a reversal of integration limits, integration by parts, or simply some of the terms cancelling after integration and plugging in the limits that might be responsible for the subtraction.

And I'm also not 100% sure how to work in the $t_d$ term.


texts: Converting PLL Discriminator into Doppler error

texts:
I'm writing a GPS receiver SDR software, and I have calculated the PLL discriminator ouptut as atan(Q_Prompt,I_Prompt)
I would like to know the formula that converts the discrminator output to doppler error


texts: What is the technical term for the product of "number of pixels" and "number of channel per pixel"?

texts: Assume I have m x n pixels of an RGB image. If I calculate 3mn, what is the name of quantity for this value?


texts: Making sense of the delay formula between two sensors in an antenna array?

texts:
In the image above, there is a formula for the delay of a signal at a given sensor 'i' in an antenna array. I don't understand how they arrived at that formula.

Each antenna array element is separated by a distance of 'd' and we know the signal hits the array at an angle 'theta'. Dividing by 'c' gives us the time taken for light to travel the additional distance, but I don't see how the quantity 'dsin(theta)' represents the extra distance. Would appreciate any clarification.


texts:
I'm looking for some suggestions and wondered if anyone had any ideas.

I have just completed a project in Speech Recognition using MFCC, Dynamic Time Warping and Hidden Markov Models etc.. (Some of you will probably remember me, and, how annoying I was!!) But I managed to complete it.

It's the summer now and I'm looking for project ideas, I want to keep on the signal processing and in particular speech recognition and wanted to ask if anyone had any suggestions which might challenge me, but, also give me a lot of knowledge so I can progress in this field.

I have been thinking about Homophones and how these can be applied to speech; for example: "I am going to the shop", "I would like two apples please" and was thinking this would require lexical analysis but I am not too sure.

Any help would be greatly appreciated.


texts: Memory efficient filtering with scipy.signal in Python

texts:
I have several EEG channels that need filtering, and one channel may reach a recording length of 12 hours or potentially even more. This results in billions of data points stored which, when loaded, is represented as a NumPy array (by default as 16 bit long integer). In order not to load all data into memory at once, I make use of Python's mmap. This solution works until I call scipy.sosfiltfilt(). As I observed, this method creates copies of the entire signal which gets eventually filtered and is returned. The problem arises with really large arrays when making copies becomes simply unfeasible in terms of memory usage.
I have done some research, however, I have not come across a solution. Therefore, my question is whether there is any solution to filter such lengthy signals efficiently. My goal is to achieve this by for example, using an in place updating approach instead of creating copies without having to reimplement the method. Or does scipy.signal support mmap in any way? Or should I just create smaller chunks of the data? Or is there any other feasible way to do this?


texts: Solving a Linear Mean Square Estimation the Easy Way

texts:
I have an exercise which is quite trivial. However I got stuck and I'm not sure if this the end-result. I assume there has to be a way to get this result much quicker.

Given are two randomly distributed variables y and n with mean 0 and variance 1. Further we know that $E\{yn\} = 0.5$ We measure $$x=y+n$$

We look for linear-mean-square estimation of y as a function of x.

From the given facts we now x has zero mean two. The variance has to be $$var(x) = var(y)+var(n)+2\cdot cov(yn)$$
because y and n are correlated. Therefor $var(x)$ becomes $$1+1+2\cdot 0.5 = 3$$

y becomes $y = n-x$ and $\hat{y}$ should have the form $\hat{y}= ax+b$.
For a and b I already have the general formula:
$$a=\frac{E\{xy\}-m_xm_y}{\sigma_x^2}$$
$$b=\frac{E\{x^2\}m_y-E\{xy\}m_x}{\sigma_x^2}.$$
In my case y should be $n-x$ if i got this right. But solving the problem with those formulas for a and b leaves me with terms like $E\{xn\}$. How can I know what this mean should be? I can't assume they are uncorrelated, can I? Probably I'm running completely in the wrong direction, and the solution is much more obvious.

EDIT 1: From Fat32's input I get for a:
$$a = \frac{E\{x(n-x)\}}{\sigma_x^2}=\frac{3-1.5}{3}=1/2$$
and b $$b=\frac{E\{x^2\}m_y-E\{x(n-x)\}m_x}{\sigma_x^2}=\frac{3-1.5}{3}=\frac{1}{2}.$$
The solution would therefor be $y=-\frac{1}{2}x+\frac{1}{2}=\frac{1}{2}(1-x)$ Not sure if this is true. Have to test it with random samples.

EDIT 2:
I did a test with matlab:

N = 10000;             %// Number of samples in each vector
M = randn(N, 2);

R = [1 0.5; 0.5 1]; %// correlation matrix
M = M * chol(R); %used to calculated depended random variables

n = M(:, 1);
y = M(:, 2);

x = y+n;

y_hat = -0.5*x+0.5;

mean(y-y_hat)

y_hat is not even close to the real y. Has not even the same mean. I don't get it. I'm making definitely some mistakes here.

EDIT 3:
Found another formula which uses the a and b. Inserted the linear leas squares solution becomes $$\hat{y}=\rho_{xy}\frac{\sigma_y}{\sigma_x}(x-m_x)+m_y.$$ When I insert my values I get:
$$\hat{y}=\rho_{xy}\frac{1}{\sqrt{3}}x.$$
Rho is $\frac{1.5}{\sqrt(3)}$ and so $\hat{y}$ becomes 0.5x as @Fat32 pointed out. The error above was that b is zero because $m_x$ and $m_y$ are zero.


texts:
I am implementing a FMCW radar using bladerf sdr:

When reading the output from the vector sinks, the outputs are not synchronised.How should I synchronise them? is it possible to do so using gnuradio only or should I write some HDL code?
EDIT
rx signal:

tx signal:

The object distance is only few meters. The x scale is in seconds. That cant be the delay.


texts: Upsampling with FIR filter causing discontinuity at start of new buffer

texts:
I have implemented an oversampling algorithm for an audio signal in C++ which is producing a distortion of the signal at the start of a buffer. The algorithm is wrapped in a class with methods for up and down sampling by a factor of 4, with a 256 tap linear phase FIR filter performing the "interpolation" of the upsampled signal. The distortion occurs after convolving the input signal with the filter coefficients so I think that is the source of the problem.

Here is the function I am using to apply the upsampling (where the distortion is first noticed):

// Upsample a signal four times
std::vector<double> oversample::upsample4x(double* inBuffer, size_t inLength)
{
    // Output length is 4 times the length of the input
    size_t outLength = 4*inLength;

    // Create vectors for the upsampled signal, pre and post filtering.
    std::vector<double> upSampled(outLength);
    std::vector<double> upFiltered(outLength);

    // Pad the signal with zeros
    for(size_t i=0; i<inLength; i++)
    {
        size_t j = i*4;
        upSampled[j] = inBuffer[i];
        upSampled[j+1] = 0;
        upSampled[j+2] = 0;
        upSampled[j+3] = 0;
    }

    // Use FIR filter to remove aliased images
    // accumulator for each sample
    double acc;
    for(size_t k=0; k<outLength; k++)
    {
        // Put the current sample into the buffer.
        upHistory[upIndex] = upSampled[k];

        // Create a local copy of the current index for calculating the output.
        size_t outIndex = upIndex;

        // Zero the accumulator.
        acc = 0;

        // For the zero-indexed array of length QTAPS (length of FIR+1).
        for(size_t i=0; i<QTAPS; i++)
        {
            // Convolve the buffer with the filter.
            acc += upHistory[outIndex] * quarterTaps[i];

            // If the index is above zero, decrement, otherwise set it to the filter length.
            outIndex = (outIndex > 0) ? --outIndex : QTAPS;
        }
        // Assign accumulator to the output vector.
        upFiltered[k] = 2*acc;

        // Check to see if we have reached the end of buffer.
        upIndex = (upIndex < QTAPS) ? ++upIndex : 0;
    }

    // Return the upsampled and filtered signal.
    return upFiltered;
}

The size_t upIndex is a member of th class oversample as well as the buffer upHistory which is the past signal used for the convolution. The algorithm is implemented as a ring buffer. QTAPS is the number of taps used for the filter (at a quarter of the sampling rate hence qtaps).

An illustration of the problem can be seen in this MATLAB figure:

The input signal is 1500 samples long (so upsampled is 6000), after which I put the same signal through again. The real problem with this is that when I implement it for audio it gives an audible buzz every buffer, making the audio unusable. I've looked through the algorithm too many times and can no longer see any issues, so any help would be greatly appreciated.

EDIT: There was a discontinuity in the sine wave which is causing the visible distortion in the previous figure. This new figure illustrates a zoomed time domain shot of a guitar chord, where there are two very clear discontinuities which were not present in the original signal.

There are 30 samples between each peak, and the two peaks are periodic with a period of the length of the filter. I think the two peaks are caused by the two convolution processes from the up and down sampling (same filter, same code, just one pads and one decimates). I still can't figure out where this jump is coming from.


texts:
I am trying to get an understanding of autocorrelation and I am having some issues  with trying to understand the process.

I have a Bernoulli process called $X[t]$. In this process, $P(X[t] = 1) = p$ and $P(X[t] = 0) = 1-p.$

We have a new process formed from $X[t]$ that is:

$$
Y[t] = \frac 12 \left(X[t] + X[t-1]\right)
$$

I have to find the autocorrelation $r_Y [t+\tau,t]$. Here's what I got so far:

\begin{align}
r_Y [t+\tau,t]& = E\left(Y[t+\tau]Y[t]\right)\\
&= \frac 14 E\left\{\left(X[t+\tau] + X[t+\tau-1]\right)\left(X[t] + X[t-1]\right)\right\}\\
&= \frac 14 \left(r_X[t+\tau,t]+r_X[t+\tau,t-1]+r_X[t+\tau-1,t]+r_X[t+\tau-1,t-1]\right)
\end{align}
From there, I can get $r_x[t+\tau,t]$:

$$
r_X[t+\tau,t] =
  \begin{cases}
    p^2       & \quad \text{if } \tau \neq 0\\
    p  & \quad \text{if } \tau = 0\\
  \end{cases}
$$

But the wall that I am running into (and maybe it's because it's not making sense to me because of lack of sleep) is how you substitute that expression back into $r_Y[t+\tau,t]$? I know you end up with three different answers, but trying to substitute it back in seems to cause a mess for me. I am hoping someone will help me with that part.


texts: What DSP method are consumer products like the game Rocksmith and guitar polyphonic tuners likely to use for multiple f0 detection?

texts:
The game Rocksmith and some polyphonic guitar tuners (like the PolyTune) are able to recognize, at least to some extent, multiple fundamental frequencies in single-source audio.

I know there are some methods for multiple fundamental frequency detection, like MUSIC and ESPRIT, but is it likely that these products implement them or leverage several assumptions (such as: audio is from a guitar, audio is from a single source) about the application domain to make a simpler method work?

In the second case, which simpler methods are likely to be used? Simple peak-picking on a spectrum, with domain-specific heuristics? Or something more complex?


texts: Software-Emulated Amplifier: Cracking while change Volume

texts:
I'm developing a software emulated analog synthesizer in the style of Euro Rack Modules. I have a problem with the volume amplifier.
Whenever I control the volume button via mouse/hand/manually rapidly (fast low and up, or fast from low to middle), I hear lots of little cracks while changing the volume. The confusing fact is, when controlling the button via automatism, like via LFO (Low-Frequency Oscillator), all is fine.
I already checked if all values are within the valid ranges (floating between -1 to 1).
Does anyone have an idea why this occurs and what I could do to avoid this?
Here's a short demonstration:
https://youtu.be/5PXcoTd32RM


texts: How to find DC bias of periodic signal from samples that include a non-integer number of periods?

texts:
I'm using an ADC to sample a periodic signal and I want to calculate the DC bias of the signal from the samples.  The obvious solution is to take the average of the samples.  This works fine if there are an integer number of periods of the signal in the sample set.  But if the sample set contains an additional fraction of a period then those extra samples can throw the average off a bit.

The signal frequency can vary (from one sample set to another) and is independent of the sampling rate.  The sampling is asynchronous to the signal so sampling could begin anywhere in the period of the signal.  Assume there is at least a couple periods of the signal in the sample set although it could be many more.

Do you know of a better way to calculate the DC bias of the signal from a sample set that contains a non-integer number of periods of the signal?

Update:
For my application this is not a real-time calculation.  My device collects a sample set occasionally and I'm trying to do post-processing of the samples for various measurements.

I don't know the period of the signal by any other information.  All I have is the sample set.

This is admittedly an XY problem.  I want to know the DC bias so I can remove it from the samples (and then I plan to integrate the signal).  I'm hoping for a way to improve my original implementation (which is easy for me to understand) before trying something more complicated (for me).


texts: How to sketch the following discrete-time signal?

texts:
How to sketch the following discrete-time signal:
\begin{gather*}
x[(n-1)^2]
\end{gather*}
for the signal given below:

Any help would be much appreciated.


texts: Is there a way to determine the quality of an impulse-response relationship?

texts:
I'm new to system ID so be gentle.

I have a modeled signal of streamflow that I would like to map to an observed signal of stream height. This lends itself nicely to a simple impulse-response kind of relationship.

Problem is that the streamflow is modeled. So sometimes the magnitude of the impulse does not really match the magnitude of the response (e.g. big impulse, small response followed by small impulse, big response later in the time series). Even worse, sometimes I have false positives (modeled impulse, no response) and false negatives (no impulse, but there is a response). I have hundreds of sites I'm working with, and it's tedious to go through each one by hand and eyeball whether there's a good input-output relationship.

So my question is: Is there a way to compare the impulse signal to the response signal to determine the "quality" of the relationship? That way I can start working with the "good" sites, and also try to characterize what makes a site good vs bad based on other factors. Is cross-correlation the way to look at it? Or is there a better way to look at this?


texts: Eigenvalues of a product of matrices with specific structures

texts:
I'm working on a multichannel feedback system with open-loop frequency response $\mathbf{A}(\omega) = \mathbf{B}(\omega)(\mathbf{C}(\omega)-\mathbf{D}(\omega))$.
The time-domain convolution matrices corresponding to the different frequency responses have the following characteristics:
$\mathbf{B}$ is a hollow matrix (i.e. a matrix with all zeros along the main diagonal), $\mathbf{C}$ is a dense matrix and $\mathbf{D}$ is a band matrix (not completely sure it can be qualified as such, see picture). All the matrices have a block Toeplitz structure are full rank. An example is the following, showing the three matrices and the resulting time-domain resulting matrix $\mathbf{A} = \mathbf{B}(\mathbf{C}-\mathbf{D})$:

I was wondering if, starting from such a structure, anything can be inferred about the eigenvalues of the matrix $\mathbf{A}(\omega)$, whose behaviour I want to study as they have an impact on the stability of the system. Specifically, I'd be interested in knowing if their moduli can be inferred to be positive.

Or do you think the information on the structure is irrelevant to be able to get the information I need on the eigenvalues?


texts: FIR filter design in matlab using Kaiser window (using 'fir1' and 'designfilt')

texts:
Here are the specs for FIR filter using Kaiser window.

Ap = 0.2   %Maximum Passband ripple
Aa = 20    %Minimum stopband attenuation
Wp1 = 500  %Lower passband edge
Wp2 = 1000 %Upper passband edge
Wa1 = 200  %Lower stopband edge
Wa2 = 1200 %Upper stopband edge
Ws = 3200  %Sampling frequency

I used two methods. designfilt function and kaiserord with fir

Code using designfilt

Ap = 0.2;   %Maximum Passband ripple
Aa = 20;    %Minimum stopband attenuation
Wp1 = 500;  %Lower passband edge
Wp2 = 1000; %Upper passband edge
Wa1 = 200;  %Lower stopband edge
Wa2 = 1200; %Upper stopband edge
Ws = 3200;  %Sampling frequency

fp1 = Wp1/(2*pi);
fp2 = Wp2/(2*pi);
fa1 = Wa1/(2*pi);
fa2 = Wa2/(2*pi);
fs = Ws/(2*pi);

bpFilt = designfilt('bandpassfir','PassbandFrequency1',fp1, ...
    'PassbandFrequency2',fp2, 'StopbandFrequency1',fa1, ...
    'StopbandFrequency2',fa2, 'SampleRate',fs, ...
    'PassbandRipple',Ap,'StopbandAttenuation1',Aa, 'StopbandAttenuation2',Aa,...
    'DesignMethod','kaiserwin');
h = fvtool(bpFilt);

filtord(bpFilt) %Order of the filter
[b,a]=tf(bpFilt);

Code using kaiserord with fir

fcuts = [fa1 fp1 fp2 fa2];  %Band edges
mags = [0 1 0];     %Desired amplitudes on bands defined by fcuts

deltaP = (10^(0.05*Ap)-1)/(10^(0.05*Ap)+1); %Passband ripple
deltaA = 10^(-0.05*Aa);  %Stopband ripple

errors = [deltaA deltaP deltaA];    %maximum allowable error in each frequency band

%Order n, frequency vector Wn, multiband magnitude type ftype, and the Kaiser window parameter beta
[n,Wn,beta,ftype] = kaiserord(fcuts,mags,errors,fs);

bpFilt = fir1(n,Wn,ftype,kaiser(n+1,beta),'noscale');   %length of window = filter order + 1

Problem is that coefficients in bpFiltfrom 2nd method are not the same as bin 1st.

Refer following:

Why is that happening?


texts:
I was wondering if anyone had run into the problem of trying to estimate errors in their signal processing on spectroscopic data. I know that many people use spectroscopic techniques to estimate concentrations of different materials, but I would like to know how accurate these measurements can be  (i.e. I would like to get an output something like "species A is 20% +-1% of the sample given").  Further, I would like to know how to deal with very extreme cases, where several different types of materials are present, and may have observables which fall directly on top of each other.

A simple example may be the following:

You can see there are two species being fit to the data. If the areas are then transformed by calculation into percentages, (i.e. the sample taken is 48% B, 52% A) how can we be sure of this and how accurate is the fit?   I know this will be dependent on the accuracy of the estimate of the positions of these peaks that are (perhaps) given by the user, so I am interested in a method that takes a known error in the parameters (say +-15 on the x axis for error in the peak center position, +-10 error in the width of the peak, etc.).

I suspect that the errors will become large when the observables overlap (i.e. the peak centers for two fitting functions are the same).

In addition, it is possible that these spectra have a large background, which may also have error, affecting all of the other species and their errors.  I am not certain if this background would be treated differently than all of the other species, or if it could be treated within the same algorithm as all of the other species.

To illustrate my point further, here is an image of a spectroscopic measurement of several different materials:

On the top in red is the raw data given by optical absorption (the measured data), while the black is a calculated background, and the blue is a calculated sum of all of the species including the background.

On the bottom, the calculated background is subtracted (blue and red lines now DO NOT include the calculated background), while the several different colored lines below are each individual species being summed up to create the blue line.

These are the calculated measurements I am interested in estimating the error in.

As you can see, the error is enormously large in this example for most of the calculated measurements. Each species may or may not have several 'peaks' associated with it, which can be illustrated by the bolded yellow calculated line.  In addition, you can see that several of the calculated peak centers fall around the same place, so this will likely reduce the certainty that the measurements are correct even if the calculated line falls directly upon the raw data.

I have calculated the mean squared displacement as a quick estimate of how good the fit is, but I know that this doesn't do anything to address any larger concerns of the actual calculated measurement uncertainty. The most I have really done in statistics is standard deviation and calculations dealing with several measurements, but this is quite different, since it deals with how sure you can be with only one measurement, not seeing differences in multiple measurements. Is there a way of using confidence intervals and confidence levels on non independent and identically distributed random variables?  (Again, I am very new to statistics and have never taken a course on it, so I apologize if this is elementary or trivial)


texts: Are there any efficient algorithm to detect circular shape of arbitrary size in an image?

texts:
I have images that are 1278 by 1024. They are pictures of a certain product that is rectangular in shape and are about 25mm by 20mm. As a part of a quality inspection process using computer vision, the goal is to detect contamination. The contamination are roughly circular in shape (caused by splattering of a certain material). Due to the special lighting, the contamination is seen as a roughly circular white area, surrounded by a green area (also circular, ring-like, concentric to the white area).

So basically it looks like a green donut, with a white 'hole'.

The goal is to detect such defect. However, the size of the contamination can vary. Furthermore, the size of the 'hole' can vary even if the outer diameter is the same.

I think I need to define a minimum and maximum size that I look for, and scan the image, but more advice and detail is needed.

Thanks


texts: Generalized Sidelobe Cancelling performance

texts:
I'm tinkering with different adaptive beam-forming algorithms for a research project in which I want to use a Uniform Rectangular microphones Array (URA) to isolate speech in a room.

I am determining the Direction of Arrival (DoA) using a camera in the center of an array, and reverse camera projection from a user input - ie the user clicks on the sound source on the camera's preview, and I reverse project the pixel to an azimuth/elevation angle.

Then I use this DoA as the steering angle for my beam-former, and listen to the result in my headphones. Conventional beam-forming, as expected, didn't give a satisfying SIR so I delved into adaptive algorithms (more specifically Linearly Constrained Minimal Variance - LCMV). With simulated audio from a virtual model of my microphone array, on Matlab, I compared Frost's algorithm and the Generalized Sidelobe Canceller.

I obtained better results with the latter, which to me doesn't make sense as these are basically 2 different implementations of the same algorithm - from what I could understand of the white paper.

Moreover, when doing real life testing, the result weren't even close to be as good as the simulation.

I can only think of 2 reasons for that :

Reverberation and noise, to which LCMV is sensitive
Bad DoA precision which causes signal leaking in the side-lobe canceller

I will soon build a test-bench to evaluate the precision of my DoA estimation, which will at least possibility eliminate one variable, but I think this is not the principal cause of bad performance...

So my questions are : what do you think causes this big discrepancy between simulation and real life? and would there be a way to improve it?

For now, I am thinking of using NMF at the output of the beam-formed audio to further separate the sources.


texts: Is any time-domain vector stored on a digital machine always intrinsically causal?

texts:
Reading up on causality, I understand the mathematical definition, in so far as that a causal system, is one where the output depends only on the current time, and possibly the past time, but never the future times.

I have also seen that we can 'make a (transfer) system causal' by 'shifting it in time by an appropriate amount'.

I do not necessarily understand the above statement, and would like to see a simple example of two of such a thing happening. (That is, plot it when its non-causal, and re-plot it when it is causal).

For example, if I have a length $N$ impulse response, stored in a vector on my machine, how does it 'know' that this is causal or non-causal? It seems as though the time-axis would always start at $n=0$, where the first point in my vector is.


texts: How can I plot the decrease in the average quadratic error Ei, with progressing iteration i in K-means algorithm in python?

texts:
I'm studying cluster analysis, more specifically K-means algorithm. I'm doing the code in python and using the sklearn.cluster. I am studying it with random normal generated data in the corners of the unit square. I want to describe the variation of the  average quadratic error with each progressing iteration as a function plot but I'm not being able to do this.
Thank you


texts: Is there anyway to find the frequency of DFT eigenvectors (basis) from its eigenvalues?

texts:
I've read this document which talks about the DFT. It describes that DFT bases are the eigenvectors of a circulant matrix. I know that every basis has a frequency in it, but I don't know what is it? And it there any relation between this frequency and eigenvalues? For example, one of the bases of DFT with $n$ points is as follow:
\begin{equation*}
F^{(k)} =
\begin{pmatrix}
w_n^{0k} \\
w_n^{1k}   \\
\vdots   \\
w_n^{(n-1)k}
\end{pmatrix}
\end{equation*}
\begin{equation*}
w_n^{jk} = e^{\frac{2\pi i}{n}jk}
\end{equation*}
and the eigenvalue related to this eigenvector($F^{(k)}$) is $\lambda_k = \sum_{j=0}^{n-1}c_jw_n^{jk}$, where $c_i$ is the $i$-th element of the first row of circulant matrix. What is the frequency of $F^{(k)}$? Is there any relation between this frequency and $\lambda_k$? Can we talk about the frequency based on the $\lambda_k$? Since $\lambda_k$ is related to the elements of this circulant matrix but the eigenvectors are not related, so can we define special circulant matrix that we can find the frequency from its eigenvalues?


texts:
If the difference equation that defines the DT system is,

$$z[n] = (1-x[n]) + (1-y[n]) $$

How can we determine in the system is LTI or not when:

$x[n]$ is the input
$y[n]$ is the input
both are inputs

Using the definitions is somewhat vague in this case, so I am lost how to explicitly explain that they are not linear and time invariant for 1 and 2 at least.


texts:
First of all I'm new to DSP so excuse my simplified words & I'm sorry if it's a duplicated question.

Now, I'm trying to filter a signal but as you all know, the filter step response overshoot the filtered signal at the beginning.

Here it's the signal. It begins with zeros then the signal comes up

Is there any accurate solution to remove this overshoot completely?

** And if there is references or any direct command in Matlab, I would be grateful to know it.**

Thanks in advance..


texts: How to detect the fuzzy edge in this image?

texts:
I am trying to process a lot of images of bacteria. As you can see from this image, when several bacterias are very close, the boundary tends to be very fuzzy.

I try to binary the image or detect the edge use canny operator.But the result is unsatisfying.

So is there a right way to distinguish every cell in this situation?I want both get the right count and position of every cell. Thanks to all of you.


texts:
In Audio Experts book, it's given as

  Sound pressure meters must be calibrated at factory to a standard acoustic volume.

So what doth this standard acoustic volume means?


texts: Synchronize device to audio stream - Approach

texts:
I am working on a device which's actions should be synchronized to the audio played. The audio stream is known in beforehand and can be altered to contain signals for the synchronization. But the device and the PC playing the music do not have any other connection but the audio.
The synchronization should be in the regime 100ms.

The transfer function between the device and the PC is not known and can vary. Especially the gain can vary. Thererfore an approach not to sensitive to overmodulation would be preferrabel, if such an approach exists.

The current signal in the audio-stream is a click noise. A crosscorrelation is working quite well on the original data, but the signal gets less clear when a transfer function is introduced. And vanishes for an overmodulated signal, while for the human ear the signal is still present.

What would be a suitable approach to synchronize the device to the audio stream?

EDIT: It is an acoustical link.


texts: Optimality of Kalman Filter for Process Noise dependent on magnitude of state

texts: Consider I have a dynamical system $\dot{x} = Ax + w(t)$, $x \in \mathbb{R^2}$  where $w(t)$ is a Gaussian random variable with mean $E(w(t)) = C\|x\|^2$ where $C \in R^2$ is a constant and covariance matrix $Q(t) \leq \begin{bmatrix} f_{1}(\|x\|^2) & 0 \\ 0 & f_{2}(\|x\|^2) \end{bmatrix} $ where $f_{1}$ and $f_{2}$ decrease as $\|x\|^2$ decreases. Also $A$ is a stable system matrix. Assume noisy measurements $y = Hx + v(t)$ ( $v$ is standard white noise with zero mean and known fixed covariance). The aim is to generate estimates of $x(t)$ using a Kalman Filter.How do I begin to analyze the theoretical implications of process noise of this nature ? Will the standard Kalman Filter "work" in this case ?


texts: Determining how similar a signal is to a sine wave

texts:
HeartMath Institute calculates a coherence score for heart rate variability by giving a score to how sinusoidal wave-like the instantaneous heart rate signal is.

http://store.heartmath.org/s.nl/ctype.KB/it.I/id.585/KB.623/.f

What DSP techniques can be used to calculate how sinusoidal a signal is, in a manner similar to score used above?


texts:
I can't understand sampling signal mathematically.

for example $x(t) = 2\cos(100\pi t) + \cos(300\pi t)$ and I know I should use sampling frequency $300\textrm{Hz}$ to sample this signal.

and after sampling, what is done?

How is $x(t)$ changed? and what frequency does sampled $x(t)$ have?


texts: Use of I/Q representation for unmodulated Rx Signal

texts:
it may be a stupid question but while learning about DSP and Modulation I was wondering, if the I/Q representation of an RF Signal is of any use, when the received signal does not contain any modulation.
So I understand the concepts of Inphase and Quadrature components, how they are modulated in the sender, combined for transmission and demodulated in the receiver. But if i where to receive some other signal, lets say for example RF-emissions from some random or physical source i want to observe. Does the separation into I- and Q components yield any value then? Since it has never been composed to hold information by the source. Or would there still be a value in having I- and Q components?
I couldnt find any explicit statement on that yet.
Cheers
Lucas


texts: how to solve the sampling rate conversion problem

texts:
I am trying to improve my DSP knowledge and this problem is too much for me. I am trying to solve following task:

this is not a homework. any help will be appreciated.


texts: Non coherent detection BFSK demodulation?

texts:
I am simulating BER performance of BFSK under AWGN and Rayleigh fading, BFSK has two symbols one entirely on the real plane while other on the complex plane for representing let's say zero and one, that is how the constellation of BFSK looks like.

s=data + j*(~data); %Baseband BFSK modulation

Now let's say we added AWGN (N) and Rayleigh fading (h) as well.

Rx= h*x + N;

Now when I tried to detect it on the receiving side I will have to divide this entire Rx by an h, well that makes sense.

My entire graphs for the BER curve match non-coherent detection for FSK.

It exactly matched the theory, Eb/N0 vs. BER for BFSK over Rayleigh Channel.

How to do the same for Non-coherent detection?

If I do not divide Rx by h, Rx/h, I get a few very very bad results and that doesn't match anything. Theory tells us that In non-coherent detection, there's no prioir knowledge about the channel impulse response at the receiver.

In coherent systems, the receiver needs phase information of the transmitter (the carrier phase) to recover the transmitted data at the receiver side. I haven't used any such thing but still simulation results for BER matched with that of theory for Coherent FSK.

Can someone here help me with this?

By not diving by h, will I get better results for Non coherent FSK?
Whether BPSK or BFSK every time we need to divide h*x + N by an h to  get results that match theory.


texts:
Let a sensor (e.g. accelerometer) with a combination of white gaussian noise and random walk noise.
The loglog plot that is usually shown as function of a time parameter, affine decreasing for a white gaussian noise and affine increasing for a random walk.
What does it mean?
Can we read from the graph the variance of the gaussian noise?
I cannot really grasp the intuition behind it: how does the Allan variance help to get more information about the noise than a PSD or some cross-correlation?


texts:
I saw a code in Python in the scipy.org (http://docs.scipy.org/doc/scipy-dev/reference/tutorial/fftpack.html) and found this:

First question: Is it right that T = 1/800 <==> fs = 800 Hz fulfill the condition fs = 2*fmax, because the maximum frequency of the funtion contains 80 Hz?
Second question is in the row: xf = np.linspace(0.0,1.0/(2.0*T), N/2):
I have often seen that people use the nyquist freqency in the x-axis for the the freqencies spectrum why is that so?
And if I ignore the (1/2 * 1/T) and N/2 and write in my code for
xf = np.linspace(0.0, 1.0/T, N)   instead of np.linspace(0.0, 1.0/(2.0*T), N/2) so I get a graph like this

Why do I get here a mirroring at the 400 Hz? Does it something to do with the symmetries of the fft?
I appreiate it if someone can help me to explain my question, thx alot!


texts: Am I understanding the phase angle from FFT correctly?

texts:
Long story short, I have a sinusoidal wave with DC offset going in with a given frequency of say 100 Hz and $\phi = 0$ (which I'm guessing is really $\pi/2$ since it is a sine wave not cosine). I get an output of the same frequency and, using FFT, I would like to find the phase between these two. What I did is I found the peak frequencies (-100 and 100 Hz), found their bin and from the same bin I extracted the amplitude and the phase.

Is that correct?


texts: modified Bessel function for Speech enhancement Using MMSE in matlab

texts:
I am trying to implement an algorithm proposed in an old research paper by Ephraim and Malah for my DSP course project. I hope someone can help me with this difficult question. For the clean signal Amplitude Estimator, they used the following equation:

I understand most of the variables in the equation except the Bessel function stuff. Why did they use a Bessel function in here?
and most importantly, how can I implement it in Matlab?


texts: How is the symbol error rate for M-QAM, 4QAM,16QAM and 32QAM derived?

texts: How do you derive the theoretical symbol error rate as a function of $E_\mathrm{b}/N_0$ for 4QAM? I know that the result should be $Q\left(\sqrt{2E_\mathrm{b}/N_0}\right)$ but I am ĺooking for the derivation. Also, what are the symbol error rates vs $E_\mathrm{b}/N_0$ for 16QAM and 32QAM?


texts: Noise power transient at output of RC filter

texts:
Consider a simple first-order RC filter with AWGN input noise with single-sided density of No. We know the output noise power is No/(4RC). What is rarely noted is that this is true after steady-state has been reached. I simulated the noise from such a filter starting from rest at t=0 and found that the ensemble average of the instantaneous noise power seems to increase from 0 to No/(4RC) exponentially with a time constant of RC/2, not the circuit time constant of RC.
Can anyone derive the equation for this?

Just to clarify this is input noise that is switched on by a unit-step at t=0 at the input to the filter.
So I am guessing the usual analysis based on the assumption of stationarity probably does not apply.

Thanks,
John


texts: Convolution of spectra to sensor response function?

texts:
I am really sorry if it is wrong place to ask this question but i couldn't not find any stackexchange website appropriate.
i have some reflectance values of a material which are measured in 10.5 and 12.5 micrometers interval. This spectra is extracted from a spectral library. Then by using Kirchhoff's Radiation Law i calculated the emissivity values in each wavelength.

The problem is that, Here is the spectral response of Landsat5 TM thermal band. --> http://atmcorr.gsfc.nasa.gov/L5_handbook.rsp
I have to convolve these emissivities to the spectral response above. Bu i dont have any idea. How can i do it?

Thanks alot for your helps

I found the solution after searching in articles,
Here is the convolution =
$$e_{i} = \frac{\int_{\lambda =\lambda _{1}}^{\lambda _{2}}f_{i}\varepsilon \left ( \lambda  \right )\partial\lambda }{\int_{\lambda =\lambda _{1}}^{\lambda _{2}}f_{i}\partial\lambda}$$
Where i = channel  number, $\lambda$ is wavelength, $\varepsilon \left ( \lambda  \right )$ spectral emissivity optained from spectral library, $f_{i}$ sensors spectral function and $e_{i}$ is channel emissivity that we want to find. $\lambda _{1}$ and $\lambda _{2}$ are upper and lower bounds of thermal band.