Questions tagged [signal-processing]

1

votes
1

answer
520

Views

Applying Butterworth High Pass Filter

I have a problem with applying Butterworth High Pass Filter to my data. I would like to print filter for Bx and By matrix. As you can see I have both positive and negative values, how to apply math.fabs() to Bx and By to get only positive values? For my high pass filter I have those requirements: F...
Hiddenguy
1

votes
0

answer
55

Views

Tensorboard exception with summary.image of shape [-1, 125, 128, 1] of MFCCs

Following this guide, I'm converting a tensor [batch_size, 16000, 1] to an MFCC using the method described in the link: def gen_spectrogram(wav, sr=16000): # A 1024-point STFT with frames of 64 ms and 75% overlap. stfts = tf.contrib.signal.stft(wav, frame_length=1024, frame_step=256, fft_length=1024...
rodrigo-silveira
1

votes
0

answer
128

Views

scipy.signal.minimumphase deviates from desired magnitude

I have a problem with the scipy.signal.minimumphase not providing the same magnitude response as i input, it deviates quite a lot. Long story short. I have a material, where the absorption of said material is measured in octave bands(6 discrete values). I need an impulse response that fit those valu...
1

votes
0

answer
139

Views

High (and not round) frequency DatetimeIndex

Although pandas is wonderful to process low frequency signals (e.g. on the order of the day/second) I find it always more difficult to manages signals with high frequency or/and with non-round frequencies. Imagine one wants to create a DatetimeIndex for a frequency of 300Hz and a duration of 1 secon...
Tabs
1

votes
0

answer
41

Views

How to re-scaling signal intensity in image in relation to their spatial position?

Hi I have a 1D radial profile of a sample across a pipe (fig_1). One data point (along the orange straight line) is acquired at each 'band' from the image. The resolution (x,y,z) of each data point is 100um x 100um x 1000um. (fig_1) However in order to produce a quantitative image, each data point i...
J. Doe
1

votes
0

answer
140

Views

What exactly does Matlab do to plot a spectrogram?

I'm trying to plot a spectrogram of a vibration signal using Matlab, but I'm not happy with the way that the spectrogram-function plots the signal (I would like to customize the axes and use a mapped vector instead of time). Right now I'm trying to plot the thing myself using pcolor: [M_s, M_w, M_t]...
Vince
1

votes
0

answer
461

Views

Interpret and Plot FFT Results

I am trying to do a FFT of some Signals I get from a Vibration Sensor. My Problem is my output is wrong or maybe my interpretation of the output is wrong. I am using the FFT algorithm of Paul Bourke: public static void FFT(short dir, int m, double[] x, double[] y) { int n, i, i1, j, k, i2, l, l1,...
Sim91
1

votes
0

answer
42

Views

What is the most appropriate clock/time source for software-based signal processing?

Let's say I want to sample a pair of GPIO pins of my Raspberry Pi* with a frequency around 10kHz to feed a software-based signal analyzer (written in C for instance). What is the most appropriate method to obtain an accurate timestamp for each sample? Accurate means, the delay between acqiring the s...
code_onkel
1

votes
0

answer
60

Views

Best approach to fill signal gaps

I have a numpy 2dim array that represents a multi channel Bio-Signal. This array has dimension 20 x n_samples where the columns represent : Sample number - 16 channels data - time. Given to bluetooth connection i have some package drops so i have gaps in signal. The array has to be imported into MNE...
Andrea A.
1

votes
1

answer
142

Views

MATLAB: How to use imnoise(I, 'localvar', image_intensity,var)?

I am trying to add noise to an image that varies based on the intensity of an image. I = imread(filename); figure, imshow(I); v = I(:); J = imnoise(I, 'localvar', v, 0.04*v); figure, imshow(J); But when I run the algorithm, I get the following exception: error using max: Integers can only be combine...
sk117
1

votes
0

answer
28

Views

Impulse response - low frequences accuracy

I have question probably more in audio processing, than programming at all. Just for fun, for understand little bit more I made my own plugin to measure impulse response of the filters. Something that allows me to see various equalisers curves. Similar like it happens in Waves QClone plugin - but qC...
pajczur
1

votes
1

answer
44

Views

Retrieving and decoding amplitude modulated sin

For my diploma I need to encode some data in audio, play it via speakers, recive this audio at other Android phone and decode it back. For this case I've choosed an amplitude modulated sin, in java it will look like this: void genTone(){ // fill out the array for (int i = 0; i < numSamples; ++i) { s...
Plato
1

votes
0

answer
68

Views

Matlab Filter design: compact minimum phase filter

Suppose we have the following linear system: with the transfer function and its inverse . Using Matlab, I would like to design a discrete, compact filter with minimum delay that represents the inverse transfer function, such that , where I use discrete time-index k to denote that the signals are...
TheodorBecker
1

votes
0

answer
74

Views

Spark Highly Controlled Aggregate

I am currently working on implementing the radix-2 version of the Cooley–Tukey Fast Fourier Transform Algorithm on Apache Spark 2.2. If you're not familiar with how the algorithm works, all you really need to know for the sake of my question is that it requires breaking a vector down into a perfec...
blippy
1

votes
1

answer
300

Views

Python - Cannot feed value of shape (64, 25, 9) for Tensor 'Placeholder:0', which has shape '(?, 25, 25)'

i am trying to train my RNN-LSTM model in python 3.5, this is my code and my dataset is a 3D accelerometer dataset X = tf.placeholder(tf.float32, [None, config.n_steps, config.n_inputs]) Y = tf.placeholder(tf.float32, [None, config.n_classes]) with tf.Session() as sess: tf.global_variables_initiali...
Hadeer El-Zayat
1

votes
0

answer
139

Views

How to demodulate amplitude – “Ocean” pitch shifting method

I'm implementing the pitch shifting method described in Nicolas Juillerat & Beat Hirsbrunner's 2010 paper 'Low Latency Audio Pitch Shifting in the Frequency Domain'. I've got most of the algorithm implemented so far (here's the code if you're curious, but it shouldn't matter for this question). I'm...
jconst
1

