texts: How to simulate two OFDM Users with low complexity FFT/IFFT?

texts:
have two User one of them sending over freq (0-B] and the other transmit over (B-2B]. Both of them are using OFDM and each one has Nc subcarriers. I wanted to simulate the received signal using Matlab.

One way to implement, I beleive is that I say user one have 2*Nc subcarriers and only use the first Nc subcarriers and the second user also has 2Nc subcarrier and only ise subcarriers [Nc+1-2Nc). in this case I should use FFT/IFFT size of 2Nc:

Received signal would be Y = ifft([d_1 0*d2],2Nc)+ifft([0*d_1 d_2],2Nc) where d_1 and d_2 are the data of the first and the second users. and at the receiver I can compute d=fft(Y, 2Nc) and the first half would be for user1 and second half for user2.
But I want to use FFT size of Nc, i.e., compute ifft(d_1,Nc) and ifft(d_2,Nc). If I add these two iffts directly, I will get incorrect results as the IFFT results does not show that the two data occupying different subcarriers. My question is, in this case, how I should change (probably up-convert) the ifft result of the second UE?

Furthermore, after constructing the received signal, what operation do I need to get back the transmitted data? Should I again use fft(y,2Nc) ?

Your help is highly appreciated.

Regards,


texts: Effect of bandwidth reduction in bit growth

texts:
I just want to ask, whenever you reduce a bandwidth of signal by filtering, I wonder why do you need to improve the number of bits used to represent that signal.
The number of bit growth is
$$\frac{1}{2}\log_2\left(\frac{BW_{in}}{BW_{out}}\right)$$

Is it to represent to small noise due to filtering.
Thanks!


texts:
I have a library of music tracks that I use to DJ with. Its currently about 3000 tracks that I have gather over the years. Some of it consists of low quality rips that I want to get rid of.

Currently I am writing a script that will look at the time/size = compression rate. Anything that is below 300kb/s I want to delete.

I am wondering if that is a good heuristic to use, or could I possibly do something fancier. Like looking at a spectral analysis to determine what is low vs high quality.


texts:
I can not understand the following sentences, could you please anyone guide me ?
"Comparing with the embedding in audio signals, the usable bandwidth is greatly reduced,
from 22.05 kHz to 4 kHz. According to Costa’s result, the corresponding capacity will be
reduced to l/5 th accordingly."

The costa formula is Cw,Costa=(1/2)*Log2(1+(var_w/var_N))

I also compete it in MATLAB

((1/2)(log(1+(1/4))/log(2)))  /   ((1/2)(log(1+(1/22.05))/log(2)))    = 5.0311
is it right ?


texts:
Are the following frequency domain signals valid DTFT's (Discrete Time Fourier Transforms)? Answer yes or no, and justify your answer.

a) $X(\omega) = \omega + \pi$

b) $X(\omega) = i + \pi$

c) $X(\omega) = \sin(10\omega)$

d) $X(\omega) = \sin(\omega/10)$

I'm just very unsure as to how to go about this question (what methodology to use). Could anyone possibly point me in the right direction? Thanks!


texts:
I seek to understand PyWavelets' implementation of the Continuous Wavelet Transform, and how it compares to the more 'basic' version I've coded and provided here. In particular:

How is integrated wavelet, then differenced post-convolving, equivalent to convolving without int+diff?
How is resampling the integrated wavelet at increasing resolution equivalent to changing its scale?

Naive implementation:
def cwt(x, win_len=None, win='morlet', real=False):
    N = len(x)
    win_len = win_len or N // 8

    scales = _scales(N, nv=32)
    coef = np.zeros((len(scales), N), dtype='complex128')
    kernel = morlet_kernel(win_len)
    wl2 = win_len // 2

    for i, scale in enumerate(scales):
        coef[i, :] = np.convolve(x, kernel(scale)[::-1])[wl2:-(wl2 - 1)]
    return coef

PyWavelets (clipped to relevant parts):
def pywt_cwt(data, scales):
    out = np.empty((np.size(scales),) + data.shape)
    int_psi, x = integrate_wavelet(wavelet='morl', precision=10)

    for i, scale in enumerate(scales):
        step = x[1] - x[0]
        j = np.arange(scale * (x[-1] - x[0]) + 1) / (scale * step)
        j = j.astype(int)  # floor
        if j[-1] >= int_psi.size:
            j = np.extract(j < int_psi.size, j)
        int_psi_scale = int_psi[j][::-1]

        conv = np.convolve(data, int_psi_scale)
        coef = - np.sqrt(scale) * np.diff(conv, axis=-1)

        d = (coef.shape[-1] - data.shape[-1]) / 2.
        coef = coef[..., floor(d):-ceil(d)]
        out[i, ...] = coef
    return out

Comparison on $f=1, 4$ sinusoids:


texts: Maximum frequency of any mobile phone speaker

texts: Which is the maximum frequency of a speaker of any common mobile phone? I would like to use sound to repel some animals, so I need playback sampling rate to be above 44100 Hz.


texts:
I'm currently working on implementing an efficient method to segment an organ on 3D CT images.
I used an algorithm (SLIC) to generate superpixels on each slice of my CT 3D matrix. The process is similar to the k-means algorithm although we do not need to visit the entire image for each pixel.
Then I build a graph based on the superpixel: each superpixel is a node in the graph and two nodes are connected if they contains pixels that are 4-adjacent.
The weight of the edge between two nodes is their color difference:

$ \sqrt {(color1 - color2)² }$

I then tried to implement a method to allow the user to click on a superpixel and label it as foreground or background starting a diffusion algorithm to divide the 3D graph between the two labels. I used the IFT algorithm
However it doesn't perform as well as I want: sometime assigning a label or correcting an incorrectly deduced label will cause the algorithm to select improper superpixel.

The steps I used:

Convert my matrix in 8 bits greyscale (between 0 and  255 value).
Each pixel which value isn't between low_value and high_value is put to 0 (black).
I do an histogram equalization to increase the contrast of the remaining values (thus trying to achieve better superpixel boundaries).
Apply a blurring kernel to my matrix.
Compute superpixels for each slice.
Creating the corresponding graph and creating the edges between them.
The user clicks with the foreground label (every superpixel is set to foreground).
A click with the background label allows some superpixels to be set to background.

I sometime achieve quite satisfying results.
But some clicks may completely destroy the correct graph labeling even though they should have worked.
I have put a small illustrated example in the following imgur album.

So, my concerns and questions are:

Is the IFT algorithm suitable for 3D? I don't see reason why not but my example shows that maybe there label leakage through previous/next slices.
What kind of preprocessing step can improve the diffusion.
I thought about using dijkstra algorithm to determine which seed was closer to a certain superpixel. It didn't work so well : could it achieve what I want with the correct color distance function?
Do you have any advice or article which may help me?

Thank you and sorry if I was not clear, english isn't my first language.


texts:
I have project in which I'll work on audio files using Matlab, I'll be listing to different  machine and should get thei rotational speeds, which is kind of periodic, my question how should I analyse this should I  work with the spectrum and its magnitude using the fft or should I use the PSD , which is the result of pwelch.
I'm not asking for code! thanks for your help


texts: Regularization for inverse filter design

texts:
Given a $2 \times 2$ matrix, $C$, suppose I want to compute a filter matrix $H = C^{-1}$ and that I need to add regularization for practical purposes (e.g., for an audio filter, regularization is needed to limit the gain of the filter at certain frequencies where the condition number of $C$ is large.) The linear system of equations being solved is $CH = I$, where $I$ is the $2 \times 2$ identity matrix.
My approach would be to use Tikhonov regularization where the solution (at each frequency) is given by $H = \left(C^* C + \beta I\right)^{-1} C^*I$, where $\beta$ is a scalar regularization parameter and * denotes taking the complex conjugate, since this minimizes the objective function $\lVert CH-I \rVert^2 + \beta\lVert H \rVert^2$. So, with an appropriately chosen $\beta$, we can essentially constrain the filter gain (since $\lVert H \rVert$ effectively corresponds to the max. gain of $H$), albeit at the expense of $H$ satisfying $CH = I$ less optimally compared to using $\beta = 0$.
Another approach might be to compute $H$ as $H = \displaystyle\frac{(\det C)^*}{|\det C|^2+\beta}\text{adj}(C)$, where $\text{adj}(C)$ corresponds to the adjugate of $C$ and $\det C$ to its determinant. Note that, for $\beta = 0$, this corresponds precisely to $C^{-1}$. This is an approach I came across recently but have not seen before.
I'm pretty sure the two solutions are not equivalent, but if they are, then a proof of the same would be appreciated. Assuming they are not, I've been trying to determine the benefits of adopting one approach over the other. For one, the latter can only be done if $C$ is square (and, from a computation standpoint, not too large since it requires explicit computation of a determinant and the adjugate). Also, $\beta$ enters the solution differently and so optimizing the value of $\beta$ might be easier in one method than the other. Apart from that, I don't have much insight regarding the differences between the two since I'm not really familiar with the latter approach.
As a response from the community, I'm looking for confirmation as to whether or not the two approaches are different, and for comments on when one might want to use one approach over the other, including a more intuitive explanation of the latter approach, if possible. Links to papers/articles/books that use the latter approach would count and be appreciated. Thanks!


texts: Evauating response to $x(n) = \sin{2\pi\frac{1}{4}n}$ given the system function

texts:
Let the input signal $x(n) = \sin{2\pi\frac{1}{4}n}$ go in to the system described by: $$y(n) - y(n-1)+\frac{3}{16}y(n-2) =x(n).$$
  What is the output signal?

I've calculated the system function $H(z)$ to:
$$H(z) = \frac{1}{1-z^{-1}+\frac{3}{16}z^{-2}}.$$
But I don't know how to proceed. The book does the following:

$$H(w=2\pi\frac{1}{4}) = \frac{1}{1-e^{-i2\pi\frac{1}{4}} + \frac{3}{16}e^{-i2\frac{\pi}{4}2}} = 0.776e^{-i0.888}$$

I am not entirely sure where this comes from. Why can I put in the frequency in a function of $z$?


texts: Variational Regularization Method in Image Processing

texts:
I would like to understand better variational regularisation methods in image processing. In particular, the formulas in this image:

Why formula (3.13)? In the notes that I read I cannot find anything about its background, why is the solution of (3.12) given by (3.13). Why do we need this part $$\alpha||f||^2$$?


texts:
Possible Duplicate:
  Looking for algorithm to extract line network from binary images within LabView

I would like to create a LabView VI that receives an input image and the RGB-color codes of the powerlines depicted in the image. The output should (eventually) consist of id'd polygonial connections and their coordinates.

Right now i've finished creating a VI that converts the source image to a binary image with the respective line color types extracted into a binary image (see below).

I've been trying to apply some of edge/line finding VIs supplied by LabView Vision, but the results have not been very convincing.

I have considered implementing some sort of vectorization algorithm like 'Straight Line Extraction Using Iterative Total Least Squares Methods' or even some sort of line-walking-and-mapping algorithm, but before I do so I'd like to know if there already is some kind of fitting algorithm out there.

Attached you can find examples for the source and binary images.

See also the Stack Overflow version


texts: Get spectral picture from a wavelet transform

texts:
According to my previous question, I have changed the generate command to:

y=generate1(100,1000,1);

and got the following picture:

