# Tag Info

Note the difference between the zeros at $0.3 \pi$ and at $0.8 \pi$. The first one is clearly a zero crossing, much like $abs(x)$ at $x=0$. At $\theta = 0.8 \pi$, however, the curve is tangent to the horizontal axis, much like $x^2$ at $x=0$. So you have a doulbe zero here. So your zeros are: 2 zeros at $z = e^{\pm j 0.3 \pi}$ 2 double zeros at $z = e^{\... 4 Your first suggestion is correct, the derivatives of the local polynomials are being sampled. From the horse's mouth (Savitzky & Golay 1964): Again, if we restrict ourselves to evaluating the function only at the center point of a set of equally spaced observations, then there esist sets of convoluting integers for the first derivative as well. (... 4 The generalized linear phase FIR filter has the following frequency response: $$H(\omega) = A(\omega)~e^{j (\alpha \omega + \beta)}$$ for some constant$\alpha$and$\beta$and$A(\omega)being real. The group delay of this filter is independent of frequency: $$\tau = -\frac{d (\alpha \omega + \beta) } {d \omega} = - \alpha$$ Now if you linearly shift ... 4 You're right, there usually is a better IIR filter (if you have enough data). The discrete-time Wiener filter is not "by definition" FIR. It is common to constrain the filter to the FIR case because it's often more straightforward to implement, and because such a filter can be made adaptive more easily. Also, in practice you often want to consider only a ... 3 Some time ago, on our sister site math.SE, I wrote about this issue regarding the two different definitions of the sinc function. Here is a slightly modified version of that answer for the benefit of those who prefer to just stay on dsp.SE. In the engineering literature, those who define the Fourier transform as X(\omega) = \int_{-\infty}^{\infty} x(... 3 I had a look at your specs, and I designed a few filters to see what is going on. First of all, we shouldn't expect that an IIR filter should perform much better than an FIR filter for the given specifications, because poles are mainly useful if sharp transitions from pass bands to stop bands must be realized, as is the case for frequency selective filters. ... 3 Your call to fir1 looks OK, but you should check the result yourself. You could probably answer several of your other questions by carefully reading the mathworks documentation of the respective functions. E.g., for fir2 you can read that f is a vector of frequency points in the range from 0 to 1, where 1 corresponds to the Nyquist frequency. The first ... 3 In general, there is no such requirement for notch filters that H(e^{j0})=H(e^{j\pi}) must be satisfied. You could definitely have a notch filter with H(e^{j0})\neq H(e^{j\pi}). Having the same gain at DC and at Nyquist is just a practical definition, and if you have a sufficient number of degrees of freedom (i.e., filter coefficients) you might as well ... 3 Allpass filters are very helpful in automotive mainly for getting the imaging dialed in. You often need to time align the contributions of different driver groups (left, center , right) at a specific listening position. Due to the complicated acoustics of the cabin. the delays are often dependent on frequency and so all passes can be very helpful in ... 3 Axel Mancino's answer is correct for causal filters. In general, FIR filters have poles at either z=0 or |z|\rightarrow\infty, or both. Take as an example a fourth-order causal FIR filter:H_1(z)=a+bz^{-1}+cz^{-2}+dz^{-3}+ez^{-4}\tag{1}$$Clearly, H_1(z) has all its poles at z=0. An anti-causal FIR filter such as$$H_2(z)=az^4+bz^3+cz^2+dz+e\... 3 If your signal was a windowed complex exponential, then the maximum of the magnitude of its discrete-time Fourier transform (DTFT) would equal the frequency of the complex exponential: $$x[n]=\begin{cases}e^{jn\omega_0},\quad&n\in[0,N-1]\\0,\quad& \textrm{otherwise}\end{cases}\tag{1}$$ The DTFT of(1)$is easily computed from the convolution of ... 3 Your confusion is understandable. If you consider the definition of linear phase FIR filter and the associated symmetry conditions on their impulse responses, then you can arrive the conclusion that the first two cases $$h_1[n] = [0,0,0,1,0]$$ and $$h_2[n] = [0,0,0,0,1,0,0,0,0,0,1]$$ are non-symmetric. However, as you use zeros and ones in those ... 3 In order for H(z) to be a linear phase filter, it must zeros both on the inside of the unit circle and at the complementary locations (1/z) which are outside the unit circle. Therefore a linear phase circle has no stable causal inverse (since this would necessitate poles outside of the unit circle.) Note that a linear phase filter can be decomposed into ... 2 Integral definition So the fourier transform (and the inverse fourier transform) are defined in terms of integrals, which are themselves defined in terms of limits. Nope, the integrals are not just the limits of sums here. That would be true for Riemann integrals over smooth functions (try doing that difference quotient at a place where$f$isn't ... 2 There are a few things that can make this easier If you don't care about the phase response you can typically get the best result with calculating a minimum phase for your amplitude spectrum and using that as the complex target If you want to control the in-between and the behavior at the band edges you need to specify targets points there as well. If you ... 2 It is easily possible to design FIR filters with a complex frequency response specification, i.e., with a desired frequency response $$D(\omega)=|D(\omega)|e^{j\phi(\omega)}\tag{1}$$ where both the desired magnitude$|D(\omega)|$as well as the desired phase$\phi(\omega)$can be prescribed. A least squares approximation of$(1)$by an FIR filter just ... 2 There is a theorem from Tang that proves the Remez algorithm, of which Parks-McClellan is a variant, to be quadratically convergent. The paper doesn't give an explicit number of iterations for convergence, though it does give some sample numbers of sweeps. Ping Tak Peter Tang, "A Fast Algorithm for Linear Complex Chebyshev Approximations," Mathematics ... 2 You have to distinguish between the algorithm and a specific implementation. The Parks McClellan algorithm is based on the Remez exchange algorithm, which is guaranteed to converge. So in principle any correct implementation of the algorithm should converge. However, convergence of the algorithm is only guaranteed if all intermediate results are computed ... 2 Polynomials are not integrable, hence their Fourier interpretation is complicated. However, locally, there are a few works. Under least-squares, polynomial interpolation's linearity works well with frequency analysis. The class of Savitsky-Golay filters performs least-squares polynomial interpolation, and yields different derivative orders. As they seemed ... 2 There's no what to use when. It's all a matter of definition and they must be made explicit for responsible, trustable, serious conversations. From the DSP context, if in a paper or in a book or in an exam you are asked to use the sinc function, then if nothing else is stated you should assume: $$\text{sinc(x)} = \frac{ \sin(\pi x)} {\pi x }$$ Any other ... 2 Filters modify the frequency content of a signal. The terms Finite Impulse Response (FIR) filter and Infinite Impulse Response (IIR) filter refer to Linear Time Invariant (LTI) filters. LTI filters can change the amplitude and phase of specific frequencies in a signal, but they cannot shift any frequency content to other frequencies. LTI filters are ... 2 I'm not sure why the problem occurs for you with the x22 example, but I believe the problem is because the deconvolution is not being performed over the right length. Deconvolution of an FIR (inverting an FIR) requires, in general, convolution using an infinite duration impulse response. So just using the default lengths in performing the deconvolution ... 2 If the problem description is correct, i.e., if$h[n]$is zero for$n<0$and$n>7$, and if we assume that$h[7]\neq 0$(and why should we assume otherwise?), then the filter has$8$taps and it is a$7^{th}$order FIR filter with$7$zeros. Since it is a linear phase filter and the number of taps is even, it must be either a type II filter (even number ... 2 The most straightforward way to impose constraints in the frequency domain as well as in the time domain for the design of (linear phase) FIR filters is to use linear programming. Constraints on the step response or on the impulse response are naturally linear, and constraints on the frequency response can also be formulated as linear constraints in the ... 2 From the mathworks documentation of the function envelope(): The filter is created by windowing an ideal brick-wall filter with a Kaiser window of length fl and shape parameter$\beta = 8$. So without hacking the function you can't directly get the filter coefficients, but you can easily find them yourself by just doing what they do, i.e., windowing the ... 2 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 ... 1 The problem is the definition of the phase. The command angle() computes the phase$\phi(\omega)$according to $$H(e^{j\omega})=|H(e^{j\omega})|e^{j\phi(\omega)}\tag{1}$$ where$H(e^{j\omega})$is the complex frequency response. At frequencies$\omega$where the frequency response has zeros, the phase jumps by$\pi$. This is shown in the two left figures ... 1 You can solve your problem by an fftshift of the impulse response, as this line shows: h = fftshift( real( ifft(H)) ); now it should work. NOTE that there will be a transient of length about$60$samples (half the linear phase FIR filter length) at the beginning of the convolution output, after which the steady state result emerges... 1 Remember that there are four types of linear-phase FIR filters. The filter in your example is a type III filter: odd filter length and odd symmetry. The frequency response of such a system has the form $$H(e^{j\omega})=A(\omega)je^{-j\omega(N-1)/2}\tag{1}$$ where$N$is the filter length (number of taps), and$A(\omega)$is real-valued and odd, i.e.,$A(\...
Your answer is right, assuming you posted the question right. But you better use the standard notation as Dilip Sarwate already indicated; $u[n]$ is the unit-step and $\delta[n]$ is the unit impulse. Then $$0.5^n \delta[n-2] \star \delta[n] = 0.5^2 \delta[n-2] = \begin{cases} { 0.25 ~~~, ~~~n= 2 \\ 0.00 ~~~,~~~n \neq 2 } \end{cases}$$ you can get the ...