# Tag Info

11

See How many taps does an FIR filter need? In your case you'd need more than 1000 taps depending on the allowable ripple, as your cut-off frequency is less than fs/500. Alternatives : use an IIR, a simple order-1 DC removal filter could work great Average your signal and subtract the average in order to remove the DC Rick Lyons proposes a clever ...

6

Most typical examples of the ideal filters are the classical brickwall frequency selective filters (lowpass, highpass, bandpass etc) which are defined as ideal because of their impossible to realize ideally selective frequency responses. Their frequency responses include exactly flat passbands, exactly flat stopbands having absolute zero gain, and zero ...

5

First of all, it's important to understand that there is no single best way to transform a continuous-time system to a discrete-time system. The method you're using is called backward Euler method, and it is defined by the mapping $$s\leftarrow\frac{1-z^{-1}}{T}\tag{1}$$ Note that in $(1)$ you scale by $1/T$, where $T$ is the sampling interval (i.e., $1/T$ ...

4

Since this is an FIR, the group delay is D=(N-1)/2=20 samples. No, since this is a linear phase (i.e. symmetric or anti-symmetric) filter, the group delay is half the length! (being a FIR isn't sufficient.) The issue is that I get too peaks in the cross correlation, one at zero lag and another at 20 lag. Write down the formula for auto-correlation at ...

3

Well, look at your original picture: it's constant for all points but the edges, which means your derivative is zero for all points but these edges. By applying a "rounding, smoothing" filter to it, you "smear" the edges enough to make the derivative be non-zero for multiple pixels, in every direction.

3

i will agree with Hilmar that it can depend on the specific application. if the application is to essentially losslessly store or transmit audio to later retrieve or receive that audio, including conversions of format (and this includes the A/D and D/A and SRC) then i would say that there is no good reason for a process to not be linear phase (which is ...

2

This is what I would try: Ignore the $n(t)$ and $i(t)$ since you know nothing about them. I am assuming that $x$ is complex and the rest of the variables are all real. Take the complex natural log of both sides: $$\ln \left( | x(t) | \right) + j \arg( x(t) ) = \ln(A) + j ( a t^2 + b t + c )$$ Separate the real and imaginary parts. Using the imaginary ...

2

Without understanding more detailed results on what i(t) is, one solution is to estimate either the phase or frequency first, and then pass that result through a filter. An approach to do the frequency estimation digitally directly on the I (real) and Q (imaginary) samples of x(t) is the cross product frequency discriminator. After hard limiting x(t) to ...

2

I'd consider why you really want to do this - I personally can't think of a reason why I'd want to downsample to a specific sample number but I don't know your project Floating an alternate idea, you could downsample until you're near around that level of decimation and then truncate? It won't be 100 samples exactly but it might be easier in the long run to ...

2

The question is not very specific so this will also be just a general answer. The stability of a composite linear-time-invariant (LTI) system composed of smaller LTI systems cannot be deduced from the stability of the component systems if the composition introduces feedback. Instead, you should test the stability of the full composite system. The system is ...

2

If it's a linear phase FIR filter, then the inputs signals will be shifted (delayed) by an amount of group delay at the output. For a linear phase FIR filter of length $L = 2K+1$ the group delay will be $N = K$ samples. For even length $L = 2K$ FIR filters it will be at $N = (L-1)/2$ ; half-sample position. For non-linear phase FIR filters, group delay ...

1

It depends on what you mean by "meaningful". All outputs are meaningful in the sense that they combine the current input value with past input values. Initially, there are of course no past input samples. But if you agree that "no past samples" means "past samples with value zero" then that's exactly what happens if the delay elements are initialized with ...

1

The issue is that you're violating Nyquist which requires that the sampling rate be at least twice the rate of the highest frequency in the signal. In your case all of the sines that you're generating above 5000 Hz are folding back. For example, a 5100 Hz tone (5000+100) would fold back to 4900 Hz (5000-100) and so on. The 1 kHz tone you highlighted is the ...

1

Units of s represent the Laplace transform while units of z represent the z transform. It is often much easier to transform a time domain (units of t) signal to Laplace given that it translates integro-differential equations into simple algebra. The z transform does the same thing, but takes advantage of the repetition from sampling to make the transform ...

1

First, all of these routines act on an input array. Your comment "values beyond the boundary of the signal are NOT zeros" implies that you want to process a continuous signal, or at least one that is longer than a single call and array. If you want to use these routines, you’ll need some buffer management of your signal. Second, for converting 611 to 100, ...

1

This is my second answer. Technically it is introducing a high pass filter, but a very simple one with interesting properties for the OP's signal type. Starting with your signal: $$x(t)=Ae^{j(at^2+bt+c)}+n(t)+i(t)$$ For a chosen value of $d$ (a lag time): $$x(t-d)=Ae^{j(a(t-d)^2+b(t-d)+c)}+n(t-d)+i(t-d)$$ Define the filtered signal as the ...

1

What is the shape of your data? It's probably empty. Try print(data.shape) if it's a Numpy array. Another remark, lfilter interprets the b and a as the coefficients of a discrete-time transfer function, so you cannot use it with your analog Butterworth filter coefficients. You only need to worry about the axis parameter if your input data is ...

1

filtfilt() is a technique to achieve zero-phase filtering by applying the same filter twice to the data; with the output of the first stage reversed and filtered again in the second stage. Zero phase filtering is a desired property in image processing. NaN means "not a number" and indicates those indeterminate conditions like $0/0$, $\infty/\infty$, $\infty ... 1 I believe you are running into stability issues in an output power control loop design. See below a diagram of similar power control loops that I have implemented, where for stability reasons any filtering in the loop is minimized and only done with the loop filter itself which is designed for stability. The noise you are trying to filter gets filtered by ... 1 When a 2D filter$h[n,m]$is separable; i.e.,$h[n,m] = f[n]g[m]$, then the 2D convolution of an image$I[n,m]$with that filter can be decomposed into 1D convolutions between rows and columns of the image and the 1D filters$f[n]$and$g[m]$respectively. Let me give you the MATLAB / OCTAVE code, I hope this is what you wanted to show ? clc; clear all; ... 1 If a 2D$K_2$filter kernel is of rank$0$or$1$, it can be written as a separable product of$2$1D kernels$K_1^r$and$K_1^c$on rows and columns. As such, it can implemented by 1D convolutions, as long as one properly reshape the 2D matrices into 1D ones, and take care about "out-of-range" values, to avoid wrap-around. For instance, you can pad in ... 1 Looking at Intel - An Investigation of Fast Real Time GPU Based Image Blur Algorithms By Filip Strugar it looks like the Kawase kernel is just a way of implementing a linear kernel quickly, but in a way that constrains the kernel somewhat. This means that you could make such an algorithm. Either choose a set of spreads and adjust their weights (if that is ... 1 Taking a step back, a standard image$I$is composed of pixels. They are defined by a location (spatial coordinates, here denoted by$p$), and a "value", denoted by$I_p$. Smoothing or enhancing an image, in a large sense, consists in replacing each$I_p$by$\hat{I}_p, a value that would be: more probable, more consistent, more visually pleasant (choose ... 1 I would start with the many resources on this site: Is the Bilateral Filter a Solution of Some Variational Method? How to Validate Bilateral Filter Implementation? Comparison Between Guided Filter (Edge Preserving Filter) and Gaussian Filter. What Is the Bilateral Filter Category: LPF, HPF, BPF or BSF? Understanding the Parameters of the Bilateral Filter. ... 1 For the cross correlation of the output of the filter with the input you should see the result of the two impulses in your filter convolved with the cross correlation properties of your actual waveform. If your waveform is random such that there is only a correlation at 0 lag then the result here would be a positive correlation peak at lag zero and then an ... 1 This is a common problem, and has an easy solution. The following assumes you are using a cascade of second-order direct-form-1 sections. For a Butterworth highpass filter with a small ratio of Fcutoff to Fs, the numerator coefficients are close to [1 -2 1], and therefore the frequency response of the numerator by itself has a large attenuation at low ... 1 Probably not much advantage either way, possibly unless you've got a really high-order modulator (in which case someone else will have to answer!) If the state-space representation is a single-input single-output system, and if it's linear, and if it's running in steady-state, and if data path widths aren't an issue, then there's no difference between it ... 1 I would rephrase your terms as: the "directional derivatives" are not so directional (although sometimes called similarly in lecture, they are only horizontal and vertical. Truer "directional derivatives" would allow angular refinement, cf. non-separable filters (Deformable Kernels for Early Vision, Perona) the "directional derivatives" are not so ... 1 That depends on how many of the accelerometer parameters (mostly drift and misalignment) you're trying to estimate. If the IMU and the 'extra' accelerometer were in perfect alignment (and if their statistics are Gaussian), then the optimal combination of their outputs would be a simple weighted sum:\vec {\hat a} = k_1 \vec a_1 + k_2 \vec a_2\$ where (...

1

I have meet several definitions behind "being a realizable" filter. For instance, in Wikipedia Causal filter, there is: Systems (including filters) that are realizable (i.e. that operate in real time) must be causal because: In the context of physical systems, realizability is the property of having some way of implementing a mathematically ...

Only top voted, non community-wiki answers of a minimum length are eligible