Now I want to test a wavelet transform on the same signal, which of course exists in Matlab, but I have  one thing which I should  clarify: generally, as I know large scale values correspond to small frequencies and small scale values to large frequencies.  So, how should I determine if the given frequencies are small or large? Also, which wavelet transform should i use?

For example:

m=cwt(y,1:100,'sym2');

and plot it

plot(m)

How should I read the second picture? What kind of information can I get?


texts: virtually rotating the view with intrinsic and extrinsic parameter known

texts:
Possible Duplicate:
  How to get a top view using open cv?

I have an image taken from an angle, at a height h from ground. I have all the intrinsic and extrinsic parameters, I need to get birds eye view from the image, How can i approach this ? My first approach was based on wrap perspective mapping but it somehow seems wrong cause i didn't find a way to use any camera parameters there. Correct me if I am wrong. Also the problem is that I need to use only one fixed camera to get a birds eye view.  Thank's in advance :)


texts:
I have a data acquisition device that provides me with an array of integers that represents a modulated signal (let's say QAM16).

I would like to recover the I and Q samples from the raw time-domain signal, so that I can demodulate the data. Is this possible? If so, how would I do it.


texts: What is role of BW and frequency in internet speeds?

texts:
First the bandwidth (BW):

It is the amount of data that can be transferred simultaneously.just like more no. of highway lanes so that many cars can travel side by side simultaneously.

Frequency

It decides the speed of the data. So high frequency is like each car travelling at high speed.
do higher frequency message signals require higher frequency carrier signals?

So if we have both high BW and high frequency we can achieve higher data rates than either of them acting alone.

Are my assumptions correct?


texts: Similarity between two Signals: cycle by cycle

texts:
I need to find the similarity between two signals, i.e., measured signal and the reference signal(e.g. a simple sinusoidal signal). What I mean by similarity is, if there is any decentralized glitch or any change in freq for one particular cycle, the similarity measure should give 'False' or a value in 0 - 1 scale for that cycle. Phase difference also should be considered. Could this be done using correlation? Or is it possible to use wavelets? Or any other method?

Many Thanks...


texts: I've a Gaussian modulated signal whose quadrature and in phase components are separated. I'm multiplying these components with quadrature and in phase components of a signal of 10MHz frequency, respectively. Then i added the two products.This sum is quadrature mixed data.Right?


texts: Audio Processing Used in Voip Mobile Apps

texts:
I am new to VoIP apps and am learning about the various audio processing that are applied in such apps. I have looked at Linphone and CSipSimple apps for Android. I notice that they employ different set of audio processing like echo cancellation, equalization, compression etc.

My questions:

How would a VoIP app developer decide what audio processing should be
used in an app ?
Is there a list of all processing options somewhere
online ?
Is there a methodology involved in selecting the needed
audio processing for an app ?
If I were to identify the minimum set
of audio processing needed for a VoIP app, how would I go about doing
it ?


texts:
What is the best way to design a FIR filter with a given linear phase response, such that each frequency inside the passband is phase shifted according to:
$$H(f)=e^{i2\pi f k}$$
where $k$ is  factor that I want to specify. I also want to specify the number of taps $N$. Note that the effective shift is bigger than the tap length $N$.
I don't really care about the bandwidth of the passband, but it has to be at least 1 MHz at a sampling of 100 MHz. The amplitude should be relatively flat inside the passband.
In python there is a lot of functions which allow me to specify a passband and how flat it is, but I have not found any way to control the phase according to my needs.


texts: why this frequency response is added to the power of e?

texts: From where did this ${\angle}H{(\Omega)}$ came into power of $e$ ?


texts: Eigenfunction property for LTI sinusoidal and the sinusoidal steady-state response

texts: All LTI systems possess the eigenfunction property for complex exponential inputs. That is (restricting our attention to periodic complex exponentials), if $e^{j\omega_k t}$ is an input to the LTI system, then the output is $H(j\omega_k) e^{j\omega_k t}$, where $H(j\omega_k)$ is the frequency response of the systsem evaluated at $\omega_k$. When a linear constant coefficient differential equation with zero initial conditions can represent a causal LTI system. Why is it that when we talk about systems, specifically systems with dynamics described by differential equations, we speak of a “steady-state” sinusoidal output? This seems to imply that transients are always present. But if the system is LTI to begin with, would their be transients in the output if a sinusoidal signal, or complex exponential, is applied? It can be shown mathematically that the output of an LTI system when a complex exponential is applied is just a scaled version of the input, with no transient terms. What’s going on here?


texts: DTFT of sawtooth wave through DTFT of rect signal

texts:
In a course i'm currently taking, the lecturer computed DTFT for the following signal:
$$r[n] = \begin{cases}
1& 0 \le n \le N\\
0& \mbox{otherwise}
\end{cases}
$$
For $N = 32$ i pictured $\frac{1}{N}\frac{\sin{\omega*N/2}}{\sin{\omega/2}}$:

The lecturer told us that you can compute DTFT of any signal on finite support by using this formula:

\begin{align*}
\bar{X}(e^{j\omega}) = \sum_{k=0}^{N-1}X[k]\bar{R}(e^{\omega - \frac{2\pi}{N} k})\\
\end{align*}

So, I tried to render DTFT of sawtooth (red) as the sum:

That's clearly wrong. What did I do wrong?


texts: What is the difference between the spectra of white Gaussian noise and of a Dirac impulse?

texts:
Perhaps it is a basic question, but

can anyone explain the difference between the spectra (or power spectral density) of white Gaussian noise and a Dirac delta?

They are both constant over the whole frequency range, however there are is a clearly striking difference between these signals.

Why do they have the same spectra?


texts:
I am sampling at $30 Hz$.

I have a sample of $N=150$.

Here is an example of how my sample looks like, which starts at 54 and ends on 203 on the X Axis

I am interested in observing frequencies between 15 and 20 per minute. ( Cycles per minute ) Hence, I would derive the cycles per second ( Hz ) like this.

$15*0.0166666666667=0.25 \ Hz$

$20*0.0166666666667=0.33 \ Hz$

When I take the FFT, my data looks as follows. ( X axis are the bins to N / 2, not frequency )

To derive the frequency for each bin, I am using this stack answer to construct this logic:

Frequency = ( bin * sampleRate ) / dft.Points

So I might have some output as follows:

Frequency = 0 * 30/300
Frequency = 1 * 30/300
Frequency = 2 * 30/300
Frequency = 3 * 30/300

If I re-plot the same data, where the X axis now represents frequency, this is what I get :

Here is where my question kicks in:
( Note, if something above is wrong in my logic, please point it out, as it could be the reason why I am getting weird results )

I now want to take the IFFT of the dataset, given that the frequency of the bin is less than . Here is some java code to help illustrate how I am doing this with JTransforms:

final double[] ifft = new double[fft.length];
for (int idx = 0; idx < fft.length; idx++) {
    final double fftPoint = fft[idx];
    final Double sampleCount = Double.valueOf(idx * 30);
    final Double binToFrequency = Double.valueOf(sampleCount / fft.length);
    ifft[idx] = binToFrequency <= 0.33333334 ? fftPoint : 0;
}

analyzer.realInverseFull(ifft, false);

Variable fft above is the DFT/FFT array data points. Since I have 150 samples. fft.length should equate to 300. I am then checking the frequency of the bin, and if it is less than 0.33333334 I am using it, otherwise, it is getting zeroed out.

When I plot my graph, the odd part is that I get two waves:

If I zoom in on the top one, here is what I see:

I also notice that the numbers on the x axis are increments of 2. For example, the wave where the amplitude is around 400K on the Y axis starts at 1, and has points at 3,5,7,9, etc. The lower one starts at 0, and has points 2,4,6,8,etc.

Question:

Should I be seeing two waves? If yes, how do I combine it into one? If no, what step might have I destroyed?

From my cloudy knowledge, the only thing I can think of that can explain this is the notion of imaginary and real numbers. But, I do not see why they should be shown in a time domain, after an iFFT occurs.


texts: Choosing Right Type of Filter for time series data

texts:
I am working on a temperature time-series data which is very noisy. I am trying to measure true low and high temperature but because of noise, I can not apply peak detection directly. I need to do some filtering. Since sampling frequency Fs is not known for this data, I have applied two types of filter

Kalman filter

Median filter

orange lines are the original signal and blue lines are filtered signal. The median filter seems good in this example which is preserving edges.

I want to know what are other types of filters which I can apply to get rid of noise without affecting the sharp edges of the signal.


texts: Interpretation of Histogram in Statistical Image Processing

texts:
I am learning statistical image processing by myself. In papers and books, it always show the histogram of original images and gradients as the following image shows. The histograms of images vary significantly while histograms of image gradients show some similarity. Does it assume that each pixel in images obey the same probability distribution for the histograms of images? Does the histogram of any image gradient obey the same probability distribution?

In the paper Image Denoising Using Scale Mixtures of Gaussians in the Wavelet Domain by Javier Portilla, Vasily Strela, Martin J. Wainwright, and Eero P. Simoncelli there is one paragraph

Contemporary models of image statistics are rooted in the
television engineering of the 1950s (see [4] for review), which
relied on a characterization of the autocovariance function for
purposes of optimal signal representation and transmission. This
work, and nearly all work since, assumes that image statistics are
spatially homogeneous (i.e., strict-sense stationary). Another
common assumption in image modeling is that the statistics
are invariant, when suitably normalized, to changes in spatial
scale. The translation- and scale-invariance assumptions, coupled with an assumption of Gaussianity, provides the baseline
model found throughout the engineering literature: images are
samples of a Gaussian random field, with variance falling as
in the frequency domain. In the context of denoising, if one
assumes the noise is additive and independent of the signal, and
is also a Gaussian sample, then the optimal estimator is linear.

image statistics are spatially homogeneous What does it mean? Does image statistics means the histogram?

an assumption of Gaussianity What is Gaussian?

images are samples of a Gaussian random field If one image is considered as a random field, can histograms be used? The assumption that each pixel obeys the same probability distribution will not hold.


texts: Attenuate the low frequencies in a speech wave

texts:
I am designing an FIR filter to attenuate the frequencies below 300Hz. I designed the filter using the scipy functions and the code is as below.

from numpy import cos, sin, pi, absolute, arange
from scipy.signal import kaiserord, lfilter, firwin, freqz
from pylab import figure, clf, plot, xlabel, ylabel, xlim, ylim, title, grid,
axes, show

nyq_rate = 48000 / 2
width = 100 / nyq_rate
ripple_db = 60.0
cutoff_hz = 300.0

N, beta = kaiserord(ripple_db, width)
taps = firwin(N, cutoff_hz/nyq_rate, window=('kaiser', beta), pass_zero='highpass')
w, h = freqz(taps, worN=512)

plot((w/pi)*nyq_rate, absolute(h), linewidth=2)
xlabel('Frequency (Hz)')
ylabel('Gain')
title('Frequency Response')
ylim(-0.05, 1.05)
grid(True)

show()

When I a execute it, the following error pops up.

ValueError: A filter with an even number of coefficients must have zero response at the Nyquist frequency.

I am not sure what is going wrong. Any help is appreciated.


texts: image compression versus image denoising

texts:
Wavelet based image denoising may be performed by thresholding (selecting a threshold value, and discarding all values below the threshold. Wavelet-based image compression  may also be performed by a similar way. What is the difference then between the two operations? can we consider denoising a certain type of compression?
Discarding in case of denoising means removing the coefficients below the threshold, while in compression all values below the threshold are set to zero? why setting the values to zero reduces the entropy? they are not removed, and if the image is transmitted across a wireless channel, the zero values are coded and transmitted.


texts:
I have to detect speech intervals in large pre-recorded files in my project. I think, there won't be so much noise in the background (audio will be recordered in the room or even in the studio), but it still can be.

So, what are good VAD algorithms that I can use (algorithms, not libraries)?


texts: What Is the Difference between RLS, LMS and Wiener Filter? When Is One Preferred Over Another?

texts:
I'm dealing with a channel equalization problem where the channel is modeled as a WSS process.
I understand LMS utilities a Wiener-like approach, ie it converges to the optimal (wiener) solution.

I understand RLS converges to the normal solution, assuming the statistics of the WSS process are unknown.

I would like to know:

What class of predictors can Wiener, LMS, and RLS be classified within? Is it correct to define Wiener as 'Optimal (in MSE sense)', LMS as 'Stochastic gradient predictors', and RLS as a 'Linear predictor'? And what class of filters?
When is one solution preferred to the other and why?
In particular, when defining the cost function with the MSE, what can we achieve? And when we define it simply with the squared error?


texts:
I am looking for some suggestions regarding clustering.
Lets say
I have 5 subjects (1, 2, 3, 4 and 5)

1 says  2 and 3 are similar to 1
2 says 1 is similar 2
3 says 5 is similar to 3
4 says no one is similar to 4
5 says 3 is similar to 5

So we have a matrix like

1 - 2 3,
2 - 1,
3 - 5,
4 - 0,
5 - 3

I need to cluster saying

cluster1 - 1 and 2
cluster2 - 4
cluster3 - 3 and 5

any suggestions to do clustering based on this type of data?
most clustering are based on calculating the distance difference. But here I think that is not the case.
Thank you!


texts: DSP processor: some beginner's questions

texts:
I have started making a project involving FFT to some accoustic signal(so far I completed some theory), with a DSP processor, and according to some calculations, make the output going to a bluetooth (or any other wireless device) chip, which will transmit to a bluetooth receiver.

So far I have seen wireless chips, and DSP proccessors, but not from the same company.

Programming each chip that came from a different company requires different softwares or big differences in commands?
Is there a company making both DSPs and bluetooth?
If you have some tips regarding the chips I will be happy to read them :) (easiest way to begin, where I should go into the architecture and what is less importent and can look at it from a bigger picture)


texts:
I'm trying to create a simple NFC/RFID software simulator and am having a hard time understanding the math fully. I know that NFC tags respond by load modulating the 13.56 MHz wave that the reader is sending it. I'm pretty sure NFC tags use a subcarrier wave with a frequency of ~847 kHz. Where I'm getting confused is how to model the result of the load modulation.

Can I simply take the 13.56 MHz wave and do a point-wise multiplication with the 847 kHz wave? Using the Manchester Encoder, this nets me a signal that looks like this:


texts: which features fundamental frequency is correlated?

texts:
I'm unable to compute $f_0$ (fundamental frequency) in librosa feature extraction. By ready much in github issues check the second comment. I see that $f_0$ is correlated with some other features (like zero_crosssing) easy to extract from librosa.

What are these features except for that one I give? Is this correlation super high so that they can replace $f_0$?

data sample

site for data


texts: Can LiDaR be used for volume measurement?

texts:
I need to measure volume with LiDaRs. However, they seem to only capture the surface of an object. More precisely, the surface that is seen by the sensor. Therefore, the cloud point data that it generates can't know the object's dimensions.

I've seen a video of where they measure stockpiles of sand. However, I guess the image is taken from above. This is a specific case where it's possible, because the LiDaR gives the distance to the top of the 'cone' of sand, and also the distance to the ground, so we can use simple math to estimate.

But in general, it can't be done. Or am I wrong?


texts: Representing a continuous LTI system as a discrete one

texts:
I am aware that there are different ways to represent a continuous time system in discrete domain (e.g. bilinear transform, impulse invariance transform).

But my problem is as follows: Given an arbitrary LTI system $h_c(t)$, its output is given as $y(t) = (x * h_c)(t)$.

Now suppose $x(t)$ is given as:

$$
x(t) = \sum_{n=-\infty}^{\infty} x[n] \operatorname{sinc}\left(\frac{t-n T}{T}\right)
$$

i.e., Whittaker interpolation formula. I can then write a discrete-time system:

$$
y[n] = \sum_{q=-\infty}^{\infty} h[q] x[n-q] ,
$$

such that $y[n]$ is identical to $y(n T)$.

My question: What is the relation between $h[n]$ and $h_c(t)$?

There must be an exact one and it is neither given by impulse invariance nor bilinear transform.
I am aware that when $H_c(f)$ is bandlimited to $1/(2B)$, the answer is just impulse invariance transform, i.e., $h[n] = h_c(nT)$.
If this is not satisfied, it will result in aliasing but this should not prevent such a relationship from existing.


texts: Estimating the standard deviation of Gaussian filter from smoothed image

texts:
Firstly, let's say that in order to smooth an image, I convolve it with a Gaussian function having standard deviation $\sigma_x$ and $\sigma_y$. I am now interested in knowing if there exist methods for estimating $\sigma_x$ and $\sigma_y$ from the smoothed image?
Secondly, to potentially make things more complicated, let's say the image pixels instead are drawn from a zero mean unit variance normal distribution (top image), which is then convolved as above (bottom image), could the standard deviations be estimated from the smoothed image?
Here is the MATLAB code used to generate the images. What I would like to achieve is to estimate the standard deviations, which in this case were $\sigma_x=2$ and $\sigma_y=2$.
img = randn(128,128);
figure(1); imagesc(img); colormap(gray); axis off; title('Noise image')
nimg = imgaussfilt(img, [2  2]);
figure(2); imagesc(nimg); colormap(gray); axis off; title('Smoothed noise image')


texts: Understanding linear predictive coding in MATLAB

texts:
I want to test my understanding of linear prediction by running it on some test data in MATLAB. The way I understand it is if I have some data that is correlated, I can encode the signal with linear prediction as follows: $$x(n) = \sum_{i=1}^{p} a(i) x(n-i) + \epsilon(n)$$ where $[a(i)..... a(p)]$ are the coefficients of the AR model of $x(n)$ and $\epsilon(n)$ is a zero-mean white noise process. Thus, the signal is completely determined by its coefficients and the variance of $\epsilon(n)$.

Here's my code for generating the coefficients and variance (sorry I couldn't figure out how to get code in with rest of text):

