texts: How to use Mikolajczyk evaluation for detectors/descriptors?

texts:
I want to compare different detectors/descriptors (both binaries and not) for my application and I want to use the Mikolajczyk evaluation framework, which is became a standard in the community about this kind of evaluation.

The region input format must be of the form:

%descriptor_size
%nbr_of_regions
%x1 y1 a1 b1 c1 d1 d2 d3 ...
%x2 y2 a2 b2 c2 d1 d2 d3 ...
%....
%....
%---------------------
%x, y - center coordinates
%a, b, c - ellipse parameters ax^2+2bxy+cy^2=1
%d1 d2 d3 ... - descriptor invariants
%if descriptor_size<=1 the descriptor is ignored

(I'll use it later)

Anyway, I find quite difficult to use it from OpenCV since I didn't find any example/tutorial where it is used, so I have some questions:

There is any example/tutorial where it is used from OpenCV to matlab? Could you provide one otherwise?
This framework can be used also for binary detectors/descriptors?
There is any equivalent tool in OpenCV?
Is it correct to say that when we want to evaluate a detector we set descriptor_size=1 while we set descriptor_size=128 when we want to evaluate SIFT's descriptor (for example)?


texts:
For plotting a Power Spectral Density graph based on FFT results,
I had used two different approaches, but they produced very different results, and it'd be great if anyone knows why.

Note: From this point on, $N$ is assumed to be the total number of data samples, $f_s$ is assumed to be the sampling frequency.

APPROACH #1:

(from here: www.mathworks.com/help/signal/ref/periodogram.html    )
$$PSD(f) = \frac{\Delta t}{N} \left| \sum_{n = 0}^{n = N-1} x_n e^{-i2 \pi fn}\right|^2$$

of which I assume the $\Delta t$ to be the same as $1/f_s$, with it being multipled by 2 for most cases (one sided periodogram). So the idea was implemented as:
$$PSD(f) \cong \frac{2}{f_s N} \left| FFT(x_n)  \right|^2 $$

Note: As per one of the responses, APPROACH #1 would've been more accurately interpreted as
$$PSD(f) \cong \frac{1}{f_s} \left| FFT(x_n)  \right|^2 $$

APPROACH #2:

(from here: http://www.bitweenie.com/listings/power-spectral-density-matlab/)
$$PSD(f) = 20 \log_{10} \left( \frac{|FFT(x_n)|}{\sqrt{N f_s}}\right) + 30$$

This approach was implemented with no interpretative modifications.

RESULTS:

Using approach #1, my results looked like a typical FFT, while approach #2 produced the expected log-scale result.

QUESTION:

However, the approach #1 from MATLAB seems like the more commonly-accepted way to do the periodogram PSD.
Is there a fault somewhere in the interpretation of this approach to cause the discrepancy in results?


texts:
I have found an implementation of the Goertzel algorithm that contains code that I don't understand. And more specifically the pre-calculation of coefficients.

At the top of the code there is :

#define DTMF_697Hz  27980
#define DTMF_770Hz  26956
#define DTMF_852Hz  25701
#define DTMF_941Hz  24219

These defines are used inside the goertzel calculation like such :

for (i = 0; i < N; i++)
{
  v0 = ((cos_fact * v1) >> 14) - v2 + *x;
  x++;
  v2 = v1;
  v1 = v0;
}

x is my buffer.

v0, v1 and v2 are long int

cos_fact is the one of defines I showed above and passed as a function parameter.

My questions would be: What do these define correspond to? How to pre-calculate them for other frequencies? Is it normal that the values are so far apart?

ps: This code is part of ampm_open_lib and my goal would be to use it for detecting other frequencies than DTMFs tones.

EDIT:

Following the answer of Peter K. Here is a little C program that output the desired values.

#include        <stdio.h>
#include        <stdlib.h>
#include        <math.h>

#define         TAB     {697.0f, 770.0f, 852.0f, 941.0f, 1209.0f, 1336.0f, 1477.0f, 1633.0f}
#define         LEN     8

int             main(int ac, char **av)
{
  float         tab[LEN] = TAB;
  float         sr;

  if (ac >= 1)
    printf("Usage: ./a.out sample_rate\n");
  else
    sr = atof(av[1]);

  if (sr > 0)
    {
      printf("+-----------------------+-----------------------+\n");
      float coef = 0;
      for (unsigned int i = 0; i < LEN; i++)
        {
          coef = cos(2.0f * 3.14159f * (tab[i] / sr)) * 256 * 128;
          printf("|     %f      |       %f      |\n", tab[i], coef);
          printf("+-----------------------+-----------------------+\n");
        }
    }
  else
    {
      printf("You cannot use a sample rate that is smaller or equal to 0\n");
      exit (0);
    }

}

You can use it like this:

gcc yourFile.c -lm && ./a.out 8000

Thanks for the help.


texts: How can I calculate the height at which the mobile phone is located?

texts:
I need to calculate Hm - the height at which the mobile phone is located.
For calculating I can use:

Hb - the BTS height, m
L - the rssi-parameter, dB,
f - frequency, MHz.
When I use an Okuruma-Hata model's expression , I get abnormal data.

May be you know any other expressions for calculating the height at which the mobile phone is located?


texts: Separation of signals without loss of information about the signals themselves

texts:
There is a signal that contains:

Rectangular pulses on frequency of 1 kHz
Rectangular pulses on frequency of 1.4 kHz
Other noises.

Required:

Separate 1kHz pulses from everything else and measure their amplitude and duration
Separate 1.4kHz pulses from everything else and measure their amplitude and duration

Was tried:

Use a positive IIR filter of the 6th order (at a frequency of 1kHz and at a frequency of 1.4kHz). After the filter, information about the initial amplitude and duration was completely lost.
Use comb filter. The output signal is smeared due to the mismatch of the input signal period and the filter period.
Searching and asking a question in my native language (Russian) did not help. I did not find any examples. The only possible solution proposed was the use of correlation analysis. But I could not work out, how to use it for solving my problem, again there was not a single explanation or example.

P.S. I’ve already asked this question, but maybe I wrote something that is not clear (I am not a native speaker of English), please ask, I will try to explain more clearly. I have one last hope on the international site that someone has faced this problem and will be able to share a solution or explain how to solve it. Thank you very much in advance!

P.S.S

  why do you want to filter? your signals look clean

In that question, the picture was just for example. In this question, the picture looks like my real signal.

  Yeah, classical XY problem: You're asking a strange question (you want to filter, but you want to have none of the effects of filtering?) without telling us why you want to do it, for what purpose, in what greater context.

In this thread, I tried to describe in more detail what I want.

  If I understand correctly and you want a system that picks some pulses and rejects others based on their fundamental period: a filter is not going to do it, at least not by itself.

I need to separate the 1 kHz pulses from everything else and measure their amplitude and duration, and then separate the 1.4 kHz pulses from everything else and measure their amplitude and duration.

  Does the amplitude stay constant for the duration of the pulse groups? Do you have a subset of possible pulse groups: number of pulses at the 1.4 KHz rate, number of pulses at the 1KHz rate? Please provide all info in terms of what these pulses are doing and why you are doing this may also help answer those questions you may not be sure how to ask. The sentence "at certain points in time it can change by 200 us..." was particularly confusing- what is "It", the duration? What does it mean for the duration to change by 200 us, increase to 300 us?

No, the amplitude can vary. I tried to describe everything in more detail in this topic.

  Do the pulses add (i.e., if a 1.4kHz pulse and a 1kHz pulse land on top of each other is the result the sum of the pulse heights)? Do you have to catch each and every pulse, or can you miss some?

Yes, when they fall on each other it will be the sum of the heights. The signal above shows this. In the ideal case, I would like to catch every impulse, but in fact you can also skip.


texts: Why Convolution between Signal and a Channel Is Not Done Directly in SIMO Channel

texts:
In OFDM system, I need to transmit a signal $x$ in SIMO channel $H$ with one $Tx$ antenna and 4 $Rx$ receiver's antennas. The initial equation for that convolution is $r=Hx+n$ where $n$ is the noise. $r$ is the received signal, $x$ is the transmitted signal, and $H$ is a toeplitz matrix as built in below code.

The question, When I created the toeplitz matrix $H$, the dimensions of  transmitted signal $x$ and toeplitz matrix $H$ are not equal,  so we are unable to do the multiplication!. I checked online, I got, before processing that multiplication, I should do two steps. first get $x1$ and then $x2$ as in below code.  the $x2$ is the flip of $x1$, is theoretically known, but what's the benefit of getting the $x1$ ?

EDIT:
Regaring the dimension of toeplitz matrix $H$, is as below:
if we have the length of signal $Q$, the length of channel $M$, the number of received antenna $p$. So, the dimension of toeplitz matrix will be (Q*p x Q+M)

thnx


texts: Backward finite difference differentiation filter frequency response

texts: As title says what would be frequency response of backward finite difference differential filter, or what would be error of this differential filter, analyzed upon frequency of a signal?


texts:
I have a set of 512 samples that I have collected with a sensor. I'd like to apply zero padding to it, for better frequency bin resolution. However, all the tutorials I see to make this occur center around the idea that your wave is localized around zero. Here is an example:

Adding 10,000 zeros to the end of this signal seems logical to me.

However, say that the Y values on the above graph are shifted 5,000 points.

In that case, would you still add 10,000 zeros to the end of the singal?

Or, would you average out your signal ( find the median ), and use that as the padding? Given that the Y coordinates shifted 5,000 points, then we might be adding 10,000 pads of 5,005.


texts:
I want to do one threshold method on high pass components of a wavelet frame decomposition approch,for edge detection in image. I have 14 high pass components.

for thresholding, I need keep the lowest 50% of the coefficients in absolute value of the high pass parts or in other words keep only the lowest 50% largest coefficients.I examine otsu and Hysteresis thresholding, but I can't find all edges. I also wrote one  matlab code, that does for each high pass part:

% x1 and x2 are largest pixel value of each of high pass parts}
% there is negative and positive pixels in high pass parts

function Xt=Threshold(X,x1,x2)

[m,n]=size(X);
Xt=zeros(m,n);
for k=1:m
    for l=1:n
        if(X(k,l)> min(min(X)) && X(k,l)< x1 && mod(X(k,l),2)~=0)
            Xt(k,l)=1;
        elseif(X(k,l)> x2  && X(k,l)< max(max(X)) && mod(X(k,l),2)==0)
            Xt(k,l)=1;
        end
    end
end


texts: Where does the "Desired Response" come from in a Wiener filter?

texts:
I'm confused right off the bat in the introduction to Wiener filters, because how can you know what the "Desired response" is? Where does it come from? And if you know it already, then why build a filter to process an input signal in the first place? Can you provide an example of a typical input $u(n)$ and desired response $d(n)$ (such that that the error $e(n) = d(n) - y(n))$?

I'm reading Haykin's Adaptive Filter Theory, start of Chapter 2.

$u(n)$ = filter input
$y(n)$ = linear filter output
$d(n)$ = desired signal
$e(n)$ = error signal: $d(n) - y(n)$

thanks,
js.


texts: GnuRadio CC Decoder or How to use FEC Extended Decoder

texts:
I am currently trying to recover a satellite signal, encoded following CCSDS standards. This includes a convolutional code with rate 1/2 and constraint length 7.
I am receiving the signal through an SDR directly connected to the sender using coax cables and some attenuation in-between. For testing purposes, I am sending 0 and 1 alternating. For demodulation and decoding, I am currently using the graph attached to this post.
Up until the convolutional decoder, everything seems to work without problems. When deactivating the code both on the sender and receiver, I can decode the data without any problems. When the convolutional code is active, the decoder sometimes is able to decode the data properly, but most of the time, the output just contains garbage.
I therefore wonder, am I using the decoder block in a wrong way? Documentation about how to properly use this block is hard to find. I already tried different settings for the decoder definition but so far nothing helped.
Can anyone help me with this?
Kind regards
valkyrie


texts: Zero order hold interpolation and Nearest-neighbor interpolation?

texts:
Is there any difference between Zero order hold interpolation and Nearest-neighbor interpolation
I want to perform zero order hold interpolation in MATLAB,but there isn't any information about zero order hold in the description available on MATLAB help page link below,also shown in attached snapshot
So ,in MATLAB,if we want to implement Zero order hold interpolation,can we use the method"Nearest-neighbor"?
https://www.mathworks.com/help/matlab/ref/interp1.html#btwp6lt-1-method


texts: Tracking a Predefined Curve in a Series of Images

texts:
I have a series of images. I want to be able to draw a curve on the image and track the curve in the series. For example, in the figure below, the left image illustrates the original image at time 0 and the one on the right is the curve I want to track in the next images in later times $t>0$. In fact, the edges that are marked as red change with time. In other words, the region, whose a portion of its boundary is shown in the figure, gets enlarged and shrunken in the subsequent images and I want to be able to track this.

Could someone kindly introduce me to one of the methods that is used to track a predefined curves according to the movement of the boundary which is the closest to it?


texts:
Determine whether the system $h(n)=nu(n)$ is BIBO stable or not.

I have solved it and got it as unstable as $\displaystyle\sum_{n=-\infty}^\infty \lvert h(n)\rvert = \infty$. But the book ¹ is saying stable:

Which one is correct?

¹: S. Poornachandra, B. Sasikala: Digital Signal Processing. Third Ed. McGraw Hill, New Delhi


texts:
I want to estimate depth from live video stream with two calibrated webcams in MATLAB but has no results. I have Webcam Support Package and Image Acquisition Toolbox but I don't know how to use live video stream via stereo calibrated webcams against recorded video file. In this post depth is estimated with two recorded video files.

How can I estimate depth in live video stream?


texts: What does it mean that the normalized power of a received equals one?

texts: I have read in that lecture, page 2, here that,  the symbols are independent, and normalized to have power 1, which means $E(x x^H) = I$ .. what does that mean? could you please explain that for me?


texts: Is it appropriate to use Sobel operators to find the derivatives of an image?

texts:
Strictly speaking, the $x$ direction derivative should be the difference between the left and right pixel of each pixel. So, then I should be using a $1\times 3$ filter:

\begin{bmatrix}-1&0&1\end{bmatrix}

If that is so, why is the Sobel operator a $3\times 3$?
\begin{bmatrix}-1&0&1\\-2&0&2\\-1&0&1\end{bmatrix}

Is it so that the approximation of the derivative is less susceptible to noise?


texts:
I'm a french student in engineering and I'm given a kind of mandatory technical project to work out on until February.

I must investigate the following article : https://www.osapublishing.org/DirectPDFAccess/C41EF419-AD7D-EDF3-A173E8B93A0B610C_350066/oe-24-19-22110.pdf?da=1&id=350066&seq=0&mobile=no and implement the same kind of iterative algorithm on MATLAB.

Actually I'm not good at signal processing either that much, only have the basics, however I don't understand why they say "the inherent frequency interval limit (of fFT) can be overcome using discrete Fourier transform". In my opinion that is non-sense because fFT is basically just the same as dFT, you just have to sum the sampled values an other way with their odd and even indexes. Therefore I don't really understand what do they apply dFT for...

If someone could help me please he would be more than welcome !

Thank you


texts: Could modulation/coding schemes be generated from an AI?

texts:
Warning: I'm a bit of a noob with respect to this entire field, but I took some classes on it (a few years ago) and found it fascinating.

Anyhow, as far as I understand it, modulation is the process of converting data to a signal, using quite a fair bit of creativity in the process. For example QPSK can be presented in the complex domain in the following way:

Timing diagram for π/4-QPSK. The binary data stream is shown beneath the time axis. The two signal components with their bit assignments are shown the top and the total, combined signal at the bottom. Note that successive symbols are taken alternately from the two constellations, starting with the "blue" one. (from wikipedia)

The resulting signal is also very confusing:

Timing diagram for π/4-QPSK. The binary data stream is shown beneath the time axis. The two signal components with their bit assignments are shown the top and the total, combined signal at the bottom. Note that successive symbols are taken alternately from the two constellations, starting with the "blue" one. (from wikipedia)

The actual question

Could an AI be used to generate better modulation/coding schemes? Perhaps kind of like the following AI "learned" to walk: https://www.youtube.com/watch?v=gn4nRCC9TwQ, we could create a "game" (really an advanced physics simulation) in which the AI has to modulate and demodulate a signal and try to achieve a very high data rate while keeping bit errors as low as possible in different conditions. These new standards would probably be even harder to explain to humans but more efficient.

Any help is welcome:

Has this already been done?
Has there been any research on this? If yes, how much more efficient could generated processes be?
Is this not possible yet because it would be complicated to create transmitters and receivers for the process?


texts: Channel model: LOS Component and Rician K-factor

texts:
I am asking about Rician K- Factor in this model:

I know that if $K=0$  then it is a pure Rayleigh fading, if $K= \infty$, then non fading Channel.

What is it, if $0<K<\infty$ ?

If i represet the NLOS component using the Kronecker model and take expected value from $\mathbf{H}$, then I get only loscomponent. Will be it right?


texts: What is the Concept of MATLAB Function Polynomial Interpolation?

texts:
I am curious about MATLAB function.
Can you tell me why does not it do good approach to using of MATLAB function except for speed reason?

Is there any other reason to using polynomial utility?


texts:
Paper describes that a 2D signal(say video) can be projected to 1D for time series analysis by using a transformation function fx=Ax+constant and fy=Ay+constant where Ax , Ay represents the (x,y) coordinates of a single trajectory A. Then,these fx vs t can be plotted and various analysis can be performed. Going by their justification,is it logical to think that a coordinate position of an object can only be described by a single coordinate when doing time series analysis and signal compression?

Also,they mention about taking cartesian product.Why is that?


texts: Constraints for Type 3 Linear Phase Filter

texts:
This might be a strange question - but most of the Type 3 LPF I'm seeing are having this in common for $h[n]$, assuming $h[n]$ is real:

We cannot have outermost element of h[n] lower than middle elements
(or) Have middle element lower than outermost elements.

Eg: if filter coefficients are $[3,2,1,0,-1,-2,-3]$, it there any restriction for a type $3$ filter to not have $[1,2,3,0,-3,-2,-1]$ as a possible LPF $h[n]$?

(Please excuse my ignorance if this is a basic question - I'm quite new FIR Filter design). And I've gone through quite a few design docs before asking this question - none of them mention this, so I'm guessing this is not a req? Yet the diagrams seem to indicate this, hence the question...


texts: Melodic or tonal pitch contour tracking?

texts: What algorithms or methods can be used for the tracking of audio pitch contours?  (Such as in musical vibrato and glissando, or for tonal vowels in languages such as Chinese?). Will a PLL work even for pitched tones that have a weak or missing fundamental?  Or is there a more suitable tracking method?


texts:
I am having troubles applying the IFFT function to some data I have. I already had a look here Complex conjugate and IFFT and here What assumptions should be used to invert spectrum into time domain data? but it still does not work.

This is the code:

% amplitude: data related to the signal amplitude
% phase: data related to the signal phase
% freq: frequencies (from 5 to 100 Hz)

response = complex(amplitude,phase);

NFFT = length(response); % odd number
symmetric = zeros(NFFT,1);

for i = 1:NFFT
symmetric(i) = conj(response(mod(NFFT-i+1,NFFT)+1));
end

response_tot = [response; symmetric];

% Plot simmetry
response_tot = fftshift(response_tot);
f_plot = 100*(-NFFT:(NFFT-1))/NFFT;
figure()
plot(f_plot,response_tot)

% Time signal
time_sig = ifft(ifftshift(response_tot));

fs = 2*max_f; % twice the max frequency in the signal
t_plot = 0:1/fs:NFFT/fs; % time vector to plot the time response

figure()
plot(t_plot,time_sig(1:NFFT+1))

Is this the right way to prepare the data for the ifft?

Because the output does not look right to me.


texts: Ideal Geometric Arrangement of Microphone Array

texts:
I'm going to have to give a bit of context for this question to make sense.

I am working on a project which includes audio source localisation in 3-D space through TDoA (Time Difference of Arrival - from here called $\tau_{ij}$, between sensor $i$ and $j$) measurements. In other words I have $m$ sensors that each have a slightly different recording of the audio event. Via cross-correlation methods I can estimate the TDoA (or delay) between each pair of sensors.

With each pair of sensors, $i$ and $j$, we can point to the source position through the following optimization problem:

$$\delta_{ij} = v \tau_{ij}$$
$$h(P_{E},P_{i},P_{j}) = \|P_i - P_E\|_2 - \|P_j - P_E\|_2$$
$$P_E^* = {arg\,min}_{P_E}\sum\limits_{i \neq j}\left(\delta_{ij}-h(P_{E},P_{i},P_{j})\right)^2$$
where $v$ is the speed of sound in the selected medium (consider it ideally constant), $P_E^* = (x_E,y_E,z_E)$ is the source position estimate (after optimization), while $P_i = (x_i,y_i,z_i)$ and $P_j = (x_j,y_j,z_j)$ are the sensor positions.

Note the first two equations. The first one is the distance between the two sensors, calculated from the TDoA estimate. The second one is a hyperbolic surface (see image below, in a 2-D example) that also represents the distance between the sensors. One way to see this is noting (suppose perfect measurements):

$$\|P_i - P_E\|_2 - \|P_j - P_E\| = v \tau_{iE} - v \tau_{jE} = v (\tau_{iE} - \tau_{jE}) = \delta_{ij}$$

In other words, each pair of sensors generate a different hyperbolic surface. We then try find the position by minimizing the function (third equation), by varying $P_E$. For sure there will always be a $P_E$ where $\delta_{ij} = h(P_E,P_i,P_j)$, but it won't necessarily nullify the same equation for different $i$ and $j$. Therefore optimization is necessary.

In a simpler 2-D example, the hyperbolic curves above represent points where the TDoA between two sensors is constant.

Finally, my question is:
What is the best geometric arrangement of the $m$ sensors in 3-D space, so that measurements are as precise as possible? For example, a line of sensors is  probably not a good idea as the the hyperbolic curves will be parallel to each other.


texts:
I'm trying to summarize the frequency domain information of an electrical signal as a feature engineering step for a machine learning algorithm. My hypothesis is that an anomaly will appear in the power signal as harmonics and spikes that can be detected in the frequency domain.

I've used MFCC in the past for audio features, but since this signal belongs to a different domain I think that Mel Scale would not be a good choice for this task.

Are there any alternatives to MFCCs on different scales? I guess even a linear scale would be better as a naive first approach.

Or perhaps there are other transformations/methods better suited to summarize the frequency content of my signal.


texts:
I need for an algorithm which do steps, displayed on image below.
Are solutions for doing this exist? (Preferably on C# or JavaScript).


texts: what is the starting point of a contour as given by cvConvexityDefect() function in OpenCV

texts:
i have to distinguish between palm and elbow in my contour(I'm using cvconvexitydefect for that purpose). Here's the image:

I'm taking contour of left image.

the 2 topmost points in right image are shoulder(detected by other method)

bottom left 2 are darker than bottom right 2 (to distinguish between left and right hand)

using the code defect.start is darker than defect.end(but for left hand defect.start is palm while for right hand defect.start is elbow)

I have 2 questions:

So how does cvconvexity defect get it's defect.start?
In any case how to differentiate palm from elbow?

To be clear i thought that i could make out the palm from elbow just by thinking that start might be upper most point of a contour or leftmost point of that but it ain't so.

here's the relevant part of code:

cvFindContours( HeadLess1, mem, &contours, sizeof(CvContour), CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, cvPoint(0,0));

for(ptr=contours;ptr!=0;ptr=ptr->h_next){
    tem=cvConvexHull2(ptr,0,1,0);
    tem=cvConvexityDefects(ptr,tem,mem);
    CvConvexityDefect defect,cd;
    defect.depth=0;

    for(int l=0;l<tem->total;l++){
        cd=*(CvConvexityDefect*)cvGetSeqElem(tem,l);
        if(cd.depth>defect.depth)defect=cd;
    }

    if((*(defect.start)).y>(*(defect.end)).y){
        elbow=(*(defect.start));palm=(*(defect.end));
        //a bad inference for the case when palm is above elbow
    } else {
        elbow=(*(defect.end));palm=(*(defect.start));
        //a bad inference same case
    }

    if(elbow.x<320)
    {
        q=100;
    }
    else
    {
        q=200;
    }

    cvCircle(HeadLess1,*(defect.start),10,cvScalarAll(q),CV_FILLED);
    cvCircle(HeadLess1, *(defect.end), 10, cvScalarAll(q+50), CV_FILLED);

}

Headless1 one is my image. Thanks in advance.


texts:
I'm trying to write a program using MATLAB that samples and recovers a given signal with different sampling frequencies

The given signal is $x(t) = \sin (2\pi 200 t)$ and sampling frequencies are $200$,$300$,$400$ and $500$ Hz.

I used sinc interpolation formula.

It is not working,and I would like to know why.

Can you help me?

The code is:

 f=200;
 fs=[200,300,400,500]; % sampling frequencies
for i = 1:length(fs)

 Ts = 1/fs(i); % Sampling Period
 t = 0:1e-4:6/f; % time vector for continous plot
 w = f*2*pi;
 xa = sin(w*t); % signal in continuous form

 t2=(0:Ts:6/f);  % time vector for sampling
 xb = sin(w*t2); % sampled signal

 figure
 subplot(311);
 plot(t,xa) % continous signal plot
 str = ['Signal x(t) = (' num2str(f) ' Hz)', ', Fs = ' num2str(fs(i)) ' Hz'];
 title(str);
 ylabel('Amplitude');
 xlabel('Time(s)');

 subplot(312);

 stem(t2,xb); % sampled signal plot
 title('Sampled signal');
 ylabel('Amplitude')
 xlabel('Samples');

 xr = zeros(length(t));
 for k=1:length(t)
 for p=1:length(xb)
 xr(k)=xr(k) + xb(p)*sinc(fs(i)*(k-t2(p)));
 end
 end
 subplot(313);
 plot(t,xr);
 title('Recovered signal');
 ylabel('Amplitude');
 xlabel('Time(s)');
end


texts:
I try to code up an algorithm from a scientific paper where they solve a differential equation using Fourier transforms. In the paper, they use the FT convention $\rho(x_i) = \sum_{k=-m}^m r_k e^{i2\pi kx_i} $, where $x_i$ is the ith data point.

Numpy uses the convention described in the  fft routine documentation.

Both of these should be completely equivalent (the negative $k$ in one convention correspond to the highest $k$ in the other convention).

Now, in the paper they frequently multiply $r_k$ with a function that depends on this $k$, i.e. $r_k f(k)$.
This should be the same as if I wrote $A_k\cdot f(k)$ in Numpy's convention. And the $A_k$ are simply given by A[k] if A=numpy.fft(ρ, N).
Is this correct?

I was confused by the statement

  and A[n/2+1:] contains the negative-frequency terms

But this simply refers back to the other convention and should not change anything in the way I calculate $A_k\cdot f(k)$, shouldn't it?


texts: How does a wavelet help in image compression?

texts:
I understand how the discrete cosine transform is used in image compression in standards like JPEG. However, the concept of wavelets is a mystery to me. I do know that wavelets are functions that have a wave like functions with value >0 only for short intervals of time, then they vanish. That is why they are called wavelets. I do not know anymore

What is not clear to me is precisely how such functions help in image compression and achieve a higher compression rate than our other transforms like the cosine transform.

What is the best place to learn this?


texts: How to tell if a high-res flac file has been upsampled from a CD-quality file?

texts: Because I might encode my music in lossy format for other devices or edit them, I prefer to keep a high-res copy of my music. However, I know that it is possible to upsample a file using ffmpeg and it would appear the same as an authentic high-res file with ffprobe. Is there anyway I can tell apart a "fake" high-res file (converted from CD-quality or mp3/aac) apart from a "real" high-res file (exported high-res by the producer)?


texts:
in regular discrete-time (1 dimensional) kalman filter, it is assumed that we have white gaussian noise affecting the transitions and the observations:

$x(t+1) = Ax + w$

$y(t) = Cx(t) + v$

assuming $w$ follows Gaussian(0, $\sigma_1$) and $v$ follows Gaussian(0, $\sigma_2$) distributions.

will the standard kalman filter not work or not be optimal if the gaussian noise variables are time varying, meaning $w$ and $v$ become $w(t)$ and $v(t)$ and somehow change with time, becoming systematically bigger or smaller?
related: the kalman filter generally has the behavior that its variance is decreasing with time. will that be true even if $w(t)$ and $v(t)$ are are time-varying even if they are assumed not to be? will the kalman filter's variance still get smaller even if the data are sampled from time-varying noise process?


texts: Books about signal processing with a biology or health basis

texts:
I've already seen this and this questions about books and references, but all of them are directed for someone who has a background in engineering or a related field.

Are there any good introduction books or other references for someone with a biology or health basis?


texts: Is there a strategy for discrete control of a system with dynamics near sample rate?

texts:
I'm trying to control a system where the controller sample rate is physically fixed and the plant has significant dynamics on the same order as the sample rate. I understand that one would prefer to have the sample rate considerably faster than the plant dynamics, but the physics of this system are such that this is inherently impossible. I can get some control of the system by hand-tuning a PID, but it seems considerably sub-optimal.

Is there a strategy for developing a controller like this?

Edit: I should add that the plant is this situation is a relatively complex LTI plant with reverberations caused by pure time delays. The delay cycles are a bit slower than the Nyquist frequency. The plant is stable.


texts: Are there any open source biomedical signal processing projects?

texts:
I'm in a biomedical engineering master's program and am mostly interested in signal processing. Unfortunately, I feel that I'd like to get deeper into the subject, and my university can't accommodate that request -- there's a limited number of courses, and the professor I've asked doesn't know of any local project that I could join.

Are there any open source projects related to biomedical/bioelectric signal processing?

If not, could you recommend any other type of beneficial extracurricular activities? I could probably spend 1-2h a day on this project.


texts: I have a situation where i need to extract the top view of a road from the 'skewed' view I get from a cc camera located on some roadside tree. I would like to do this using OpenCV, but since I'm very new to image processing and really don't know what approach to take, please provide me any sort of guidance on how to approach the problem.


texts: How do window size, sample rate influence FFT pitch estimation?

texts:
I am trying to create a pitch-detection program which extracts the frequencies of peaks in a power spectrum obtained from an FFT (fftpack). I am extracting the peak frequencies from my spectrum using Quinn's First Estimator to interpolate between bin numbers. This scheme seems to work well under certain conditions. For example, using a rectangular window function with a window size of 1024 and a sample rate of 16000, my algorithm correctly identifies the frequency of a pure A440 tone as 440.06 with a second partial frequency of 880.1. However, under other conditions, it produces inaccurate results. If I change the sample rate (e.g to 8000) or the window size (e.g. to 2048), it still correctly identifies the first partial as 440, but the second partial is somewhere around 892.  The problem becomes even worse for inharmonic tones like those produced by a guitar or piano.

My general question is: In what way do the sample rate, window size, and window function affect frequency estimation of FFT peaks? My assumption was that simply increasing the resolution of the spectrum would increase the accuracy of peak frequency estimation, but this is clearly not my experience (zero padding also does not help).  I am also assuming that the choice of window function will not have much effect because spectral leakage should not change the peak location (though, now that I think about it, spectral leakage could potentially influence the interpolated frequency estimate if the magnitudes of bins adjacent to the peak are artificially increased by leakage from other peaks...).

Any thoughts?


texts: Why do we need to make simulation not only on baseband but also on passband?

texts:
What is the purpose of doing passband simulation, what are the signal processing  imperfections we can reproduce in passband?
In other words what are we missing if xe simulate only in base band?

It is IQ imbalance, time/frequency estimate,  matching filtering ... ?


texts: Determine modulation function from spectrum?

texts:
I have a two periodic signals $x(t)$ and $y(t)$ which are related to each other by a periodic modulation function $\alpha(t)$:
$$y(t) = \alpha(t) x(t)$$
If $x(t)$ is a sinusoid, is it possible to determine $\alpha(t)$ from the spectrum of $y(t)$? How might I do this?


texts: Algorithm to extract polygones with holes

texts:
I have this picture and would like to extract the bones.
First I thought of contour-Tracking, but as you can see in some bones there are holes (Like for example at the left finger, in the bone in the middle).

What algorithm would you recommend me? To find the contour of the bones? How could I fill them? Thanks

Im also grateful for code examples.
.


texts: Output of system given input and frequency response

texts:
Given the signal: $$x(t) = −4\cos(2\pi 4t) + 3\cos \left(\pi t − \frac{\pi}{3}\right)$$

By sampling theorem $Fs = 2 Maxf = 8 Hz$

The question ask what is the output of system y[n] when the signal x[n] is the input and the frequency response is: $H(e^{jω}) = 2 + 2e^{j2ω}$

I try to do this, but i don't undestand how to separate magnitude and phase from this result:


texts: Is there a $z$-transform like for variable sampling rate signals?

texts:
I'm working with signals with variable sampling rate (the time space between samples is not constant). I know the delay between samples but I don't wont to interpolate the signal.

Is there a way to design a filter in $z$ domain and filter a signal with variable sampling rate without interpolation?


texts: Sanger DNA sequencing produces a chromatogram trace which can be visualized with a number of programs, including FinchTV or ChromasLite. The raw data consists of co-ordinates for each of the four DNA bases (A, C, G and T). However, plots are displayed as smoothed peaks, as shown in the image previously. Many programs allow the x- and y-axis of the plot to be scaled larger or smaller to change the shape of the plot. What mathematical method is used to plot smooth curves such as these from a (small) number of raw data points?


texts: Autocorrelation of noise - negative correlation

texts:
I am investigating autocorrelation of electrical noise as part of an undergraduate experiment (as detailed in http://physlab.lums.edu.pk/images/a/ab/Correlation.pdf). I sampled noise voltages using an 8-bit AtoD from a noise generator (whose description was not provided). I first sampled the noise directly, then I sampled it after passing it through a low-pass filter. I imported the data into MATLAB and used the autocorr function to autocorrelate it. The no-filter data autocorrelated as expected, being just 1 at t=0 (as in Fig 1 in paper); however, the filtered data decays initially as expected but then dips below 0 before coming back up and staying around 0 as in the image below.

My three issues are:

I am not really sure what this means physically (is the correlation 'direction' changed so-to-speak?),
Why might this be occurring? I know that a description of the noise generator may be important here but I do not have that information myself.
Is there any way to correct this issue, and if not, what would be the best compromise?

EDIT:

Here are snapshots of the noise without and with the filter (RC=0.5ms) respectively:


texts: Are there hardware solutions for general purpose data compression (e.g. zip)?

texts:
Are there hardware solutions to compress data? Specifically, I am looking for a low power IC that implements something like zip compression, to take load off the microcontroller, as it often is very resource constrained. For example, doing online data compression to send over a low bitrate communication link.

I was able to find a few hardware implementations but as PCIe cards (mentioned in this Wikipedia page). I was also able to find cryptography ICs, but no general purpose data compression ICs.


texts: Calculating the network function of a filter

texts:
Given a system, that behaves as a 1st order filter with network function $H(s)$. We input:
$$v_1 (t)=1+3\cos(10^4 t)$$

And we obtain as output:
$$v_2(t)=1+1.5\cos \left(10^4 t -\dfrac{\pi}{3}\right)$$

Say what kind of filter it is and find its network function $H(s)$.

I'm trying to solve this problem and I have solved the first part by saying that the filter is a low-pass filter because the continuous term is conserved in the input as well as in the output. And I have supposed that the network function will be of the form:
$$H(s) = \dfrac{\kappa}{s+a}$$

My question is what do I have to do in order to compute the constants $\kappa, a$ according to the filter characteristics?

I have tried to compute the amplification for the following frequencies:
$$\text{Amplification}(\omega=0) =\dfrac{1}{1} = 1$$
$$\text{Amplification}(\omega=10^4) = \dfrac{1.5}{3} = 0.5$$

But I don't know if this is correct since the phase of cosine in the output is different.


texts: Prony method for frequency estimation in matlab

texts:
i am interested  if where can i find matlab code for  Prony method for frequency estimation.there is  pdf article  about prony
https://www.google.ge/#site=&source=hp&q=prony+method+for+distorted+signal&oq=prony+method+for+distorted+signal&gs_l=hp.3...2187.8079.0.8365.0.0.0.0.0.0.0.0..0.0.ernk_timediscountc..0.0...1.1.16.hp.enCwRCZuhe0&bav=on.2,or.&bvm=bv.47534661,d.bGE&fp=79e233fb1755afd8&biw=1280&bih=675
first one is   about  prony.so what i ant is that for given  signal,prony  method should return Amplitudes,damping factor and phase shift and also this parameters should minimize  sum of squared error.in matlab webpase there is prony for filter design,but i think  this  method is not what i am looking for,please  could  you help  how to find code for prony method in matlab?


texts: Image Segmentation based on coordinates from reference points

texts:
I have a set of colors in a card, as below (I can modify the card as required)

I have 4 reference points at four corners. I have a bunch of colors at known coordinates (in mm) from these reference points.

A user clicks a picture of this card on their phone (Android) (assume good lighting condition)

I can calibrate the distance from the number of pixels between the identified reference patterns and the known actual distance (in mm) between them

How do I extract each of these color values from the picture on the Android phone locally?

What I thought so far:

Detect the reference patterns and get their coordinates.
I know the actual distance in mm
From the coordinates and actual distance, get pixels-per-mm
I know the actual distance in mm of each of these colors
Offset by that distance (pixels) for each of the colors and find the average color in a small radius around that point.

How do I achieve this?


texts: Convolution between two unequal length vectors

texts:
Considering an example, where the model is
\begin{align}
x[n] = \mathbf{h}^\mathsf{T}\mathbf{u}[n] + w[n].
\label{Eq1}
\end{align}
$\mathbf{h} = [h_0,h_1,\ldots,h_{M-1}]^\mathsf{T}$ of length $M$ which represents the coefficients of the LTI SISO channel and $\mathbf{u}[n] = [u[n], u[n-1], u[n-2],\ldots,u[n-M+1]$ is the input to the channel. Let $\mathbf{v} = [v_0,v_1,\ldots,v_{M-1}]^\mathsf{T}$ of length $M$ be the coefficients of the equalizer.

If the length of the equalizer is different, say the channel length is $M$ and equalizer length is $Q=2M-1$ then how would the convolution happen since there will be a mismatch in the number of elements of $\mathbf{h}$ and $\mathbf{v}$

I can do conv(h,w) in Matlab where h is the coefficients of the channel and w denotes the coefficients of the equalizer. Assuming known values of h = [1,0.2,0.6] and the estimated coefficients of the equalizer as `w = [0.8,0.1,0.2,0.3,0.5]'. How would the convolution work? Can somebody please show first few steps. The first few sample will be zero based on my calculation. But i am not sure.


texts: Transform matrix creation in compressed sensing

texts:
In Compressed sensing ECG reconstruction I would like to use biorthogonal wavelet basis as transform/sparsifying domain. I found out that wfilters command in MATLAB will give 4 type of filters, but which filter I would use to make the transform matrix?

Either decomposition lowpass/highpass or reconstruction low pass/high pass or is there any other better ways to make the transform matrix??


texts:
I am trying to understand the relation between phase response of an analog filter and its influence on the quality of a signal with PSK modulation.

For example I want to design a BPF for HF communication system.

The pass band is [1.5 .. 30]MHz. The Phase response is non-linear as far as I understand. Will it damage the phase modulated signal, say PSK-8 ?

Which of two - phase response or group delay is more important to be analysed?

Any references where I can read about that?

-Thanks in advance


texts:
I have noticed certain overlap between digital signal processing and quality assurance for jobs that require expertise in evaluating the quality of the transmitted signals on telecommunication systems like VoIP or IPTV. I have two examples:

https://www.usajobs.gov/GetJob/ViewDetails/511503700
https://highfive.com/careers/positions/?gh_jid=202317

For me, however, electronics engineer or quality assurance engineer are not terms that describe enough someone who is able to understand ITU-T standards (MOS, PSQM, PEVG, PESQ, POLQA, MUSHRA), quality of experience (QoE), network terminology (packet loss, bit rate, throughput, transmission delay, availability, jitter), DSP techniques (frequency analysis, FIR/IIR, sampling and quantization), and software programming.

Is there another name for this position? Is there a career path defined for someone who aims to work in this industry? Is this job profile something required nowadays by other companies?

PS: I wonder also if an expert like this can also participate in the creation of new algorithms and the evaluation of the quality of the architecture of DSP systems, as described here: https://www.eetimes.com/document.asp?doc_id=1275520


texts: Nonlinear tricks for blocking wide band noise

texts:
Conventional methods of filtering allow one to block parts of a frequency band while passing others.

But thinking outside of conventional means, and perhaps not based on any frequency methods at all, are there filtering methods for blocking wide band noise, however passing rapid moving signal?

For example. Say I have a square wave with 'hair' on it (white-like noise). I just want to get the square wave with corners as sharply as possible - and minimum hair on the output. Outside of conventional FIR, IIR, Kalman filtering are there any nonlinear tricks?


texts:
I have in my course notes:

$$
\sum_{k=0}^{N-1}y(k)e^{-j\omega_nk}\approx\sum_{k=-\infty}^{\infty}y(k)e^{-j\omega_nk}
$$

Where the $\approx$ for some reason becomes $=$ when $y(k)$ is periodic. Could you please explain why this is the case?

Thank you so much!


texts: Relation between filter order and window length for FIR filter

texts:
In case of FIR filter design, is the following relation always applicable or there are other relations/formulas also?
If window length is denoted by $M$ ,then filter order will be $M-1$


texts: How to decide whether to use AR or MA for smoothing data?

texts: Imagine I've got some offline data that I want to smooth. I could use an auto-regressive or moving-average filter of some appropriate order for conducting the smoothing. On which criteria should I base my filter decision?


texts: Power Spectral Density vs Energy Spectral Density for Discrete Signal

texts:
I'm sure this is a silly question but reading a bit about the PSD vs ESD for continuous signals, I'm a bit confused how that applies to discrete signals.

Usually people seem to be using the PSD when analysing real world signals, why not the ESD, I would assume a discrete real world signal is never infinite and thus never encounters the problem of infinite energy?


texts: Compressive Sensing - Incoherence Property

texts:
Compressive Sensing is built on 2 properties: 1) the sparsity of the representation basis relative to the sampling basis and 2) the incoherence between the singular vectors from each of the 2 bases in a). On the surface this seems fine to me but he "incoherence" relationship is confusing me a little.

Some texts refer to the coherence between the bases (representation, sampling) and other refer to the coherence between each basis and the standard basis (e1, e2, e3 ...).

Is there a difference between these two statements?

  "We are in the position to state our main result: if a matrix has row
  and column spaces that are incoherent with the standard basis, then
  nuclear norm minimization can recover this matrix from a random
  sampling of a small number of entries."

Page 6: http://statweb.stanford.edu/~candes/papers/MatrixCompletion.pdf

and

"Incoherent sampling ... The coherence between the sensing basis and and the representation basis".
Page 3: http://authors.library.caltech.edu/10092/1/CANieeespm08.pdf

My question is related to this question:
https://dsp.stackexchange.com/a/13017/4038


texts: Alternative to Extended Kalman Filter When Prediction Function Is Not Differentiable

texts:
I am looking at a tracking problem. It can be modelled similarly to the Extended Kalman Filter:

$$
\begin{array}{rcl}
\mathbf{x}_k &=& \mathbf{f}(\mathbf{x}_{k-1}, \mathbf{u}_k) + \mathbf{w}_k\\
\mathbf{z}_k &=& \mathbf{h}(\mathbf{x}_k) + \mathbf{v}_k
\end{array}
$$

Here $\mathbf{x}$ is what I want to track, $\mathbf{u}$ are the controls, $\mathbf{z}$ are measurements and $\mathbf{w}$ and $\mathbf{v}$ are noise. The function h is the identity in my case. My problem is that the nonlinear function $\mathbf{f}(\mathbf{x},\mathbf{u})$ is not given in closed form (it's not something simple like $\sin(\mathbf{x}^T \mathbf{u}))$. I can only write a function in Java (or another programming language) which evaluates $\mathbf{f}(\mathbf{x},\mathbf{u})$ with an algorithm. Hence, I can't use the Extended Kalman Filter, because I can't build a derivative of $\mathbf{f}(\mathbf{x},\mathbf{u})$.

The only alternative that came to my mind is to use a particle filter, where it should not be a problem that $\mathbf{f}()$ is computed by an algorithm.  However, it will probably be too computationally expensive, because $\mathbf{f}$ is computationally expensive and I would need to call it for each particle.

Does anybody have an idea for an alternative filter?


texts: Relationship between $y(t)$ and $Y(f)$ in LTI system

texts:
If I'm given an LTI system. And I'm supposed to find the input $x(t)$, given $y(t)$ and $h(t)$. Am I able to use this relationship:

$$X(F) = \frac{Y(f)}{H(f)}$$

Another question I have is if I'm given $$y(t) = x_1(t) + x_2(t)$$
Does the following hold in the frequency domain:

$$Y(f) = H(f) + X(f)$$

NOTE: $y(t) = x_1(t) + x_2(t)$ Could just be a mistake in the assignment. I think a convolved sign should be there and not addition. I'm not too sure.


texts: Disadvantage of high downsampling rates with CIC filters

texts:
For a lock-in amplifier I am downsampling the demodulated baseband signal  prior to the final low pass filtering. This lock-in amplifier is implemented on an FPGA (myRIO of National Instruments).

Therefore I use CIC filters. I've reading a lot in Hogenauers paper and in "Understanding digial signal processing", by Richard Lyons. My downsampling rates are between 512 and 2048 (always powers of 2) as I want to decimate my input signal down to less than 100 Hz (e.g. 48kHz sampling will be decimated to 93Hz).

The gain of the CIC output is scaled to the CICs input by a simple bitshift afterwards.

Is there any disadvantage using even higher decimation rates?


texts: What is the difference between general microprocessors, DSP and FFT chips?

texts:
I know that a general purpose microprocessor requires 18 operations to perform each butterfly of the FFT, but I do not understand how does using using a DSP or FFT chip improve FFT processing?

Any thoughts?


texts: Space-Time coding uses large amount of block codes to acheive maximum spectral efficiency

texts:
Assume I have a MIMO system with $M=8$ transmit antennas, and an arbitrary number of receive antennas.

This MIMO systems uses space-time coding. the block codes (matrices) transmitted are part of a set $S$. $S$ contains 110592 unitary matrices having complex elements belonging to an M-PSK moduolation.

And let $T$ be the normalized coherence interval, which is the duration in which the channel remains constant.

The maximum spectral efficiency achievable by such a system is:
$$R_{max}=\frac{1}{T}\left\lfloor \log_2 |S| \right\rfloor$$
where $\left\lfloor \log_2 |S| \right\rfloor$ is the cardinality of the set $S$, which is 110592. This leads to a maximum spectral efficiency of $2\text{ bps/Hz}$.

The number of matrices needed to attain $2\text{ bps/Hz}$ or $\text{bpcu}$ (bits per channel use) is $2^{RT}$ which amounts to a set $C\subset S$ of 65536 matrix.

In my work, these 65536 matrix are not chosen randomly from the set $S$, rather they follow a criterion which is to choose the matrices having the largest distance among each other in order to improve system performance.
The distance between two matrices is measured using the Frobenius Norm as follows $D_{MaMb}=||M_a-M_b||_F$

My problem is that it is not feasible to run my search algorithm on all 65536 matrices. Is there a sub-optimal method that i could use to select these matrices without running through the whole Set?


texts: How does transition width of a low-pass filter affect a message which is well within the pass-band?

texts:
I'm taking a communication systems course and we use GNURadio in the lab. In an exam, we had a simple question where we were asked to demodulate a Dual Side Band (with carrier) AM signal in GNURadio. Carrier frequency was known to be precisely 500KHz and message was audio (known to be < 15KHz). The incoming signal has sampling rate of 1.92MHz.

EDIT: i.e incoming signal is given to be of the form $(1 + k_am(t))cos(2{\pi}{f_c}t)$ with $|k_am(t)| < 1$

To do that, I took the absolute value of the incoming signal, and used a Low pass Filter with cutoff frequency 17KHz and transition width 100Hz to obtain the audio clip. I was listening to the audio sampled at 48KHz (with proper decimation of 40 set in the Low Pass filter block). However the received audio clip was very jittery. I could listen and identify the song, but there were periodic higher frequency spiky noises.

The TA observed this, changed the transition width of the LPF from 100Hz to 1KHz and it was  completely fine now - I could hear it neat and clear! I argued that I only tried to make the filter better by making it more ideal - brick-wall type, and also, this transition is happening where I don't have my message (transition occurs at 17KHz and my message < 15KHz). He replies that I pay a price when I make a filter transit faster, and added I would understand that when I do the digital communications course.

Could someone kindly explain to me, what price I pay (in digital domain) when I decrease the transition width of the Low Pass filter? Thanks in advance.


texts: Discrete Frequency Equation and Relation

texts:
I think I am looking at conflicting equations from a few sources, or maybe I just dont understand it.

$  \Omega $ is Discrete frequency
$  N $ is Discrete Period in number of samples
$  \omega $ is Continuous frequency
$  T $ is Continuous time period
$  F_{s} $ is Sampling frequency
$  T_{s} = n $ is Sampling Time Instant
$  k $ is Discrete harmonic index which goes from 0 to N/2 for a real signal

First equation forms I have seen
$$
\Omega = 2\pi f/F_{s} =\omega / F_{s} = \omega T_{s} = \omega n = 2\pi n / T
$$
Second equation I have seen
$$
\Omega N = 2\pi k
$$
$$
\Omega  = 2\pi k / N
$$
Third equation I have seen
$$
\Omega_{k} = k F_{s} / N
$$

First and second look the same with if $k=T_{s} $ and if $N=T$ and first and third seem contrary.

Can someone explain please?
Also if you can point in in a direction where all this is neatly derived and defined?

Thanks


texts: Purpose of Extended Kalman Filter with Constant Minimum MSE Matrices

texts:
I work with a client that wants me to implement in real-time system an extended Kalman filter they have designed in Matlab. I reverse engineered their code to find out that the Minimum Prediction MSE Matrix M[n|n-1] and Minimum MSE Matrix M[n|n] are constant and not updated every sample.
Are there good reasons not to compute these matrices?
I cannot reveal much more than that as I have an NDA.
Regards
Edit :
The M[n|n] and M[n|n-1] notations are based on the Steven M. Kay book


texts:
I am trying to duplicate a stereo channel into four channels.
When I do that the sound plays twice as fast. it's PCM raw data
Basically trying to copy the stereo bytes into four channel buffer.
In Audacity
16kHz plays faster.
8KHz can hear it perfectly.


texts: Creating a time domain filter from a frequency domain plot

texts:
In figure 11.23 of Monzingo's Introduction to Adaptive Arrays, the author uses a sinewave in the frequency domain to model the amplitude ripple in the passband of a channel of a receiver.

What does he mean by array bandwidth?
How does one create a time domain filter (FIR or IIR) with this custom/arbitrary frequency response?
What are other conventional channel amplitude and phase ripple filter models?


texts:
I am interested in buying a device that measures the SINAD of the audio signal(FM signal) that I receive from PC.
Here is the setup:

Signal generator (generating 1kHz FM signal ) $\rightarrow$ attenuator $\rightarrow$ HackRF connected to PC with SDR#

When we receive a 1kHz FM signal generated by the signal generator at the HackRF (which is connected to PC), we get an audio tone from the PC as output. I am interested in measuring the audio quality of FM tone that we receive at hackrf (connected to PC with SDR# support).

I know that for some signal generators, there is a separate port for measuring SINAD. The signal generator that I have does not have the capability to measure the SINAD. So, if there are any other devices that can help me measure this SINAD, please let me know.

Note: Sorry, I asked the same question without registering in dsp.stackexchanege (Any recommendations for buying SINAD measuring equipment?). I was unable to edit the question. So created a new one here.


texts: Clarification Regarding Changing the Variable

texts:
Assume I have that :
$$
X(j\omega)=\begin{cases}e^{-2\omega}&\text{if $|\omega|<2\pi$}\\0&\text{if otherwise}\end{cases}
$$
Say, I want to make this change substitution $X(j(\omega-\Omega))$. Would this imply :
$$
X(j(\omega-\Omega))=\begin{cases}e^{-2(\omega-j\Omega)}&\text{if $-j(2\pi+\omega)<\Omega<-j(\omega-2\pi)$}\\0&\text{if otherwise}\end{cases}\;\;???
$$


texts:
I'd like to know if I understand correctly why $y[n] = x[n-1]$ is an all pass filter.

By definition of the filter, we get the output the same of the input only delayed by one unit of time. Therefore, all frequencies that entered must pass (eventually).

Therefore, it's an all-pass filter.

Is that a correct reasoning?

Thanks


texts:
I have already asked (in another thread) how to quantify (specify) the window function I have created. One figure I need it seems is the Equivalent Noise Bandwidth (ENBW) Or Noise Equivalent Bandwidth. I now need some practical help. How would I go about determining the ENBW of my window function? I guess I am asking, what signal I should apply and what should I measure to generate some numbers from which I can then calculate the ENBW? Having read around the subject, I have not found a very straightforward explanation of what to do. Apologies for being really dense, mathematics is tough for me because of my form of dyslexia. Thanks.
This first image shows my window (black trace) for which I would like to calculate the ENBW. This is shown versus Blackman Harris (green trace) window for reference. This test emulates a perfect (synthesised) 1kHz sine wave sampled at 48kHz with 32-bit precision and 1Hz bin-width.

This second image shows my window again (black trace) versus a Blackman Harris again (green trace) only with an attempt to emulate a realistic situation. The synthetic sine wave is now 1000.5Hz (so 47.976 wavelengths fit in one sampled block) and a noise floor has been added. This shows how my window allows the noise floor (and second tone - see below) to be viewed in detail while it is obscured by the Blackman Harris window. Also, a second sine wave of 1050.5Hz and -160dB has been added to demonstrate the point of the improved window - to better separate components that are close in frequency. Please note that levels are all over the place because of a lack of calibration rather than level errors in the window itself.


texts: Determine type of filtering applied between two images

texts:
I am not too familiar with DSP, and would be grateful for a pointer in the right direction.

Given two images A and B, is it possible to determine the filtering applied, and thereby apply it again to other candidate images?

For example, if you have an image of a triangle, and the second image is of that triangle rotated 90 degrees. Or the first image is a square, and the second image is a pentagon. Is it possible to determine the filter applied?


texts:
There apparently are different terminologies used to refer to the same field called "compressive sensing" such as (see this wiki page): compressed sensing, compressive sampling, or sparse sampling. I wonder about "sparse sensing" though!

Nonetheless, and after some internet search, what people refer to as "sparse coding" seems to not refer to the "compressive sensing" field as the other terminologies I cited above.

Is there really a difference between compressive sensing and sparse coding?

What about dictionary learning?


texts: Range Migration Algorithm in FMCW MIMO RADAR

texts:
I’m using a FMCW MIMO radar [77-79 GHz] with a virtual linear array made of 48 channels.

I’m wondering if the adaptation of the range migration algorithm (typically used in SAR processing) is feasible for this kind of radar. My concern regards the few numbers of points (48) along the track (azimuth) dimension.


texts: Artifacts reduction during filter cutoff change: is it possible?

texts:
I am designing a digital sound synthesizer and prototyping it using Max. The synth in question includes a dedicated filtering module, including a bi-quadratic filter whose cutoff frequency is controlled by an ADSR segment generator.
The filter in question, unfortunately, generates some artifacts in signal when the cutoff frequency variation is high and at sample accuracy. For instance, here are some test I did using a 50Hz test sine wave and sending only the left channel to the filter (right one is the original signal):

cutoff change from 20kHz to 200Hz

cutoff change from 200Hz to 20kHz

Is it possible to avoid these artifacts (in particular, signal instability, phase variation) when the filter cutoff frequency, and consequently the filter coefficients, are changed? If yes, can you suggest some documentations to study more in depth possible solutions to this issue?


texts: Conversion from continuous to sampled signal?

texts:
I am bit confused regarding sampling as i read different types of statements in different texts

Forexample i have a continous time signal $x=sin(t)$ defined for $t=0:10$
and i want to sample it with sampling frequency 5000hz
How can i obtain sampled signal $x[n]$ in this case

Please guide me which of following two ways is correct to define sampled signal?

$x[n]$=$sin(ts)$               where ts=1/5000

               or

$x[n]$=$sin(ts/fs)$               where ts=1/5000 and fs=5000


texts: Calculating signal/noise ratio and the noise level

texts: If the received signal strength for a 5.2 dBi dipole was measured at -46 dBm and the noise level was -96 dBm, what would the signal/noise ratio be in dB, the received power in µW, and the noise level in nW?


texts: Match Filter in Time-Frequency domain instead of just Time domain. Redundant, or better?

texts:
Assume you have a signal, and within it, some pulses are present. A pulse is a simple tone. You know the pulses' duration and shape. (Let us assume that a pulse is made of a couple of cycles, and then to which all those cycles are multiplied by a hamming window. So the final pulse may look like the blue plot below:

What we do not know are its frequency. (You know its frequency to within $\pm 100\textrm{ Hz}$).

The question is:

Does performing a match-filtering of a signals' absolute magnitude spectrogram with a 2-D version of your pulse in the time-frequency domain, confer upon you any advantages, versus performing a match-filtering of the signals' (shown in red as an example), against the known envelope of the pulse, in the time-domain?

]2*

For the TF-domain method, assume:

STFT analysis.
I am using an analysis window equal to the expected pulse length.
Percent Overlap: Whatever you want, I do not think it matters for this case.

I am really on the fence on this one because on the one hand, you cannot create information out of nothing, so taking your problem to the time-frequency space seems redundant, while on the other hand, going into the time-frequency space allows you to, perhaps, create 2-D filters  that better match your pulse, and/or, ignore noise from other bands which are (perhaps?) not ignored in the time-domain match-filtering case?

My biggest point of confusion is that, inherent to going into the TF domain, we now have both time and frequency localization ambiguity, (based on our choice of the analysis window we use). In contrast, in the time domain, we are $100\%$ sure of our time localization. How - or why - would trading in $100\%$ time-locatlization unambiguity for some joint time-frequency ambiguity help? I am not seeing it.

EDIT:

Another way to look at the problem is with this rephrase: When would one want to do match filtering in only the time-domain ($0\%$ time ambiguity, $100\%$ frequency ambiguity), vs doing it in the joint TF-domain, (x% time ambiguity, (1-x)% frequency ambiguity).

I had a broader question but broke it down into this one first.


texts: MUltiple SIgnal Classification (MUSIC) Implementation

texts:
I have a linear 4 element antenna array currently in my design, I am able to obtain the I/Q data from each antenna. Now I am trying to implement the MUSIC algorithm to obtain the AoA (Angle of Arrival). I have read some articles about the algorithm, however, I did not come across any article that explains how theory can be implemented in practice. I have few question hope some one will support me.

Are there any tutorials or articles that describes the MUSIC algorithm implementation detail? I prefer in C/C++ language. But any other language is also ok.

In the derivation of the MUSIC algorithm, normally it assumes N number of sources. Is this the number of actual sources or does it also counts multipath signals?

Are there any articles describing MUSIC algorithm implementation once we have the I/Q data?

Thanks a lot!!


texts: How is a signal with SNR less than unity demodulated?

texts: The title pretty much says it all.  What technique can be used to demodulate a signal with SNR less than 1?


texts: Feature extraction for exponentially damped signals

texts: I am looking into exponentially damped signals where it is a stationary signal (after implementing the Adfuller statistical test) and I would like to look into how can I extract meaningful features out of the signal in order to do pattern recognition with machine learning. Can anyone guide me on where I can find articles/blogs of signal processing techniques and feature extraction of exponentially damped signal?


texts: Good test for periodicity between signals

texts:
I have two timeseries signals. They look like this:

Each signal started out from the same array, but each received different preprocessing treatments. Ultimately, each signal represents the breathing rate of a subject. Each peak constitutes the peak of an inhale, so the number of peaks/time yields the respiratory rate. I want to determine which preprocessing treatments yield a more periodic signal so that I can conduct the most optimal peak detection.
As you can see, both signals are noisy, but it looks like the orange timeseries has more consistent periodicity, making it more suitable for my task. What is an optimal test to determine how periodic each signal is so that I can determine the signal without having to look at them?
Ideally, a solution implemented in python or c++ would be great, but not necessary.
Edit
Here is a way to compute average frequency per signal.

Am I correct to assume the higher value is more periodic, or is that too simplistic?
Edit 2
More "periodic" probably isn't the right term. This is what I mean:

The first plot has less noise, so it is cleaner/easier to determine the periods between peaks. Again, I am ultimately trying to solve a peak detection problem.


texts: Demodulation of BFSK signal with frequency hopping using Goertzel Algorithm

texts:
I am implementing a BFSK algorithm with frequency hopping on an embedded system and I am using the Goertezel algorithm in my demodulation approach. Basically, I use the goertzel alorithm to determine the powers of the signal at the next expected frequencies for both both bits 0 and 1  and whichever gives a higher power (generally in order of 10000) is the bit received. My implementation of the algorithm in C is as follows :

float goertzel(int numSamples,int TARGET_FREQUENCY,int SAMPLING_RATE, int* modData)
{
int k,i;
float   floatnumSamples;
float   omega,sine,cosine,coeff,q0,q1,q2,result;

floatnumSamples = (float) numSamples;
k = (int) (0.5 + ((floatnumSamples * TARGET_FREQUENCY) / SAMPLING_RATE));
omega = (2.0 * 3.1416 * k) / floatnumSamples;
sine = sin(omega);
cosine = cos(omega);
coeff = 2.0 * cosine;

q0=0;
q1=0;
q2=0;
result=0;

for(i=0; i<numSamples; i++)
{
    q0 = coeff * q1 - q2 + modData[i];
    q2 = q1;
    q1 = q0;
}

result = sqrtf(q1 * q1 + q2 * q2 - q1 * q2 * coeff);
return result;
}

The data at the receiver end is always in the form of a 32-bit integer.

The problem is that my received signal is a baseband signal and the band width is spread from -2KHz to 2KHz. Hence half of the hopping frequencies are in the negative side of the spectrum and goertzel algorithm is not working correctly for the negative frequencies. So I tried to use the frequency bins in the next set i.e. at (sampling frequency + hopping frequency), just as in fft. However, my algorithm gives the same output power for both the frequencies, current hopping frequency and (sampling frequency + hopping frequency).
for example, my sampling frequency is 18000 and the current hopping is -2000. So the power should be higher at -2000Hz and 16000Hz than at 2000Hz, but in my case the power is the same at 2000 and 16000Hz, which defeats the demodulation purpose.
This is not the case when I use the goertzel algorithm defined in Matlab. The Matlab function gives the powers distinctly for both current hopping frequency and (sampling frequency + hopping frequency).

Is there something that I am missing from my C implementation which can solve this issue? Is there any other method (other than using DFT, I have already tried it) that I can use for the demodulation procedure.

--Anshu


texts: Given a wide band signal with equal SNR over the whole spectrum, what should the stop band attenuation be for a decimation filter?

texts:
Imagine an incoming signal with $60$ dB SNR over the whole spectrum.
I want to decimate this signal by a factor of, say, $40$, while maintaining a $60$ dB SNR in the remaining frequency range.
What should the be stop band attenuation be for a decimation filter like this?
Since 39 frequency ranges will alias onto the remaining frequency range, I assume that a stop band attenuation of $60$ dB is wrong, and that I need to use an attenuation of $72$ dB instead ($-60$ dB -> $0.001 /40 = 0.000025$ -> $-72$ dB).
Is this the right way to go about this?


texts: How do we know the receiver delay in an OFDM transceiver system?

texts: I was simulating a simple OFDM transceiver system without a channel (just the transmitter and the receiver directly connected). I saw that if I use the "Find Delay" block in Simulink between the transmitted and received bits, I find that it keeps changing, because of which it becomes difficult to decide a specific receiver delay to calculate the BER. This however shows a constant value of delay in just a simple BPSK transceiver system without the OFDM. Can anyone please tell me what is actually happening and what are the things to consider while calculating the BER of an OFDM system?


texts: IIR biquad real-time filter just output noises

texts:
I've implemented a IIR filter but it outputs only noise (like FM radio out of tuning) and I can't see what's wrong.

This is the processing function:

void Filter::process(int size, double *in, double *out)
{
    double xb[2] = { 0, 0 };
    double yb[2] = { 0, 0 };

    for (int n = 0; n < size; n++)
    {
        out[n] = (coeffs->a0 * in[n]) + (coeffs->a1 * xb[0])
               + (coeffs->a2 * xb[1]) - (coeffs->b1 * yb[0])
               - (coeffs->b2 * yb[1]);

        xb[1] = xb[0];
        xb[0] = in[n];
        yb[1] = yb[0];
        yb[0] = out[n];
    }
}

in and out are the buffers of sampled data at 48kHz; and size is 1024.

The coefficients are for $ {Fc \over Fs} = {500 \over 48000 } $ and $ Q = 0.7071 $

a0:  0.00107054
a1:  0.00214108
a2:  0.00107054
b1:  -1.99572
b2:  0.953753


texts:
I have a UWB radar that Im playing with. The problem is that my algorithms at the moment can clearly, reliably and validly pick up 1-2mm movements of a pendulum i've set up. However, when I use it on my chest to find my heart, things doesnt work. The radar should be set up so that the waves penetrate skin and bone, but I am not entirely sure. The antennae are specced specifically to be able to pick up a heartbeat (or penetrate human tissues).

In terms of math, I first do despiking and a bandpass filter around 0.1 - 5 hz, followed by a principle component analysis to reduce the number of samples/sensors. Then I either do a FFT plus some stuff to find the most pronounced frequencies of the top 5 principle components, or I search for the best fit sinuswave (as the heartbeat can be described as such afaik) to the top 5 principle components.

While these methods give similar results when used on a pendulum, they break down when trying to find the heartbeat. The radar can nicely penetrate wood, and plastic and other stuff. Any ideas?

Bonus question: We had some ultrasound gel at the lab, and i tried to see if removing the "air" component would help, but then all signal dropped. Is ultrasound gel absorbing the radar pulses?

Thanks alot!


texts: In case of using a Doppler radar, do we have to use IQ demodulation to find the direction of a target?

texts:
I want to know the way to find the velocity of a target by using a doppler radar.

I read some paper about it,

In summary,

send rf signal to a target
receive the reflected signal from the target.
conduct the IQ demodulation.
compute complex FFT to find the doppler frequency.

So,

If we want to know the direction of a target, or a velocity toward or away from the radar, we must use the IQ demodulation technic to find a negative velocity, right?

If it is right,

What does The IQ demodulation mean?

The reflected radar signal is just a rf signal.

Do we need to modulate a radar signal before transmitting it to a target?


texts:
For a continuous function $f$, it is well-known that the decay of $f$'s Fourier coefficients $\hat f_n$ is related to the differentiability of $f$. Some examples:

for a smooth periodic function $f$, the Fourier coefficients decay exponentially: $|\hat f_n| \sim e^{-cn}$ as $n\to \infty$.
for a piece-wise continuous periodic function $f$, the Fourier decays coefficients decay as $|\hat f_n| \sim 1/n$ as $n\to \infty$.

Now, what about the discrete case, for example a 2D image? In this case $f$ is a mapping from a two-dimensional set (pixel coordinates) to a three dimensional discrete set of numbers (RGB values).
How do we perform a Fourier analysis on this case to find information on the decay of the discrete Fourier transform coefficients of the image when differentiability is a concept that is not present in the discrete case?
To simplify it, suppose we just consider $f$ as mapping from the pixel coordinates to a one-dimensional set of numbers (e.g. the red channel, while the green and blue channels are set to zero for all pixels).
Also, are there any books/papers that discuss the decay of discrete Fourier coefficients for images?


texts: About Discrete Fourier Transform vs. Discrete Fourier Series

texts:
I am new to the field of signal processing. I am wondering what is the difference between DFS(Fourier Series) vs. DFT(Fourier Transform).

For common applications, usually we get a segment(length N) of digital waveform(like a audio segment), and then we apply FFT(DFT) and then do post-analysis with it.

I am wondering if we can use DFS(thus not using DFT at all) all the time and just assume the waveform segment is repeated with period N.  Would this naive thinking/approach cause any problems?


texts: Differentiation of sine in Fourier domain

texts:
The derivative of $\sin(\omega_o t)$ is $\cos(\omega_o t)$.

The Fourier transform of $\sin(\omega_o t)$ is $\frac{\pi}{j}[\delta(\omega-\omega_o) - \delta(\omega+\omega_o)]$.

Differentiation in the time domain is equivalent to multiplying the transform by $j\omega$.

The transform of $\cos(\omega_o t)$ is $\pi[\delta(\omega-\omega_o) + \delta(\omega+\omega_o)]$.

What I don't understand is how multiplying the transform of $\sin(\omega_o t)$ by $j\omega$ gives you the transform of $\cos(\omega_o t)$.  I see how the $j$'s will cancel out, but how does the sign of that impulse get flipped?


texts: State space representation using a given nilppotent matrix

texts:
I want to build a question on state space using a given, nilpotent matrix, $A$.
$$q[n+1]=Aq[n]+Bx[n]$$
$$y[n]=Cq[n]+Dx[n]$$
Usually, I am using the canonical form so there is no problem extracting $A,B,C,D$ from the difference equation of the system. Given a nilpotent $A$, How do I choose reasonable $B,C,D$? can I simply go with the canonical form? Is there anything I should be aware of?


texts:
Im trying to run a simulation of an OFDM system with convolutional coding and u-law compander on MATLAB. The problem is I dont know how to compand the OFDM signal. Do I need to do something to the signal before compressing it? Because value coming out of the ifft block is a complex number.
Xofdm_compand= Xofdm_cp; %OFDM with cp
xofdmcompand=abs(Xofdm_compand);
for j=1:Nframe %Number of symbols
    in=xofdmcompand(j,:);
    v=max(abs(in));
    X_compressed(j,:)=compand(in,mu,v,'mu/compressor');
end

Edit: Here is the snippet of the code where I compand the signal. Am I doing it wrongly?


texts:
In paper Human identification using gaits Section 3.2, the authors explain how to represent a 3D image (x,y,t) into 2D image with (x,t) ; (y,t) denoted 1D signals. I have a conceptual doubt which is in my case I have a matrix (x,y) represent the centroid of the motion- a pixel point from one frame to the next. So, if we want to do some kind of processing like finding the fourier transform, then is it theoretically correct to treat x- coordinate and y coordinate separately?Do we need to perform some trasnformations?I did not understand how the authors are representing an image pixel as 1D signal.Questions are :

It is not clear how the authors have converted to four 1D signals. How to use/represent the image pixel coordinates as 1D signals as done in the paper for further analysis?Should I perform autocorrelation between x and y to get 1D vector?
Phase space plot = it is plot of 2 variables. So, in this case, will it be a plot of x(t) vs y(t) or x(t-1) vs x(t) or the future_predicted_values for x cordinate vs the current measured values of x coordinate?Or the plot of features?
Do I need to smooth the data?If so then how to use bsplines as I found that this is popularly used for smoothening.

Example data points representing pixels (x,y) are

x      y
160    210
160    230
160    250
170    83

and so on for 1000 frames.

Can somebody please help in explaining the concept and the way to proceed with image signals so that a phase space plot can be created.


texts: chord recogination by multiple fundamental frequency estimation

texts:
I'm gonna implement multiple frequency estimation by summing harmonics amplitude!
I've read Anssi Klapuri paper but i can't understand him.
first of all he said spectral whitening i did it by i don't know whether it's true! after that i have to implement this formula:
$$s(\tau)=\sum_{m=0}^Mg(\tau,m)max_{}|Y(k)|$$
i can't understand what this $\tau$ is!
please give some hint to implement it or some other method for implementation.


texts: Working out integration of basic signal functions

texts:
As the title suggests , I'm having problems working out the integration of some basic signal functions. Shown below are the questions and my workings. For some reason I'm just unable to get the answer.

For a) and c) , I know that for u(t) is basically 0 before t=0 , thus I changed the limits for the integration. I did the same thing for u(t-1)

Thanks for the help!


texts:
My question is regarding how one could/should smooth a rather noisy power spectrum obtained from measurements. There are various methods one can use (a moving average, binning, etc) and I am not sure what the correct approach would be, given the situation I will describe.

Although at first sight it might sound like I am asking about what kind of periodogram to use (see for example this question with excellent answers), I think my situation might be a bit different. What I have is a bunch of complex valued autocorrelation functions (ACF): $n$ datasets of length $m = 8192$, centered at $t = 0$, taken with a sampling rate of 1 nanosecond (so 1 GHz sampling rate).

While the specifics are not too relevant to the question, they can also not be changed; the data is obtained using an FPGA that receives a complex value every nanosecond, and it internally calculates the autocorrelation function using a bunch of steps involving DFT's implemented in the binary hardware.

So the data I have I am essentially stuck with. Given this set of ACFs, I'd now like to get their power spectra, which is of course just the Fourier transform. Here is an example:

There are a few things to see. First, there are two peaks between -100 and 0 MHz. These are the main objects of interest; they change their width and height in each dataset, and I'd like to integrate them to see how their area changes. As they are now they are rather noisy, and I think they would benefit from smoothing.

The second thing is the major peak between 100 and 200 MHz; this peak is always there (always at the exact same frequency with this resolution), and it should be kept. That means that it shouldn't be smoothed, nor should its neighbours take it into account when smoothing. I suppose one solution is just to take it out, smooth, and put it back in.

Finally there is some noise background that varies from about 0 to 0.002. This I am not interested in; it doesn't have to go away completely, but it should still be flattened out so that I can see it as a sort of static background.

So, taking this all into account, I am looking for some advice on what to do. A simple approach would be binning; splitting the data up into $k$ segments of length $l$ and taking the central moment of each segment as my new dataset. Of course it reduces the number of points. Another alternative is using a moving average, which replaces each datapoint by its r-range average. And then there are a million more smoothing methods; I just don't know what is more suitable.

And I suppose this is the main question. Given that I have a dataset that looks like shown above, with the features I described, how should I go about narrowing down what type of smoothing method is most suited? The main deal, as I mentioned before, is finding the area of the two peaks between -100 and 0. Also making the data look a bit more pleasant is not unimportant. The moving average does all this, but it feels so.. primitive.

For reference, the dataset (as comma seperated values) can be found here. Note that this is already the PSD; the Fourier transform of my original datasets.


texts:
I have a time domain signal that corresponds to a vibration signal of a machine. I have a second signal that corresponds to a tachometer signal (There is a pulse every one revolution of the shaft).
I'd like to use time synchronous averaging under MATLAB. I'd like to take all blocks of time from the time domain signal whose durations is the duration of one revolution of the signal and average them out.

The problem I have is that the speed of the shaft is slightly fluctuating. I've set it to 900RPM but it goes from 895RPM to 904RPM during the acquisition and so the duration of one revolution fluctuates as well (some miliseconds).
My question is would averaging blocks of signals of different durations be a problem? And if so, how should I deal with this?


texts:
How broad is one DSP engineer's knowledge scope?

What I'm trying to understand. How many engineers are needed to develop for example some musical DSP application? For example a digital effects unit.

Perhaps it breaks down into layers though in the sense that the people and groups designing the processors are different from designing the circuitry (or parts of it) are different from those designing the software?

How many people would one need to design a DSP processor?


texts: How to delay an audio signal by 1 microsecond?

texts: I have an audio signal sampled at 44100Hz. I want to delay this signal by 1 microsecond (and maybe even less) for a steganographic purpose. Now if I delay it one sample, the corresponding time delay will be $\frac{1}{44100} = 2.2 \times 10^{-5}\,\text{s}$. But the delay I need is even lesser than that. How to achieve it?


texts: How do I scale Gaussians for Edge detection

texts:
Say I have an $m\times n$ image and I want to use DOG for edge detection. I can see in this answer he is using:

gaussian1 = fspecial('Gaussian', 21, 15);
gaussian2 = fspecial('Gaussian', 21, 20);

I was working with this image for reference, and I tried to move the size from 1 to 30. I cant make sense of which output is better. I think the sharpest edges I received were for hsize=6, but how can I tell?

After following the advice on the comments and reading the wiki entery's abstract on the subject I am still puzzled. It is my understanding that the band pass parameters is dependent in the image and there is no efficient automatic way to derive the sigma and size parameters of the filters from the image.Does this means I have to manually adjust the filter sizes for any new image?

Is there an automatic way to do so? (I am sure there is since this algorithms work independently on the market)
say I want to generate response for different filters as an experiment:

Which iterations should I go through?
When I am looking at the result image, what should I look for to ssay it is the desired response?


texts: BER vs SNR simulation for GFSK modulation (Closed-form BER for GFSK)

texts:
I'm in the process of simulating the performance of a GFSK modem in GNU Radio. I have managed to get a curve similar to the curves I see in a number of literature sources. However, I need an accurate baseline that can show how accurate (or far of) the performance is. This might be trivial but I have spent quite a number of hours trying to find out a closed-form BER vs SNR for GFSK. All I have seen so far is BER vs SNR for GMSK only. So my questions are:

Does the closed form of BER for GFSK exist at all?
Is there any explanation as to why it doesn't exist?

All answers and references will be highly appreciated.

Regards,

M.


texts: Help filtering a logic level signal without degrading transitions

texts:
I have a signal that is either noisy "low" or noisy "high", e.g.:

    ######     (high)
####      #### (low)
-------------- (zero)

I want to find transitions from low to high, precisely in time.

However noise is getting in a way:

I can't simply use a low-pass filter (transition accuracy lost)
I can't simply use a derivative (HF noise gets amplified)

I figure there must be a well-known algorithm, I just don't know it's name...

Edit:

Below is an example of "good" noisy step as well as "not so good, but solvable" step.

Edit:
Below is original signal (orange) and median filter (blue).

Because raw signal is periodic at high frequency, median filter produces an artefact of a ramp where I'd like to see a step function (or possibly two).


texts:
I have two signals. F1 and F2.

F1 is changing over time slowly. It is in 5-10kHz range. (Change is nonlinear but very slow, a drop of 1-2KHz in one second would be typical)

F2, for sake of argument is a fixed frequency between 20-100Hz.

In my problem, every frequency between -F2 and F2 is modulated over the F1 in 20 - 100Hz range and it is weak in amplitude. (For clarity if 100Hz is my signal, I would get every frequency between f1+- 100Hz). So if I plot this in frequency domain over time, I get a fixed thickness signal changing over time where thickness is getting fainter over time because of low SNR.

I am trying to recover F2 preferably with 1 Hz accuracy.

Due to low SNR of my system, F1 is obvious but F2 is not when I take a simple FFT. I like to use all the signal available to me (usually several hundred msec sampled at 50KHz) My only clue is that F2 is a fixed frequency band.

How can I recover F2?


texts: What is a good algorithm, and framework, to calculate centres of gravity or mass (cog)?

texts:
I'd like to take an photograph, subdivide it into a tesselation, either of squares, or (ideally), hexagons, and then find the centre of gravity (or, if you prefer, centre of mass) of each cell of the tesselation.

The output, for any image, would be a matrix of points. For the attached diagram, something like this (in polar coordinates - $(r,\theta)$ ):

(5,5Π/4) (0,0) (1,7Π/4) (1,5Π/4)
(5,3Π/4) (0,0) (5,Π/2)
(0.0) (0,0) (0.0) (0,0)

I have asked this question in 'Computer Graphics', but not had any replies, so I thought it might fit better with the expertise here in terms of image processing.

I've attached an image showing what I mean. The black circles are the centres of gravity of each cell - in clear, or monochrome, cells it is in the centre of the cell. In those with a green splodge, the cog is pulled towards the splodge.

My question, to put it simply, what is the best method to use to calculate the cog, in this tessellation... For squares, it'd be easy to calculate the weighted mean for each row, but that would be too rough an approximation. What's a good way to iterate either a general tessellation (ideal), or an hexagonal one?


texts: Can someone explain why absolute is needed in power or energy signal?

texts:
I know the power signal and energy signal's equation.

$$
P=\displaystyle\lim_{T\to\infty}\frac{1}{T}\int_{-T/2}^{T/2}|x(t)|^2dt
$$

$$
E=\displaystyle\lim_{T\to\infty}\int_{-T/2}^{T/2}|x(t)|^2dt
$$

I am wondering whether $(x(t))^2$, instead of $|x(t)|^2$, is fine or not.

I think $(x(t))^2$ and $|x(t)|^2$ are same, aren't they?

Actually, I'm just guessing because of imaginary number, but I didn't learn or study that part, so I cannot make sure. Please let me understand. Thank you very much for reading my post.


texts: How to reconstruct a sound from magnitude spectrogram?

texts:
I have an audio magnitude spectrogram but I don't have the phase, try to randomize the phases of each container and then make a reverse fourier, but only pure noise is heard

How can I reconstruct the phase information so that the audio is heard somewhat decent.

Anyone know an algorithm that does this?


texts:
I was provided with several force measurements. Precisely:
The vertical compression force exerted from the milling tool on a working peace. The plot of the force looks reasonable and of course it seems also reasonable to me that the higher the force the higher the noise (because of the milling).
I am looking for some criteria to filter the measures. Any suggestion about how I could filter the data?


texts: Demodulation in Rayleigh Flat Fading Channels

texts:
A core part of demodulation in Flat-Fading channels is (assuming) the channel as a(random) constant complex number multiplied with your signal. This is done in order to de-rotate the symbol for decision making at the sampling time.

I'm wondering how you go about estimating what the complex number is? How do you estimate the phase change induced by the channel?


texts:
Ladies, Gentlemen,

In my last question I asked you present the convolution of sinusoidal with itself. I accept Mr Peter K.'s answer. Now my question is much more important. Is output of convolution of sinusoidal with itself, also sinusoidal?

Regards


texts: Is there any advantage on using a low span value in a RRC filter?

texts:
I know that in a RRC filter a high value of the span gives a better response, in the sense that the RRC filter response is more near to the ideal RRC filter response. However, would there be any advantage on using a small span?

Lets say, for example, that I am sending 100 BPSK symbols, a value of span = 10, would be better, in terms of the BER, than a span = 2.

Q: But would there be any advantage with span=2?


texts: How to compare and measure the similarity between two between two signals?

texts:
I'm working on different sensors data, the question is this: I have two signals (coming from two different sensors measuring two different phisical charactheristcs of the same "object").
I know for a fact that there is a certain amount of time delay between the two signals,  but beyond that, I just want to know how is the correct procedure to correlate the two signals in order to have a proper idea of the similiarity of the signals. Moreover: Can I modify the signal sens1 in order to predict (if in real time or in order to get in post-processing) the signal sens2?
Is any specific tool or package in python to easily do this type of comparison?

Thaks a lot in advance,

BR


texts:
I use a differential modulation with a SIMO system. At the reception, I have $2$ antennas.To find my symbol, I use the relation $r^{\ast}_i(n-1)r_i(n)$ to have the phase of the symbol with $r_i(n)=\sum_{k=1}^ns(k)h_i(n-k)+w(n)$ the received signal for the $n$-th symbol on the $i$-th antenna where is $h_i$ is the implusionnal response of channel and $w_i$ the gaussian noise.
This is my question: With a SIMO system, I have to do a sum but the sum must be done before finding the phase of the symbol or after. More precisely, I don't know which mathematical expression to take:
First case: I look for the phase first and then I sum the signals, $z_1(t)=\sum_{i=1}^2r_i^{\ast}(n-1)r_i(n)$
Second case: I do the sum first and then I look for the phase of the symbol, $z_2(t)=\left(\sum_{i=1}^2r_i^{\ast}(n-1)r_i(n)\right)+r_1^{\ast}(n-1)r_2(n)+r_2^{\ast}(n-1)r_1(n)$
What is the right expression and why from a mathematical point of view?


texts: Brownian noise is integration of gaussian or uniform white noise?

texts:
On this wikipedia page it is written that

  Brown noise can be produced by integrating white noise

What kind of white noise is meant? The Gaussian or uniform white noise?


texts: Why use cross-spectral density to calculate frequency response?

texts:
I am taking a class about system identification and currently learning about cross-spectral density. My textbook says that the frequency response, G, of a system can be determined as
$$G=\frac{S_{uy}}{S_{uu}}$$
where $S_{uu}$ is the Fourier transform of the autocorrelation of the input, and $S_{uy}$ is the Fourier transform of the cross-correlation of the input and the output (the cross-spectral density).

Now, in basic control systems classes you lean that $G=\frac{Y}{U}$.

The former method, using the cross-spectral densities, seems to be related to this more basic calculation, but I'm unsure why we bother using the cross-spectral densities at all. Is it simply to help eliminate noise from the signals or is there some other reason for it?

Thanks!


texts: How to approximate the transfer function of compensator using root locus?

texts:
I have the root locus of a system with and without compensator. The system is consist of a PD-controller and the process, the output is fed back to the controller via $G_s(s) = 1$.
The upper graph is the root locus without compensator.
The compensator is in series with the PD-controller.
$$G_1(s) = \frac{G_r(s)G_p(s)}{1+G_r(s)G_p(s)}$$
$$G_2(s) = \frac{G_c(s)G_r(s)G_p(s)}{1+G_r(s)G_p(s)G_c(s)}$$
Here $G_r(s)$ is the transfer function of the controller, $G_c(s)$ the transfer function of the compensator and $G_p(s)$ the transfer function of the process. The system is LTI.
This is how I did it:

The second graph has two new zeros and one extra pole while contains all the zeros and poles of the first graph( system with no compensator), so the compensator looks like:
$$G_c(s) =K \frac{(s-z_1)(s-z_2)}{s-p_1}$$
But what about the constant $K$ ? I don't know how to specify it.


texts: Using a low pass filter to interpolate signal

texts:
In my DSP university textbook, the interpolation process is described as follows:

  In order to represent a baseband signal $x[k]$ at an increased sampling rate with the same shapes of its time-domain and frequency-domain representations, the insertion of zeros must be followed by low pass filtering with a total bandwidth of $\frac{2 \pi}{R}$ to perform the actual interpolation, with $R$ being the upsampling factor.

The process is depicted in the following figure:

I understand well how we insert zeros between samples of the original signal (i.e. how to go from the first to the second plot of the figure), but I don’t understand how applying a low pass filter to the signal we obtain in the second plot results in the third one. To me, it looks like those zero samples magically get a value, so I would appreciate any explanation of this “magic”.


texts: FMCW Radar using FSK Superimposed LFM ramp

texts:
While reading the datasheet of the ADF4159 I came upon a section describing how to create an FMCW ramp with FSK superimposed to "enable unambiguous (distance and velocity) multitarget detection". While this sounds like a wonderful radar technique, I do not understand how it works. There does not seem to be a lot of online documentation on it.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADF4159.pdf
Page of the section: 29
I am especially confused with the picture they provide of the frequency domain:

What are the dashed lines supposed represent? Why does each step seem so "uneven" with each other? What exactly is the smaller dimension arrows/line measuring?
I already understand the concepts that drive FMCW radar using a linear sawtooth or triangular ramp, so could anybody explain how LFM-FSK radar works, possibly in a visual way? How exactly does it interact with the target? What does it look like on the frequency and/or time domain? And is this method of measurement worthwhile (in terms of complexity vs functionality) compared to other alternatives?
I simply seek knowledge here, I don't plan to try to detect missiles anytime soon :)