votes
0

answer
67

Views

Aggregate Pandas dataframe and extract dominant frequencies

I have a dataframe that looks like this: Code A1 A2 A3 ... B40 Time 2000-01-01 00:00:10.730 NaN 1 NaN NaN 2010-01-01 00:00:12.730 1 2 3 NaN I want to aggregate data every one hour and calculate some stats. I used the foll...
Behinoo
1

votes
0

answer
339

Views

Finding peaks in audio spectrogram

Introduction : I am working on audio fingerprinting and having some doubts regarding peak detection in the spectrogram, my input is a wav file with spectrogram as : The method I'm implementing is given here Problem : The peaks returning from the get_2Dpeaks() method are not overlapping with the ab...
Shubham
1

votes
2

answer
661

Views

Plotting numpy rfft

I am trying to plot the fft of a wav file, I have successfully completed it using the regular fft but I wanted to experiment with rfft as my application was to perform this in music. When I try to plot xf and yf (figure 2) I run into an issue where xf is half the length of yf and I can't figure out...
David Gash
1

votes
1

answer
262

Views

CMSIS DSP FFT output for same input signal is different for number of FFT points

I am using the CMSIS DSP FFT functions to convert a known signal from time to frequency domain. The signal in question is a 1 KHz sine wave of peak-peak amplitude of 1V with a DC offset of 1.25V. I am sampling the input signal at 10 KHz with a 16-bit ADC and then doing the processing on a Cortex M4F...
Amit Ashara
1

votes
0

answer
79

Views

Why is my FFT function producing additional peaks?

I am developing my own FFT function within Matlab that will later be converted to C and coded onto a DSP embedded system. I am comparing my output to the Matlab FFT function to check the results are the same. My current algorithm produces two extra peaks, I am unsure of the reason for this. Could an...
C. Faldon
1

votes
0

answer
326

Views

Plotting Wigner-Ville distribution with pytftb on python 3

I am testing wigner ville distribution to see if it works for the estimation of original amplitude of a signal with noise. The pytftb provides a wigner ville function that works well with their examples. I use it like this: tfr = WignerVilleDistribution(prepack[0]) tfr.run() tfr.plot(show_tf=True) A...
Danf
1

votes
0

answer
95

Views

AKFFTTap only returns array of 0.0

I am attempting to simply take the FFT of a recording: as follows let originalFile=try AKAudioFile(readFileName: 'whiteNoise.wav') let originalPlayer=try AKAudioPlayer(file: originalFile) let fft = AKFFTTap.init(originalPlayer) //I have tried both with and without .init print(fft.fftData) Unfortuna...
LRID
1

votes
0

answer
52

Views

How does the inverse Fourier transform go in the process of active noise cancellation?

Sound was input to the microphone through the sound card, and the sound was read in real time, and the frequency was read by the frequency analysis through the FFT. I want to generate the reverse frequency through this, but I do not know how. import pyaudio import numpy as np import wave import time...
최진우
1

votes
0

answer
139

Views

How do I do an inverse FFT transform in the code below?

Below is the code of the process of receiving the microphone sound in real time and performing the FFT. For noise cancellation, it is blocked in IFFT process. Do you have any resources or methods to help me? Also, is there a library that performs inverse FFT inside python? #complile by python3 new.p...
최진우
1

votes
0

answer
36

Views

“Filtering” input data for analysis in Python

I have a large set of data on which I have to perform a lot of serach operations. In order to reduce the number of data points, the data is 'compressed' by merging every continuous positive-slope or negative-slope point into a single point representing a local maximum or minimum, and also recording...
1