I'm confused about the decoder side however. I now have my prediction coefficients and my error variance, but don't quite know what to do with them. Is it as simple as creating white noise with the variance that was encoded, and then passing it through the inverse filter with the coefficients encoded? Or is there something else I'm missing?


texts: Smoothing contours for contour analysis for character recognition

texts:
I am making a character recognition library using contour analysis. Contours are sequencies of complex numbers X + j*Y (in fact in contour analysis they are defined as ΔX + j*ΔY,  but for smoothing I use the repr without delta), describing displacements of points relative to each other. Looking at FFT I saw a lot of ringing at high frequencies, even though the contours end in the same point they begin in, they are periodic.  I had a guess that it may be because of sharp angles in contours, where complex argument changes rapidly. (in fact it haven't helped, the ringing is present even in 0 and O outlines, wich have no sharp angles, but I guess such smoothing may still be beneficial, because it would make the func analytical and because it would unify shapes of the same glyphs in different fonts, where one font has sharp angles and another one doesn't). I have tried gaussian lowpass filter of the original signal with adaptive sigma (scanned sigma in wide range, for each sigma computed L2 loss between original shape and smoothed one, detected the knee on log plot (the dependence can be modelled as a + b*exp(-k*(sigma - sigma0)), so the log plot looks like 2 lines with an angle between them, when sigma is inadequate, the contour is completely disrupted and is open, and the adequate sigma may be different for different contours by 2 orders of magnitude) and selected the point on knee, for most of characters it gave good enough results, but not for digits, especially for 9 where lower part is sharp, which requires large sigmas about 150, when most of glyphs are OK with about 5-30). I don't like the lowpass approach because it is applied for all angles equally (so letting more high freqs for the lower part of 9 means we let them for the rest of the contour), but it may be beneficial to filter each angle individually. I have also tried smoothing of argument and modulus with absolutely garbage results. I have also tried some smoothing with wavelets, but again, dwt gives garbage results, maybe should try with mexican hat.
What would you advice me? Are there any established method for such kind of filtering?


texts: Gammatone filter vs 2D FFT for spectograms

texts:
I am working on speech segeration and each source I am reading , spectograms are being made by filterbanks which uses gammatone filters . I can't find a proper c++ source code which would make me understand process behind gammafilters, completely.

Now I am curious what is its difference than 2d FFT, I mean why all sources prefer that way(gammatone filters), but not taking FFT for a time period ?


texts: Find the area of all triangles from an output of Delaunay Triangulation

texts:
I am detecting roadline pattern in an image. I have applied delaunay triangulation.
I get 160 triangles in that. Now I need to find the area for each triangle. Can you kindly help me. Only after this I should proceed with my project. Please help me...


texts: What is the relation between the PSDs of filter input and output called? $R_Y = |H|^2R_X$

texts:
If a wide-sense stationary signal $X$ is fed to an LTI filter with the transfer function $H$, the power spectral density (PSD) of the output $Y$ can be expressed as:

$$R_Y(f) = \left|H(f)\right|^2R_X(f)$$

where $R_X$ denotes the PSD of $X$.

Does this relation have a common name?


texts: (Unscented) Kalman Filter with variable state dimensions

texts:
i have to estimate a process which changes over time, not with respect to the system-evolution or the measurement-function, but regarding the number of objects that have to be estimated. So every iteration I have to estimate e.g. 5 more state variables of a new object. Do you know method to do this with a Kalman or Particle Filter?

Thank you very much!


texts: What does it mean for the DFT phase to be relative to a cosine wave?

texts:
The following paragraph from Understanding Digital Signal Processing got me puzzled:

  The answer is: The DFT phase at the frequency $mf_s/N$ is relative to a cosine
  wave at that same frequency of $mf_s/N$ Hz where $m = 1, 2, 3, ..., N−1$. For example, the phase of $X(1)$ is −90 degrees, so the input sinusoid whose frequency is $1\cdot f_s/N = 1000$ Hz was a cosine wave having an initial phase
  shift of −90 degrees.

I have no idea how the DFT phase is related to a cosine wave in the way just mentioned above. Any hints would be greatly appreciated.


texts: Model Validation After Estimation for System Identification Task (Assistance with MATLAB Code)

texts:
QUESTION: I want to determine how well the estimated model fits to the future new data. How do I validate the estimated model...what is the procedure? After system identification, how to do model validation with the channel estimates? Please help.

In this example, I am using Least Mean Squares for system identification.
The system has coefficients / impulse response given by $\mathbf{h}$ which are estimated. The input signal to the system is $d$. The noisy output is $x$ where, the noise $e$ is Additive White Gaussian. I am trying to estimate the coefficients -- system identification using Least Mean Square and estimating the input $d$ as well. I am using an equalizer for this.

Thank you.

$x_n = r_n + e_n = \mathbf{h}^T \mathbf{d} + e_n$ where $\mathbf{h}$ represents the coefficients, $d$ is the input and $e_n$ is Additive White Gaussian Noise.

%% Channel and noise level
h = [0.9 0.3 -0.1]; % Channel
SNRr = 10;              % Noise Level

%% Input/Output data
N = 1000;               % Number of samples
Bits = 2;               % Number of bits for modulation (2-bit for Binary modulation)
data = randi([0 1],1,N);        % Random signal
d = real(pskmod(data,Bits));    % BPSK Modulated signal (desired/output)
r = filter(h,1,d);              % Signal after passing through channel
x = awgn(r, SNRr);              % Noisy Signal after channel (given/input)

%% LMS parameters
epoch = 10;        % Number of epochs (training repetation)
eta = 1e-3;         % Learning rate / step size
order=10;           % Order of the equalizer

U = zeros(1,order); % Input frame
W = zeros(1,order); % Initial Weigths

%% Algorithm
To get this we have to find error between input and output. As I understood `x` is an input for our model and `y` is an output.

    %% Algorithm
    for k = 1 : epoch
        for n = 1 : N
            U(1,2:end) = U(1,1:end-1);  % Sliding window
            U(1,1) = x(n);              % Present Input

            y(n) = (W)*U';             % Calculating output of LMS
            e(n) = x(n) - y(n);           % Instantaneous error
            W = W +  eta * e(n) * U ;  % Weight update rule of LMS
            J(k,n) = e(n) * (e(n))';        % Instantaneous square error
        end
    end

UPDATE : Please find below the picture that shows the step at which I am stuck. In the picture, the plus sign is the addition of Additive White Gaussian noise. I think the outcome of system identification of the unknown system is that the system should respond by producing the same output when given the same input. Or to predict. I don't want the MSE.


texts: What does frequency weighting an acceleration signal mean? And How do I frequency weight the raw acceleration data collected?

texts:
Disclaimer: I have very little knowledge in signal processing.
I'm trying to calculate a Whole Body Vibration(WBV) measure called Vibration Dose value(VDV).
$$VDV = \left(\int_{0}^{T}a(t)^4\,dt\right)^{1/4}$$
where $a(t)$ is a frequency weighted acceleration with weights $W_d$ for x, y acceleration components and $W_k$ for z acceleration component, over the frequency range 0.5 - 80 Hz.
I've read one literature saying since horizontal accelerations are more harmful, the weighting coefficients should be 1.4 for x, y and 1 for z axis - I do not know where this comes from.
Some literatures also show the following plot for frequency weightings used for analysis of acceleration signals.

Questions/Doubts:

I do not understand what the plot means and how to get weightings from it. But when I think about it, I feel like it has something to do with the acceleration data collected over 0.5 - 80 Hz and get the weightings from there. The thing is the weightings are not constant in the plot for the mentioned frequency region.

Also, how do I use the weightings with the raw-data collected to get frequency-weighted acceleration data?

Do I multiply the discrete raw-data with the the corresponding weights for each axis to get frequency weighted acceleration?


texts: identification of sounds within audio signals

texts:
I am looking for methods to identify sounds within audio files.  I was hoping to find some ready-made user-friendly software to do this but haven't found it yet.  I am familiar with Matlab and some C++ and have mech. eng. background so I can do some coding work myself to implement a solution but I'm not a serious programmer.

From my online searches I seem to have found there are 2 potential methods; cross correlation and fingerprinting.  It seems to me that the audio fingerprinting method is potentially more accurate than raw cross correlation.  At this point this investigation is for my own hobby purposes to be implemented with a robot.

Can anyone with related experience comment which approach may be more successful?    It seems there are several audio fingerprinting methods and some open source codes even for matlab so I am intrigued, however, these methods are mostly developed to identify entire songs.

The sounds I want to identify are short (from < 1s to ~5s).  I was thinking if the analysis sample rate was increased to fill the short sound file that maybe the method could work with very short files such as these sounds, but I do not know the implications for the rest of the techniques of fingerprinting.  Does this seem like a reasonable / possible approach to anyone?  If not are there references for other potentially applicable DSP techniques for this I can research?

Thanks.


texts: Finding Distance between Cameras in Stereo Vision

texts: We know how to create disparity map from stereo vision with OpenCV. My question is How can we find/estimate distance between cameras from two image taken from these cameras in OpenCV?


texts:
Having photo-diodes with a very narrow field of view (+-10 degrees for half power) what should I consider when designing a beam-forming algorithm?

I know that I could use many photo-diodes mounted in an arc to cover 180 degrees for example but the uncertainty of 10 degrees is too big. As an alternative to classical beam-forming, what would be the methods to use to isolate a signal coming from one direction with a high precision (under 1 degree)?

My goal is to analyze the flickering of lamps, knowing their position from analyzing camera data, I want to isolate the signal coming from their direction.


texts: The origin of constants in mel-scale formula

texts:
To convert frequency to mel, we usually use formula:

$$\mathrm{mel}(f) = 1127 \ln \left(1  + \frac{f}{700}\right)$$

I wonder where are $1127$ and $700$ came from?

I've read the paper which Wikipedia think is the original of MFCC but I still didn't get the origin of those values. I hope somebody here can help me to understand the origin of those values.


texts: Why does noise prevent a (kalman) filter from diverging?

texts:
I'm using a filter (not exactly kalman) of the following form to estimate angles by fusing gyroscope with accelerometer and gyro with magnetometer:

$(1)\quad \hat{\theta}_k = \hat{\theta}^-_{g,k} + \alpha \left( \theta_{a,k} - \hat{\theta}^-_{g,k} \right)$

$(2)\quad \hat{\theta}_k = \hat{\theta}^-_{g,k} + \beta \left( \theta_{m,k} - \hat{\theta}^-_{g,k} \right)$

The angle $\hat{\theta}^-_{g,k}$ is the predicted angle by integrating the gyro angular velocity and $\theta_{a,k}$ is the angle resulting from the accelerometer data. The second equation is the same but for the magnetometer. In my case the factors $\alpha$ and $\beta$ are simply chosen from the interval $[0,1]$.

I know that in a Kalman-Filter the Gain $K$ is affected by the chosen process
$Q$ and measurement $R$ covariance matrices. And if $Q$ is very small compared to $R$ the measurements may be disregarded to much and the filter could diverge.

Now to my specific case. The same gyro is used for the accelerometer and magnetometer. So one would assume to set the gains $\alpha=\beta$. Well, what happens is that due to the more noisy magnetometer data I'm allowed to set $\beta < \alpha$.
What I can't find in the literature is a way to explain why the higher measurement noise allows me to choose a smaller gain for the magnetometer without risking divergence.

In my own words I want to say something like: "The cause is the higher fluctuation  of the angles coming from the magnetometer, which although weighted less (than those of the acelerometer) still correct the angles strong enough 'to the correct direction' counteracting the drift induced by the gyroscope"

The problem is that I need to write this in a bit more scientific way, without going overboard. Any literature hints or advises would be greatly appreciated.


texts: Registration of segemented medical images

texts:
I’m looking to register images based on probability maps (or possibly the binary images) resulting from segmentation of medical images of blood vessels with a circular FOV using python.
Are there any good libraries with algorithms that might be particularly suited for this task? I’ve come across SimpleITK, PyElastix and ANTsPy which seem promising, but I’m not sure which one would be more suited for the task and or which methods to look for.


texts: Why do third-octave bands have a ratio of cube root of two?

texts:
Without sounding tautological, I guess it boils down to the definition of the third octave, which is not: 2/3*Fc

but defined as the cube root of 2 ratio between frequencies.

Why is a third-octave not a "third of double the frequency" and instead "the cube root"? How does the square root play into this? Is there a log base 2 upon which this definition of a third octave is based?

To obtain the center frequency, it's the geometric mean of the upper and lower bounds, which gives you your addition sqrt 2, which gives you the upper bound Fc * 2^(1/6) = 2^(1/3) * sqrt(2) = 2^(1/3*1/2) and Fc / 2^(1/6) for the lower bound. Most tables start with 1kHz


texts: Considering the FFT of Real & Complex Signals

texts:
I've been implementing a website to perform the FFT of various signals, real & complex.

Examining the first example, a real signal $x[n] = 10 cos(2\pi\times4n)$, I got the following FFT:

Which was exactly what I expected - two nice peaks of half amplitude at $\pm 4$

So I then extended to the FFT of the complex signal $x[n] = 10e^{j2\pi\times4n}$ (or equivalently $x[n] = 10cos(2\pi\times4n) + j10sin(2\pi\times4n)$). This is shown in the time domain as;

However, this time I got the following as the FFT, however, it now only has a single peak at $+4$, rather than the $\pm4$ mirrored peak I was expecting, and received in the real signal.

After reading through a wide number of articles relating to the conjugate symmetric property of the FFT with regard to real, even signals that states $x[n] => F*(\omega) = F(-\omega)$.

However, this doesn't help me understand what the FFT of a complex signal should look like - i.e. if my figure is correct?  How should an FFT for a real/complex/imaginary signal appear in terms of mirroring and symmetry?

NB: My own way of justifying this so far is that for a real signal, $cos(2\pi ft) = \frac{1}{2}(e^{2\pi ft}+e^{-2\pi ft})$ which creates negative frequencies - hence the mirroring, whilst the FFT of $e^{2\pi ft}$ directly does not...however I may be completely wrong!


texts: What does it mean in image processing when a filter is called non-linear?

texts:
In image processing, what does it mean when a filter is called non-linear?

Does it mean the equation of the filter contains derivatives and if it didn't, it would have been called linear?


texts: Beam width of linear array using MVDR beamformer

texts:
I did delay and sum beamforming technique and MVDR beamforming technique in MATLAB in time domain, but I could not make a comparison between the beam patterns as both showed same beam width. But when I did it in frequency domain, I could differentiate both the techniques as MVDR beamformer showed better resolution( low beam width) compared to delay and sum bemaformer.
I used 10 array elements, with input signal sine added with noise and the steering angle is 20 degrees. Is there something wrong with my MVDR code? Please help.

    %%
clc;
clear all;
close all;

%% Time specifications:
   Fs = 25e4;                   % samples per second
   dt = 1/Fs;                   % seconds per sample
   StopTime = 1e-3;  %0.952e-3;           % seconds
   t = (0:dt:StopTime-dt)';     % seconds

   %% Sine wave:
   Fc = 8e3;                     % hertz
   signal = sin(2*pi*Fc*t);
   x=signal+randn(size(t));