votes
0

answer
81

Views

why FFT is showing different behaviour for different frequency of sine wave? [duplicate]

This question already has an answer here: Sound volume on defined frequency (C#) 1 answer Why do I need to apply a window function to samples when building a power spectrum of an audio signal? 4 answers the Length of signal in calculating FFT 2 answers fft: why my main peak is lower than the side...
SAIP
1

votes
1

answer
267

Views

Detect notes of piano using MATLAB

I'm having some trouble to understand the output of the FFT of a piano note (A1, f=55 Hz). I was expecting to get a 'strong' frequency at 55 Hz, but instead I'm getting a 'strong' frequency at 220 Hz, which correspond to a A3, two octaves up. This is the code I'm using: [audio,fs] = audioread('a1...
1

votes
0

answer
119

Views

Lanczos Splines Interpolation

I have been trying to figure out something that is math related but I can not get any detailed information in Math Stack Exchange, so I am trying to question it here cause I know computer scientist are a whole lot smartert :) I have been trying to implement image resampling recorring to interpolatio...
Pedro Pereira
1

votes
0

answer
318

Views

Reconstruct signal from FFT using Accord.net

I am trying to filter out signal noise using Fourier Transform. Using functions from Accord.net I was able to apply FFT on an input signal and reconstruct it. However I am unable get the correct phase of the signal. After hours of Googling, I found many similar questions out there, but non were s...
BillyJoeBob555
1

votes
0

answer
71

Views

Convolution filter 2D

I'm trying to create in C++ a convolution filter for an image. I'm using OpenCV library to manipulate my image. But my filter doesn't work properly. First attempt: #include #include using namespace cv; using namespace std; /* filtre de convolution */ void filterConvolutionBlack(String pathImage, s...
killer_minet
1

votes
0

answer
135

Views

Tensorflow: Fixed point quntization for a embedded DSP

Apologies for my newbie question. From documents like these I understand the advantages of using 8bit numbers to save on memory and increase the performance for very small impact on accuracy: https://www.tensorflow.org/performance/quantization Other blogs mention these quantized models can be offloa...
muni764
1

votes
1

answer
64

Views

Generating a Histogram by Harmonic Number

I am trying to create a program in GNU Octave to draw a histogram showing the fundamental and harmonics of a modified sinewave (the output from an SCR dimmer, which consists of a sinewave which is at zero until part way through the wave). I've been able to generate the waveform and perform FFT to ge...
docsteer
1

votes
1

answer
236

Views

How to use scipy signal for MIMO systems

I am looking for a way to simulate the output of a signal for various input signals. To be more precise, I have a system defined by its transfer function H that takes one input and has one output. I generated several signals (stored in a numpy array). What I would like to do, is get the response of...
s_o_king
1

votes
1

answer
71

Views

MATLAB: How to demodulate a STREAMING audio file rather than a saved audio file?

I wrote the simple MATLAB program below to demodulate an audio signal that has previously been frequency modulated with a carrier frequency of 10000 Hz. The program records the frequency-modulated signal, stores it on disc (for possible later use), then retrieves and demodulates it. Now I would like...
J. Feinberg
1

votes
0

answer
32

Views

DSP.js Fails in Most Browsers

The official examples for DSP.js work in Internet Explorer 11. However, the code fails to execute in the following browsers: Chrome 67 Edge, the latest Windows 10 Update Firefox 60 What can be done to solve this problem?
PhaseMaster
1

votes
1

answer
313

Views

Realtime low pass filtering of wav files or raw input audio and simultaneous playback in Python

I want to perform low pass filtering of audio data in Python and play it back at the same time. I am looking for advice on improving my code, and I'll share my current but the very incomplete solution to the problem. Although I am requesting advice on improving it, I will not be completely rewriting...
TheNH813
1

votes
1

answer
331

Views

Parameters to control the size of a spectrogram

I am trying to get the spectrogram as described by the following instruction. Each audio segment has duration of 5s. Frames with equal size are extracted from the audio (with overlap between the consecutive frames), and each of the frame consists of 1024 samples. The mel-scale is divided into 128 b...
Raven Cheuk
1

votes
1

answer
100

Views

Python detrend 3d dataset with NaNs

I am trying to de-trend my dataset of size 480x2040 = close to 1,000,000 pixels. I have 17 timesteps in this series (years) however I want to move to daily timesteps at some point. This code works, however runs way way way too slow to be functional. I feel that scipy.signal.detrend can do the whole...
Ocean Scientist
1

votes
0

answer
53

Views

How to compute 2D inverse stationary wavelet transform at each scale level separately?

For example, I'd like to apply the transform four times on an image and then perform the inverse transform on each scale's subimages set at a time, because I do some processing in certain scales, but I don't in the others. So, with MATLAB function, when I give it all the images from all scales, it r...
Antônio Maeda

View additional questions