%%
N = 10;
d = 0.5;
plotangl = -90:90;
tm = plotangl * pi/180;
elementPos = (0:N-1)*d;
thetasteer=20;
c=1150;
k=exp(-1j*2*pi*elementPos'*sin(thetasteer*pi/180)/c);
x1=k*x';%10x250
Sn=(x1*x1');
a=0.01.*eye(10);
Sn1=Sn+a;

%%

as=exp(-1j*2*pi*elementPos*sin(thetasteer*pi/180));%1x10
w1=(inv(Sn1)*as');
w2=(conj(as)*inv(Sn1));
w3=w2*as';
w=w1/w3;%10x1
%w=ones(10,1);%10x1
W=w*as;%10x10
%%
vv = exp (1j *2*pi*d* (0: N-1)'* (sin (tm)));%10x181
B1=W*vv;
B2=B1'*x1;
B3=abs(B2/max(B2))';%normalize
figure(2);subplot(2,1,1);polar (plotangl*pi/180, B3);title('polar plot of mvdr ');

B = 10*log10(B3);
figure(2);
subplot(2,1,2);
plot(plotangl,B);
grid on
xlabel(' Angle (degrees)');
ylabel('Normalized Beam Power[dB]');
legend('20 deg');
title('mvdr Array Pattern, 10 array elements');


texts: A better explaination for 'there's no flipping of the impulse response'

texts:
I showed the question about flipping the impulse response to some math teachers and electrical engineers at an university. They read Dilip's answer and thought that it was hard to understand what Dilip meant and it was simply not true...

Could someone confirm that it really isn't true what Dilip Sarwate wrote. And explain it in a way that is easier to read.

See: Flipping the impulse response in convolution

  There is no "flipping" of the impulse response by a linear (time-invariant) system. The output of a linear time-invariant system is the sum of scaled and time-delayed versions of the impulse response, not the "flipped" impulse response.


texts: Response of an unstable LTI system to random signals

texts:
A convenient approach for studying the response of a stable LTI system with impulse response $h(t)$ to a WSS stochastic input $X(t)$ is to look at the power spectral density (PSD) of the output $Y(t)$ as $S_Y(f) = \vert H(f) \vert^2 S_X(f)$, where $H(f)$ is the Fourier transform of $h(t)$ and $S_X(f)$ and $S_Y(f)$ are the PSDs of the input and output, respectively. For simplicity, let's assume that $X(t)$ is zero-mean.
Now if I have an unstable LTI system for which $h(t)$ may not even have a Fourier transform, this method naturally won't work anymore. Is there a similar straightforward approach for looking at the statistical properties of the output of an unstable system?
The only approach I can think of is to directly look at the convolution integral $R_Y(\tau) = h(\tau) \star R_X(\tau) \star h(-\tau)$ but that's not as intuitive as the frequency-domain analysis we have for stable systems.


texts:
I would like to know what code rates for forward error correction the physical layer of IEEE 802.11b uses for the different supported data rates. So far I didn't find any source for that. Actually in the literature I found on 802.11b and DSSS code rates are never mentioned at all and hence I wonder if forward error correction is even applied.

Thanks in advance.

EDIT:

The 802.11 standard also doesn't mention FEC for the normal DSSS in 802.11b so I think it is not applied.

However for completeness there is an optional mode specified (DSSS/PBCC) which uses a binary convolutional coder with a code rate of 1/2.


texts: cascade realisation from direct realisation

texts:
I am trying to convert filter realisation from Direct form 1 to cascade using function provided from Digital signal processing by Proakis. I designed lowpass IIR filter and extracted numerator and denominator coefficients. I used fvtool to plot pole zero as well as magnitude response. But when I use dir2cas function provided in textbook, matlab shows an error while plotting using fvtool. Can someone help?
The filter function:
filte = designfilt('lowpassiir','PassbandRipple',1,'StopbandAttenuation',30, ...
'PassbandFrequency', 3.4e3, 'StopbandFrequency', 4e3, ...
'SampleRate', 16e3);
sos = filte.Coefficients;
[b,a] = sos2tf(filte.Coefficients);
%fvtool(sos);

[b0, B0, A0] = dir2cas(b,a);
fvtool(B0,A0);

The direct to cascade function:
function [b0, B, A] = dir2cas(b,a);
b0 = b(1);
b = b/b0;
a0 = a(1);
a = a/a0;

b0 = b0/a0;
M = length(b);
N = length(a);

if N >M
    b = [b zeros(1, N-M)];
elseif M > N
    a = [a zeros(1, N-M)];
    N = M;
else
    NM = 0;
end

k = floor(N/2);
B = zeros(k,3);
A = zeros(k,3);

if k*2 == N;
    b = [b 0];
    a = [a 0];
end

broots = cplxpair(roots(b));
aroots = cplxpair(roots(a));
for i = 1:2:2*k
    Brow = broots(i:1:i+1,:);
    Brow = real(poly(Brow));
    B(fix((i +1)/2),:) = Brow;
    Arow = aroots(i:1:i+1,:);
    Arow = real(poly(Arow));
    A(fix((i+1)/2),:) = Arow;
end


texts: reduce harmonics produced by microcontroller

texts:
I'm generating an 18kHz sine signal using a dsPIC microcontroller at 44100kHz (I'm not sure I can call it sampling rate, maybe generation rate, although the concept is the same).
The dsPIC's DAC then feeds an LM386 amplifier and then an 8-ohm speaker.

Since the generation method is digital, I get harmonics (36kHz) which get aliased, and I hear the parasitic low frequency (8.1kHz) which is something I wish to get rid off.

I was told that I should put an LPF with a sharp cutoff just above 18kHz at the output of the microcontroller so that those high frequency harmonics don't get amplified, but my intuition tells me that I should put an HPF, since by the time the signal is out of the microcontroller it already contains those low frequencies and an LPF will not help.

Am I correct?
Thanks!


texts:
I want to know that if I have any signal given how will I draw it according to the following equation

$$x(t-1)-1/2$$

what will be the role of $1/2$ when drawing the new signal?


texts: Multiplier in digital signal processing?

texts:
whenever we start working on Discrete Cosine Transform(DCT), Loeffler algorithm a key role. Furthur if we approach hardware implementation of this algorithm, we find methods based on Distributed Arithmetic and Shift-and-Add. Both of these method stress on multiplierless circuits. In both cases multiplication is either performed by shift and adding or using a ROM which stores the look-up tables.

The point I am asking here is why everyone is neglecting multipliers replacing them by adders,shift registers in circuits. We can make a N-bit multiplier using adders and registers. Can someone highlight the negative impact of using multipliers?


texts:
In QPSK, after splitting the odd and even bits into the I and Q channels, and then multiplying them with the sine and cosine function, what next am I suppose to do?

Do I rearrange them back into their odd and even positions?

Also, in OQPSK do I make the first bit of my Q array a dummy bit zero to represent the half symbol delay in the Q channel ?


texts: Is there a way to go from a set of (F/D)FT values to FIR coefficients?

texts:
I'm not yet well educated on the DSP subject, but I've initiated a project where I will do some audio filtering.
My intuition tells me that there is a link between the coefficients of a FIR filter and the response of the audio indicated by values of a fourier transform.

My question; is there a way to go from FFT data to FIR coefficients?
What about the other way around?

I apologize that I probably do not use the correct terms.
Thank you for any response :)

EDIT: I got a request to make this clearer, so here is some pseudo code of what I want to do given a stream of audio data:

fftdata = fft(stream)
soSomethingTo(fftdata) //for instance increase bass response
FIRcoef = translate(fftdata)
stream = fir(stream, FIRcoef)

So, this would analyze the stream and create a FIR that slightly modifies the fft response.


texts: Filtering out different narrow-band frequencies at once

texts:
I have asked a closely related question on SO at https://stackoverflow.com/questions/55168460/python-implementation-for-filtering-out-multiple-distinct-narrow-band-frequencie

but I am still unclear if my problem is an implementation issue or more theoretical.

I have the following signal and its power spectrum:

I would like to get rid of the most important periodicities using Python: 24 hr, 12 hr, 8 hr, 6 hr and 4 hr. The signal is sampled every 6 min over 15 days. Ultimately I'll need to do this on other durations, these are just subsets of the data i'm working on.

The scipy.signal provides various tools for filtering and it's difficult to see what's the most appropriate for this kind of data: I need to minimize ringing, so a sharp cut at the peak frequencies is not preferred, i.e., I do not just want to do something like (e.g to eliminate a 6 hr periodicity):

from scipy import fftpack

time_step = 6*60
peak_freq = 1 / 6 / 3600
sig_fft = fftpack.fft(sig)
sample_freq = fftpack.fftfreq(sig.size, d=time_step)
sig_fft[np.abs(sample_freq) > peak_freq] = 0
filtered_sig = np.real(fftpack.ifft(sig_fft))

Instead, I read it would better to use scipy.signal.filtfilt in combination with a choice of function that create smoother filters like scipy.signal.iirnotch:

fs = 1/time_step
Q = 30.0
b, a = iirnotch(peak_freq, Q, fs=fs)
filtered_data = filtfilt(b, a, data)

However, this way of building the filter does not give a transfer function that I can multiply for different peak frequencies that i'd like to get rid of. In theory once we have different transfer function, e.g. H1(w), H2(w), ... Hn(w) where Hi(w), i=1,...N filtering peak frequencies f1, f2, ... fN, then the transfer function to filter out all of them would be H(w) = H1(w) * H2(w) *... *Hn(w) and there would be only one FFT and inverse FFT needed.

What Python functions can give me that semantics?


texts:
Suppose $x(t)$ is a signal containing a voice. How can one derive a signal playing the same voice faster.

I tried $x(t+\lfloor{100t\rfloor}/100)$ to double the speed; But it adds a buzz sound. Is there a better formula?

Clearly $x(2t)$ changes the voice. I want to change just the speed.


texts: Best way to resample an OFDM signal without interpolating + filtering?

texts:
I am working on a custom transceiver with a sampling rate of 3.84 MHz (256 OFDM subcarriers at 15 kHz, although 56 subcarriers are null). I would like to resample the signal to 5 MHz, in order to use a pair of USRPs N210 to communicate each other, among other things.

I can't resample this signal using an interpolation plus filtering approach, as it should be computed in real time (I would need to interpolate the signals up to 480 MHz...).

So I tried an FFT-based approach described by Jim Clay here. To sum up, I first compute the FFT of the signal with length 960 (decimation factor), then I pad the frequency content with zeros, and finally I compute the time domain 5 MHz signal by computing the IFFT with length 1250 (upsampling factor). In this way, I am able to resample the signals by 125/96. I don't know how to explain this, but it is like many samples are sampled at the proper time, whereas many of them not. I mean, there is a time synchronization problem.

I realized that I was using exactly the same number of subcarriers and subcarrier spacing as 3 MHz LTE channels, so I decided to test my resampling approach in a much more mature open source platform like OpenAirInterface (OpenAirInterface allows to deploy an LTE testbed, so I can connect a commercial LTE device like my phone to a base station deployed on an SDR radio).

As my mobile phone does not recognise <5 MHz LTE channels, I decided to resample one 5 MHz channel from 7.68 MHz to 10 MHz (instead of resampling from 3.84 MHz to 5 MHz). My mobile phone was able to decode the signal transmited by the base station (in fact, it got connected to the network and I achieved the same throughputs in the downlink channel I got with the default sampling rate). However, I think that I'm facing exactly the same problem I got with my transceiver. The signal received by the base station from my phone seems not to be syncronized, so the base station drops most of the data. In addition, the base station logs report that there is a time desynchronization, and that this desynchronization varies over the time. However, if I choose an output sampling rate multiple of the original one (for instance, 15.36 MHz and 30.72 MHz), then it works perfectly on both downlink and uplink communications.

I am just beginning to study signal processing, so I recon that maybe this is a dumb question, but I can't figure out why I am not able to resample the signals in this way.

Is there something wrong with my way of resampling the signal? Is there a better way to do this? Can't I resample the signals to a sampling rate which is not an integer multiple of the subcarrier spacing?

Thanks in advance.


texts: what is the difference between YUV format and HSV format?

texts: i wonder why HSV and YUV are different formats, even though they both works similarly (based on the brightness), if not what is the difference and i have confusions with YPbPr and YCbCr , can anyone give directions to understand these color formats.


texts: How to Use Time Difference of Arrival (TDOA) for a Transmitter Localization

texts: Does anybody know a source that illustrates the algorithm to use TDOA method to locate a transmitter? Would the equations to solve (x, y, z) of the transmitter location linear or non-linear? How about the iterative algorithm to locate a transmitter based on TDOA measurements?


texts:
In my signal processing pipeline, I normally expect data sampled at 100Hz, on which I then apply a median filter of width 10.
My question is: How should I change the width for data sampled at different rates?
For example, say an incoming data is sampled at 50Hz. Should I then use a median filter of width 5 to be consistent? In other words, should I choose the median filter based on the physical time length (0.1 seconds in our case) instead of number of ticks?


texts:
I am trying to answer the following question:

Is the system described by equation:

$$y[n]=0.5y[n-1]+x[n]-0.5x[n-1]$$

an IIR filter? My answer is yes.

Thank you


texts: differences between two L1 norm minization schemes

texts:
I was reading and working with L1 regularized least squares, where:
$$ \arg \min_{\boldsymbol{x}} \frac{1}{2} {\left\| A \boldsymbol{x} - \boldsymbol{y} \right\|}_{2}^{2} + \lambda {\left\| \boldsymbol{x} \right\|}_{1} $$
is used to solve for sparse solutions in $\boldsymbol{x}$. However, I also stumbled on a different minimization for a similar case:
$$ \arg \min_{\boldsymbol{x}} {\left\| \boldsymbol{x} \right\|}_{1}     \mbox{ subject to }   {\left\| A \boldsymbol{x} - \boldsymbol{y} \right\|}_{1}< \delta $$
so in the second case the expression is not unconstrained, but they switched both parts to L1 norm... What are the reasons to do so if both look for sparse solutions in  $\boldsymbol{x}$ ?


texts: How the increasing of sampling frequency in OFDM didn't cause increase on the required channel bandwidth

texts: In OFDM, how the increasing of sampling frequency didn't cause increase on the required channel bandwidth (fs>>BW), as i know sampling frequency means number of samples per second, if this number of samples increased by logic the the needed bandwidth increase.


texts: Differential Equations applications in Signal Processing

texts:
Does differential and partial differential equations subject has applications in Signal Processing? I have basic DSP background and know Matrix algebra and Fourier transforms very well, but I am not sure how differential equations would fit in.

I am asking this because I have the option of taking 2 graduate level diff. equations courses(linear, non-linear and dynamical systems) and am wondering if it would be insightful or practical.


texts: Crash course on turning engineering formulae into computer code?

texts:
I'm trying to teach myself about the basics of feature extraction from digital signals. Specifically, I want to try monophonic then polyphonic pitch recognition. I don't have any university level math or computing science experience (I'm self-taught), so I find the formulas in many texts and websites to be a road-block because I don't understand what most of the Greek symbols mean. E.g. I had to search and find that $ \Sigma $ is called Sigma and that it means "summation"...

As a self-taught recording engineer I have a decent understanding of what needs to happen from a high level:

Separate digital signal into component frequencies
Analyse the relative strength of each frequency bin
Evaluate the strongest frequencies and compare against known values to determine most likely chord

When I start trying to do any reading about these theories I can't translate it into code because I have no idea what the mathematical explanations are trying to tell me.

Maybe this is a question for a math forum, but I figured that a group of DSP enthusiasts and experts could help me fill in the gaps between my coding knowledge and my basic understanding of sound. I get that a Fast Fourier Transform takes a signal and transforms it from the time domain into the frequency domain, but I don't understand the process when I see it laid out in mathematical terms.

How does someone in my position move forward? What kind of resources exist to help someone with high-school algebra (but a "can-do" attitude!) learn enough to get comfortable with basic signal processing? Is there a less "math-intensive" way to gain an understanding of what needs to happen that could lead to a better understanding of the symbols and formulas commonly used?


texts: How to characterize the regularity of rhythm?

texts:
Again, my snoring detector:

When I look at the rhythm of snoring vs the rhythm of talking in terms of peaks/events (which would represent snores) per hour, there's not much difference -- they range from roughly 500 to 900 per hour.  But it occurred to me that perhaps there's a significant difference in the regularity of the rhythm.  In particular, I suspect that talking would have a more irregular rhythm than snoring, and I was wondering what might be some ways to characterize that difference.

Note that this is a bit different from tempo/beat detection in music in that there is no master clock, and individual "beats" are not "skipped" but elongated, so, eg, an autocorrelation would likely not reveal much.

The simplest approach would be to measure standard deviation of the event intervals, but I'm unsure to what extent that would discriminate between apneic breathing (snore, snore, snore, pause, snore) vs simply irregular intervals.  And, as you know, my statistics background is weak.

Any other suggestions?  (Take as a given that I have already discriminated the "events" and can produce a train of intervals, vs deriving rhythm from raw data.)


texts: How to detect lines arranged in a visual pattern in an image?

texts:
I have a black and white image like this:

Visually, there is a clear pattern of black lines evenly separated by somewhat thicker white lines. The problem I need to solve is to automatically detect the black lines and generate the corresponding vector lines for each. What software/library/algorithm can I use to accomplish this?


texts: Decomposing an Image into High Frequency and Low Frequency Parts Using Bilateral Filter

texts: How can we decompose any image (e.g. medical image, satellite image) into high- frequency and low-frequency parts by using a bilateral filter?


texts: Biquad high-pass filter not working as expected

texts:
I'm trying to implement a high-pass filter using the the coefficients described in RBJ's well-known EQ cookbook (see https://www.w3.org/2011/audio/audio-eq-cookbook.html).
However, when I run white noise through the filter, the output doesn't sound high-passed at all, at times it even sounds slightly low-passed.

Here is an audio example with the cut-off frequency being modulated between 20 Hz and 18 kHz and the Q factor being set at 0.707: https://www.youtube.com/watch?v=eGE41VAnn0s

The filter is implemented in C++ as follows:

float process( float const in )
{
    float const omega = PI2 * frequency / 44100.0f;
    float const alpha = std::sin( omega ) / 2.0f * q;

    b2 = b0 = (1 + std::cos( omega )) / 2.0f;
    b1 = -(1 + std::cos( omega ));
    a0 = 1.0f + alpha;
    a1 = -2.0f * std::cos( omega );
    a2 = 1.0f - alpha;

    b0 /= a0; b1 /= a0; b2 /= a0; a1 /= a0; a2 /= a0;

    float const out =
        b0 * in +
        b1 * x1 +
        b2 * x2 -
        a1 * y1 -
        a2 * y2;

    x2 = x1;
    x1 = in;
    y2 = y1;
    y1 = out;

    return out;
}

Oddly enough, I have also tried to use the low-pass coefficients and that seems to work as expected.

Now what's the reason for the high-pass filter above not sounding like it should? Have I made a mistake that I can't find?

Thanks in advance!


texts: Creating an Eye Diagram for QPSK Simulation

texts:
I am trying to implement an eye diagram for an application, where the input signal is QPSK. However, I feel that there is some fundamental concept
concerning these plots that I am missing. Several definitions and descriptions for these diagrams that I have seen are all along the same line:

  The eye diagram repeatedly overlays the time width of n symbols

Which sounds straight forward enough (though there are possibly variations?), but I'm not sure that is all there is to it.

The simulated input signal that I am testing with:

modulated QPSK, generated from random symbols
No raised cosine, RRC, or any filtering
No noise added

Eventually, I will modify the signal (such as adding filtering) to see the effects on the system.

This is the image I get when overlaying the symbols in time (showing 1 symbol per trace):

Since I've never seen any example that looks like this, I tried looking at other variations. Using the eyediagram function in Octave, it produces the barn door (breaking the signal into
the real and complex):

The points on the "door" are just the constellation points received (not the samples). So when I see examples like this, with a noisy signal:

I don't have enough reputation to post another image here, though it would help to explain my question. Similar to the above image: for a noisy signal, the lines of the diagram are fuzzy. It would indicate that there are more analog points used to fill in the plot

Where are the other points coming from to create the noise, if not the received waveform? Then there are the horizontal components of the image. How is it possible to get the horizontal components from a QPSK waveform? Even if separated into I and Q representations? Again, it makes sense when connecting the received constellation point at T intervals, but I do not see how to get this when plotting the signal itself.

What am I missing or not understanding here?

EDIT

I updated the diagram to plot only the received symbols. Previously I was plotting the received
waveform, which was a modulated signal (that is how the first image was produced). Below are two
diagrams showing just the in-phase plot. The second one has noise added:

Without noise, the lines are straight as PSK mentioned in the comments. With noise, the lines are
still straight. Which is the other part of the question. Looking at an example here:

(this is from Matlab example at https://www.mathworks.com/help/comm/gs/scatter-plot-and-eye-diagram-with-matlab-functions.html)

Where do the smooth transitions come from? The lines are not straight. There are other in-between points that are filling in the diagram. Where are they coming from?


texts:
I want to know what is the difference between white noise and WSS white noise. is there any difference between them or they're equal?
and what about white Gaussian Noise?


texts: How to detect "fast" changes in signal processing

texts:
I'm working on a project where we measure the solderability of components. The measured signal is noisy. We need to process the signal in real time so that we are able to recognize the change that begins at the time of 5000 milliseconds.

My system takes sample of real value every 10 miliseconds - but it can be adjusted to slower sampling.

How can I detect this drop at 5000 milliseconds?
What do you think about signal/noise ratio? Should we focus and try to get better signal?
There is a problem that every measure has different results, and sometimes the drop is even smaller than this example.

Link to data files (they are not same with ones used for plots, but they show latest system status)

https://docs.google.com/open?id=0B3wRYK5WB4afV0NEMlZNRHJzVkk
https://docs.google.com/open?id=0B3wRYK5WB4afZ3lIVzhubl9iV0E
https://docs.google.com/open?id=0B3wRYK5WB4afUktnMmxfNHJsQmc
https://docs.google.com/open?id=0B3wRYK5WB4afRmxVYjItQ09PbE0
https://docs.google.com/open?id=0B3wRYK5WB4afU3RhYUxBQzNzVDQ


texts:
I have an $n \times n$ asymmetric convolution kernel, $k(t_1,t_2)$. $k$ is zero everywhere except for in small regions near the corners.

I also have an $n \times n$ image, $f$.

Let $*$ denote circular convolution so that the convolution operator, $K(f) = k*f$, returns an $n \times n$ image.

What is a formula for the transpose of $K$? That is, the operator $K^T$ such that $\langle K(f) ,g \rangle = \langle f, K^T(g) \rangle$.

I worked it out to be $K^T(f) = k(-t_1,-t_2)*f$ but that is not holding up to my checks.

%test how to make convolution transpose

clear all;close all;clc;

n = 1024;

%my kernel, it is complex.
[t1 t2] = meshgrid(1:n,1:n);
k = fft2(exp(-t1/50).*exp(-t2/75));

%convolution functions
convk = @(u) ifftn(fftn(k).*fftn(u));
rk = rot90(k);
convkt = @(u) ifftn(fftn(rk).*fftn(u));

%my images
f = rand(n);
g = rand(n);

trapz(trapz(convk(f).*g)) %<Kf,g>
trapz(trapz(f.*convkt(g))) %<f,Kg>, not the same as the above line...

edit:
$$
\langle k*f,g \rangle = \int_{x,y}g(x,y) \int_{t_1,t_2} k(x - t_1, y-t_2)f(t_1,t_2) dt_1dt_2dxdy
$$
$$
= \int_{t_1,t_2}f(t_1,t_2) \int_{x,y} k(x - t_1, y-t_2)g(x,y) dxdydt_1t_2
$$
$$
= \langle f, k(-1)*g \rangle
$$

edit:
Ok I got it now. There was an off-by-one error. You can see this by examining the (square) circular convolution matrix. This 1D example explains how to do it.

n = 256;

%convolution kernel
k = randn(n,1) + 1j*rand(n,1);

%circular convolution matrix
K = zeros(n);
for j=1:n
    K(:,j) = circshift(k,j-1);
end

%circular convolution fft-based function
convk = @(u) ifft(fft(k).*fft(u));

%the transpose of circular convolution, time-reversed complex-conjugated
%shifted-by-one kernel.
kt = circshift(flipud(k),1);
convkt = @(u) ifft(conj(fft(k)).*fft(u));

%test that they are the same thing
x = randi(100,[n 1]) + 1j*randn(n,1);
y = randn(n,1) + 1j*rand(n,1);
fprintf('The right matrix for K? : %d \n', norm(K*x - convk(x)));
fprintf('The right matrix for Kt? : %d \n', norm(K'*x - convkt(x)));
fprintf('The dot product test : %d \n', dot(convk(x),y) - dot(x,convkt(y)));
fprintf('The dot product test : %d \n', dot(x,convk(y)) - dot(convkt(x),y));

Will output:

The right matrix for K? : 5.246206e-11
The right matrix for Kt? : 3.582131e-11
The dot product test : 3.492460e-10
The dot product test : 9.313226e-10

edit: For 2D, I think I've got it right but I'm seeing errors around $10^{-8}$. I want to just blame round-off since if anything changes in the below code I get gigantic errors.

clear all;close all;clc;

%nxn array
n = 256;

%make convolution kernel
[t1 t2] = meshgrid(1:n,1:n);
k = fft2(exp(-t1/50).*exp(-t2/75));

%circular convolution fft-based function
convk = @(u) ifftn(fftn(k).*fftn(u));

%the transpose of circular convolution, time-reversed complex-conjugated
%shifted-by-one kernel.
kt = rot90(k,2);
kt = conj(kt);
kt = circshift(kt,[1 1]);
convkt = @(u) ifftn(fftn(kt).*fftn(u));

%test that they are the same thing
x = rand(size(k)) + 1j*randn(size(k));
y = randn(size(k)) + 1j*rand(size(k));

%check the output error
fprintf('The dot product test : %d \n', sum(sum(conj(convk(x)).*y)) - sum(sum(conj(x).*convkt(y))) );

edit: Oops, I should be looking at relative error.

abs(sum(sum(conj(convk(x)).*y)) - sum(sum(conj(x).*convkt(y))))/sum(sum(conj(convk(x)).*y))

is close to machine precision.


texts:
I am working of FMCW radar. Below are all the parameters of FMCW radar. How can I Calculate the resolution of my radar

Parameters            Values
Center frequency (fc)     70GHz
Bandwidth (BW)            40 GHz
Sampling frequency (fs)   10 MHz
Sweep time            0.2 ms
Number of periods    10 period


texts:
I am looking at the following system:
$x(n) = A x(n-1) + b$
where x and b are vectors and A is a matrix. How can I derive the stability and causality conditions for such a system using Z transform?
If I apply Z transform to each element of x, I have:
$X(z) = A z^{-1} X(z) + b$
Therefore, $(I - Az^{-1})X(z) = b$. Then,
$X(z) = (I - Az^{-1})^{-1} b$.
Is this correct? What are the conditions for stability and causality?


texts: How to determine a very low frequency signal?

texts:
I have a noisy signal with frequency between 1/3 and 1/5 of the sampling window.

DFT has a very low resolution for low frequency components, what is the best way to find the frequence?


texts: For Direct-Sequence Spread Spectrum, can we reduce the transmit power of the signal to maintain a fixed BER?

texts: How to reduce the transmit power of the signal to maintain a fixed BER in CDMA ? I am thinking noise power spectral density, signal energy , and signal rate.


texts:
It may be a very simple question. We would appreciate any comments, guide or complete solution. We prefer however incomplete solutions but novel practical ideas.
 - How to find the main direction of variation i.e., main diagonal in the following example figure (north-east,south-west)?
Any algorithm and idea for coding or snippet is welcome.

Updates:
We found that the procedure mentioned in the accepted answer is almost PCA (Principal Component Analysis) in its simplest implementation. PCA worked very well. The resulting direction is perfectly matched with what we could expect, visually.


texts:
I've been reading some EEG papers where the authors use a bandpass filter at, say, 1Hz and 30Hz. I've also seen some accelerometer papers where they bandpass at 0.5Hz and 10Hz

What is the difference between a bandpass (1Hz, 30Hz) and just a regular low pass filter at 30Hz?

It seems like they're trying to remove really low frequencies, but does it really make that much of a difference? Is there a particular reason why this is done?


texts:
I want to create a rayleigh fading channel,and my classmate told me that I can create an $N_R \times N_T $ channel $\mathbf H$ with $E[|H_{i,j}|^2]$,that is,$\sqrt{\frac{1}{N_R \times N_T}}\times CN(0,1)$.

Does anyone know why if I want to create a rayleigh fading channel with $E[|H_{i,j}|^2]$,I should multiply $\sqrt{\frac{1}{N_R \times N_T}}$?,how is $\sqrt{\frac{1}{N_R \times N_T}}$  calculated?

$N_R$ is the number of received antennas,and $N_T$ is the number of transmitted antennas


texts: Why do we need to conjugate complex signals in autocorrelation and cross correlation

texts: Why is it necessary to conjugate $f(t)$ while performing auto correlation or cross correlation with respect to $g(t)$, if $f(t)$ and $g(t)$ are complex signals?


texts:
I have just read that the Gibbs phenomenon can cause artifacts in the use of Hilbert transforms for audio processing applications, but the reference contained no more specific information.  Can anyone expand on this remark?  When does the Gibbs phenomenon cause problems for the Hilbert transform, and how does one solve this problem?  Specific references to books or articles, and specific examples of signals with difficulties with Gibbs phenomenon for the Hilbert transform, would be appreciated.  Thanks.

Bruce


texts: GPS satellites send 50 BPS of info apart from 1 MBPS PRN. What is the basis for choosing 50 BPS. Why can it not be 100 or 1500? The reason I am asking this is Almanac download time is 12.5 mins which is quite long.


texts:
I have measured some sinograms of a specific sample. However, there is some wobbling motion that disturbes the resulting images. Since the red upper and lower lines (indicated with black arrows) are expected to be straight without occurring wobbling motion, I want to use this information to correct my images. Is there any method that is able to straighten the lines and transform the image accordingly? I use matlab as programming language but I would also like to hear about general ideas.

The lower image is an approach to correct the image using additional information about the image (although it does not seem to work very good it might be a better starting point as the upper image)


texts: Relation between signal processing and control systems engineering?

texts:
Control systems engineering and Digital signal processing are both important courses/subjects of electrical engineering But how these two subjects/courses are related to each other??

Also please kindly let me know,what are some recommended resources (books, tutorials, lectures, etc.) on control systems engineering, and how to begin working with it on a technical level?

As we have answer in below link but that answer is about dsp resources, I am looking for resources about control systems engineering  example answer of refrence request


texts: Correlation between a lowfrequent and a fast signal

texts:
I need to evaluate the correlation between some measured signals. Those signals are for example current, temperatures at various points, vehicle speed and torque from an electric motor in a vehicle. I have them as timeseries-objects.
Now what I want is to know which signals are the most correlated ones with my temperaturesignal of the motor. (for later to make a temperature-model, to see which I should include in the model)
I already tried to use pearsons correlation coefficient which worked for some signals, but not for the correlation between the temperature and the power loss, which should be correlated by physical nature.

corrcoef -> correlation of 0.029 in first data set

In this image you can see the power loss and the temperature.
Everytime the loss is high, the temperature rises slightly, but how can I measure this dependence? What would be a good way to get the correlation between a low-frequent temperature signal and a fast one like voltage and current? Do I need to modify my signal with a lowpass filter?

I also tried xcorr without shifting, but then the speed of the vehicle is more correlated than my power loss, that doesnt seem like the right way either.


texts: How to calculate dB of a transmitted power

texts: why if I lose 80% power in the output of a system, Does it mean that I had lost 10×log10(0.2) = -7dB ?


texts: What's Logic Behind the Construction of Sobel's Filter in Image Processing?

texts: I am basically very new to this image processing field. I am presently working on edge detection on colour images. While learning the basics of edges and edge detection in images, I encountered image derivatives and spatial masks for the corresponding operations. It's where I happened to learn about Prewitt operator and Sobel operators. I cannot understand the logic behind the construction of these masks and how does it detect lines. Can someone help me please?


texts: Will the received waves be the same if the transmitter use the beamforming to transmit the same signal?

texts:
If there is a  transmitter with three transmitted antennas,and a receiver with five  antennas,and these five antennas are very close to each others.

Now transmitter use beamforming with these three transmitted antennas to transmit the same signal to the receiver,these five antennas will also receive the signal,but will their received signal wave be the same?i mean same magnitude,same phase.

Because if their phase are not the same,we should multiply different $e^{j\theta}$ to received signal that every antenna receive,then sum them,then decoding it.

But if their phase are totally the same,we can just sum them,them decoding it


texts:
I am implementing EQ lines in my filter. I need to do biquad with slope 24 db/oct, 36/oct and bigger so I would like to cascade several biquads. I am stuck with calculating frequency response of two biquads - now I am able to calculate magnitude and phase and draw one curve (peak filter).
Should I multiply this response by itself? Thank you in advance for the answers.


texts:
My previous question wasn't clear. So I thought it'll be good idea to repost with more details.

I've designed a 100th order windowed highpass FIR filter with 3Hz cutoff frequency for my ADC datas with 100Hz sampling rate. I am currently stacking up my datas in a buffer. Then convolve that buffer with my FIR coefficients array. Lastly, take FFT of the output of convolution. This way works pretty well. I can see clearly the respond that I wanted from FIR filter. However since output is an array, I can't display that to represent my time domain graph.

Since I'm working on a real-time data plotting, I need to send filtered time domain values one by one to show them in my plotting application. To get a single output I've tried to reduce my adc datas' array size to filter's array size and implement $y(n)=h_0x(n)+h_1x(n-1)+\ldots +h_{N-1}x(n-N+1)$ this instead of convolution.

I gave 3Hz 0.2V amplitude sine wave signal with 1V DC offset. I've recorded the result in a video. In the video, you can see it removes the DC offset and amplitude is right but the wave is no longer a sine wave. Later in the video, I've changed the frequency to 1Hz and it cutted off the signal which was expected. In the frequency domain everything is wrong because it shows same frequency values no matter what real frequency is.


texts: MATLAB: Generating and Visualizing Mother Wavelet of different scale

texts:
In MATLAB, there is a function wavefun that outputs both the scaling and wavelet functions. To generate a Daubechies, the following command can be used:

[phi,psi,xval] = wavefun('db40',10);

The question I have is: How to generate a Daubechies at different scales and visualizing them? For instance, generating a similar Daubechies with frequency twice larger.


texts: Properly stagger an FFT? How to handle output data (Have highs weigh as much as lows?)

texts:
I'm new to audio processing so I'm mostly running into problems with not being able to properly google something. Sorry.
Basically I want to create something like an equalizer (just visually without interaction and modulation for now). I got my FFT working in Unity and am now getting the ampitudes of each frequency for a given sample range (2048) at a certain time.
Now I think my problem is that my frequencies aren't staggered (right word?) when displaying them. Resulting in 31 bars that are basically not moving and one bar, the one with the low frequencies, moving a bunch.
What I want to achieve is something like this:

How would I go about to display my frequency information like that, with half of the room for 1 - 500 hz and the rest staggered from 1 to 20k?
I guess this is a logarithmic function. But if I just use "Mathf.Log()" on all the data points my EQ just explodes and isn't displaying anything properly.
Is there a proper way to go about this?
Especially how can I have the high frequency values > 10k be "weighing" as much as the lower ones?
And what words should I use in these contexts so that I can better search for my next question myself?
Thanks a lot!


texts:
Problem 4.6(b) from Oppenheim, Wilsky & Nawab (2nd ed) reads:

Given that $x(t)$ has the Fourier transform $X(j\omega)$, express the Fourier transform of $x(3t - 6)$ in terms of $X(j\omega)$.

The way I proceeded,
$$ x(3t - 6) = x(3(t-2)) $$

$$ x(t) \longleftrightarrow X(j\omega)$$
$$ \implies x(t-2) \longleftrightarrow X(j\omega)e^{-2j\omega}$$
$$ \implies x(3(t-2))  \longleftrightarrow \frac{1}{3}X(\frac{j\omega}{3})e^{\frac{-2j\omega}{3}}$$
But the answer given at the back of the book is
$$  x(3(t-2))  \longleftrightarrow \frac{1}{3}X(\frac{j\omega}{3})e^{-2j\omega}$$

My question is, while applying the scaling property of Fourier Transform, why does scaling happen only to the $X(j\omega)$ term and not the exponential term, when even the latter forms part of the actual $X(j\omega)$ on RHS?


texts:
I know how higher order filter affects the system, theoretically. The slope of frequency Response becomes steeper as its order increases.  I had some speed signals from work. I wanted to investigate more about this, So i designed a $N^th$ order $PT1^n$ filter(multiple PT1 filter concatenated in parallel) and a $N^th$ order Butterworth filter. I just cannot understand the stuff I read theoretically applies here.

1st to 3rd order $PT1^n$ filter:

1st to 3rd order butterworth filter:

These are real signals. It seems to me that as the order is being increased, it's increasing the phase shift to increase the noise reduction. I want to figure out if increasing the order of the filter is worth the hassle, as the order increases the complexity increases and the needs more computational power too.

Main purpose of my filtering is to smoothen the signal, remove those steps. I want to know how muchbenifit will i get by increasing the order of the filter, mathematically and practically


texts:
I was trying to design a butterworth filter of arbitrary order. Then i came across this presentation:

Lecture 9: Poles, Zeros & Filters, by Peter Cheung, Imperial College London

I understand most of it, except for 2 things,

Now, we use the fact that $-1=e^{j\pi(2k-1)}$ and $j=e^{\frac{j\pi}{2}}$. I have no idea what's he saying here.
And does he take a normalized cut-off frequency? If yes, how do i change it to arbitrary cut-off frequency.


texts: Finite duration vs infinite duration sequences?

texts:
What are difference between finite duration and infinite duration sequences?
As far as i am able to google and know only one difference that is finite duration sequence ROC exist on
xy plane while infinite duration sequence ROC exist on unit circle plane

I have also attached two snapshots in this regard


texts:
I've been trying to find a fast 16 point dct2 and dct3 implementation, however I could only find it in literature expressed as mathematical equations, which honestly I couldn't understand.

However I did find a code generator that outputs dft transforms. The main problem I have is the DFT and Inverse DFT don't have the same numbers going in and out.

// Before DFT              // After DFT and IDFT
inputArray[ 0] = 12;       outputArray[ 0] = 184;
inputArray[ 1] = 12;       outputArray[ 1] = 194;
inputArray[ 2] = 12;       outputArray[ 2] = 178;
inputArray[ 3] = 14;       outputArray[ 3] = 198;
inputArray[ 4] =  8;       outputArray[ 4] = 155;
inputArray[ 5] = 10;       outputArray[ 5] = 141;
inputArray[ 6] = 12;       outputArray[ 6] = 164;
inputArray[ 7] = 12;       outputArray[ 7] = 149;
inputArray[ 8] = 12;       outputArray[ 8] = 138;
inputArray[ 9] = 12;       outputArray[ 9] = 121;
inputArray[10] = 12;       outputArray[10] = 107;
inputArray[11] = 12;       outputArray[11] = 90;
inputArray[12] = 12;       outputArray[12] = 74;
inputArray[13] = 12;       outputArray[13] = 55;
inputArray[14] = 12;       outputArray[14] = 37;
inputArray[15] = 12;       outputArray[15] = 19;

I realized the first 5 or so indexes do equal the inputs when divided by 16, however this trend doesn't continue as you go down.

Is this the expected behavior? Or is there something else I need to do the get a proper conversion?

Also I did find an 8 point dct that works well and gives the proper results, is there anyway to expand that into a fast 16 point dct?

Edit:

The reason I want to find a fast 16x16 DCT is because I'm working on a javascript video codec that supports transparency.

So after inter frame prediction is finished I'm left with a lot of residue. Because it's in javascript, and it's processing 24 frames a second I need the fastest way possible to compress and decompress this residue.


texts:
I'm beginning to explore discrete Hilbert transformers - ways to achieve 90°. phase shift across a band of perhaps 6 kHz at a 44.1 kHz sampling rate. I'm trying to stick with IIR filters in order to save computation time - in addition to the fact that I only need to phase shift just a band of frequencies.

I saw this post where the author Ross Wilkinson alludes to creating an IIR based Hilbert transformer by setting the transfer function's zeros to:

\begin{equation}
{(q_n)}^{k}_{n=0},\quad q_n = e^{\frac{\pi}{2^n}}\quad
\end{equation}

The RHS poles inside the unit circle (0 < x < 1) are the inverse of the zeros:
\begin{equation}
{(p_n)}^{k}_{n=0},\quad p_n = \frac{1}{q_n}
\end{equation}

It would be great if somebody could point me towards another resource that would help explain where that comes from in greater detail.

FYI, I'm trying to make a single side band modulator for audio frequencies. It should be able to process in real time on a laptop, with a sampling rate of 44.1 kHz.


texts:
I started off with this:

$$ x = 5 \cos(200 \times 2 \pi t ) + 10 \cos( 400 \times 2 \pi t)$$

by performing a 1024 point DFT on it. Then I performed IDFT on the complex values obtained through DFT. Now, I want to express the original wave in terms of it's harmonics, so when I combine the DC and first harmonic or upto n harmonics, I get the original wave back. But how do I obtain these harmonics?

This is what I actually want to do. I have some real valued data(144 points). I want to express this data as a sum of cosines. For this purpose, I perform a 144 point DFT operation on this data, and bring them to frequency domain.
Does the Euler's identity, give me these cosine?

$$X[k] * e^{\tfrac{j2\pi kn}{144}} + X[144−k] * e^{\tfrac{−j2\pi kn}{144}}$$

Please help me obtain the Amplitude and phases of these harmonics.


texts:
Maybe to someone this question may seem quite easy but I have a problem grasping it. Namely, assume that we have two systems A and B with sampling rates $f_A$ and $f_B$ where $f_A>f_B$ and $R=\frac{f_A}{f_B}$. If we upsample system B by $R$ (i.e., $f_B=f_A$) using the zero order hold interpolation what is the relation between the time samples before ($n_{old}$) and after ($n_{new}$) upsampling? More precisely, we defined $\mathcal{N}_{old}=\{1,2,...,n_{old},..N_{old}\}$ and $\mathcal{N}_{new}=\{1,2,...,n_{new},..,R*N_{old}\}$ as sets of time samples before and after upsampling. Based on the definition of ZOH  following relation should hold:
$$
n_{old}=\frac{n_{new}}{R}
$$
i.e., every $R^{th}$ sample from $\mathcal{N}_{new}$ corresponds to the one time sample from $\mathcal{N}_{old}$
but if we for example take some $n_{new}$that is not multiple of $R$ we will get that $n_{old}$ is not an integer what doesn't make sense. What am I doing wrong?


texts: I'm trying to scale wave amplitude (0-1) to perceived loudness (still 0-1). The decibel scale seems to be unbounded. For my audio, the amplitude 1 represents a decibel $d$ - i.e. the audio is being played at volume $d$. But what would the decibel be for 0 amplitude? I know 0dB is the minimum a human can hear, but what's the actual minimum. If I can obtain this, then I can successfully convert wave amplitude to perceived loudness (while staying between 0 and 1)


texts: Signal Relationships and Conversion: Transforming one Signal into another?

texts:
I'm trying to relate a near shore tidal signal (point A) to 3 points along a long model boundary (points B C D). I want to possibly have a relationship between B C D with which we can convert A predictions into B C and D. At the moment I'm doing a single phase shift, an amplitude ration for levels above zeros, an amplitude ration for levels below zero and a mean level shift.

This creates a kink in the Tidal signal at Peak ebb and Peak flood and results in the model over predicting ebb currents. I was wondering if anyone is aware of a more complex relationship for this sort of transformation?

One thing I would like to capture is the difference in phase shift between high and low water (for example the ration of period of the positives to the period of the negatives might be different for the different points).

An example algorithm for current process.

A = vector (size n x 1 ) units meters

time_A = vector (size n x 1 )

ph_B = phase shift for AvsB.

pos_amp_B = positive amplitude ration.
neg_amp_B = negative amplitude ration.

B_mean = long term mean of B.

A_mean = long term mean of A.

for i = 1:n
    a = A(i) - A_mean
    if a > 0
       B(i) = a*pos_amp_B
    else
       B(i) = a*neg_amp_B
    end
    time_B(i) = time_A(i) = ph_B
    B(i) = B(i) + B_mean
end

BTW: The relationship is based on about 6 months of data.

EDIT 1:
Well, firstly just think of two sinusoidal signals (ie. amplitude, phase shift), but not regular, so for example the period is 12.5 hrs but the slopes and periods of the positive half and negative half aren't all the same. You don't need any contextual knowledge. Im just looking for a transformation algorithm.

EDIT 2:

Here's a pic of the timeseries and the fft comparisons (fft focused on frequencies of high energy (12.5 hrs (semidiurnal)), just to give idea not all frequencys are so scaled nicely). Black is A. green in zeros line.