New answers tagged

3

Short Answer: Basic RLS (no forgetting, no weird weighting, etc.) is ALWAYS Lyapunov stable. If the regressor sequence for the LS problem is persistently exciting--which is data and problem dependent, not algorithm dependent--then RLS is exponentially stable. So I don't know what you mean by "LMS is more stable than RLS"--more stable in what sense? ...


1

The Laplace transform of the original differential equation is $$Cs V_o(s) = V_i(s) \left( \frac{1}{R_1} \right) - V_o(s) \left( \frac{1}{R_1} + \frac{1}{R_2} \right)$$ $$R_1 R_2 C s V_o(s) = R_2 V_i(s) - (R_1 + R_2) V_o(s).$$ In the Laplace domain, the ratio $V_o(s)/V_i(s)$ is the transfer function for the circuit, $$H(s) = \frac{ V_o(s) }{ V_i(s) } = \frac{...


0

Both files play in the VLC media player. Looking at the coder information, the first "I downloaded one .wav format from internet" gets this (in French for the tags, sorry) and the second one you created: So likely, one in PCM encoded, the other is referred to as MPEG audio.


2

Unless mentioned otherwise withing the context the classic interpretation of Second Derivative Gaussian Filter is indeed (a) in your question: $$ L \left( x, y, \theta \right) = \cos \left( \theta \right) {g}_{xx} \left( x, y \right) + \sin \left( \theta \right) {g}_{yy} \left( x, y \right) $$


0

This may be a misunderstanding based on a fixed point implementation. Fixed point implementations can benefit from "fractional multiplies" which requires a number format where all absolute values are 1 or less. In Q notation that would be Q15.0 for a signed 16-bit integer. Many processors have a dedicated hardware instruction for this operation, ...


3

A discrete-time first-order high pass filter with unity gain at Nyquist and a zero at DC is described by the following difference equation: $$y[n]=\frac{1+\alpha}{2}\big(x[n]-x[n-1]\big)+\alpha y[n-1],\qquad -1<\alpha<1\tag{1}$$ Its transfer function is given by $$H(z)=\frac{1+\alpha}{2}\frac{1-z^{-1}}{1-\alpha z^{-1}}\tag{2}$$ Evaluating the squared ...


2

Here are couple examples: % R is the resistance value (in ohms) % C is the capacitance value (in farrads) % fs is the digital sample rate (in Hz) % Constants RC = R * C; T = 1 / fs; % Analog Cutoff Fc w = 1 / (RC); % Prewarped coefficient for Bilinear transform A = 1 / (tan((w*T) / 2)); % using Bilinear transform of % % 1 ( 1 - z^-1 ...


0

I actually don't see how the following diagram can be possibly used for phase correction only as it will have an unavoidable amplitude correction as well. An all pass filter by definition will pass all magnitude without modification and only change the phase. The Time Delay block will similarly pass all magnitude without modification with a linear phase ...


0

As explained in the comments for previous versions of this question, a matched filter alone (using the cross-correlation specifically which can be done efficiently with FFT's) should be used with caution for purposes of estimating time delay. The reason why has been detailed in this other post linked below along with a robust least-square solution for ...


0

For a constant frequency signal, with no frequency offset between transmitter and receiver, the phase of a complex correlation, at the correlation peak, is the phase difference between the received signal and the reference signal used for the matched filter. It need not be 0. And that is for the actual correlation peak, which may have to be obtained by ...


0

You shouldn't perform the filtering operation on the FFT data, but on the original time domain data. The functions filtfilt and lfilter both take time domain data as their inputs, not frequency domain data. Filtering can also be implemented in the frequency domain (by multiplication), but the functions you're using don't do that.


1

It's important to specify at which frequency you want unity gain. But assuming you mean DC ($\omega=0$), because that filter has a low pass characteristic, the DC gain of an IIR filter is given by $$G_{DC}=\frac{\sum_kb[k]}{\sum_ka[k]}\tag{1}$$ It's also common to normalize the denominator coefficients such that $a[0]=1$. In your example that would give a = [...


0

b = [0 1.209e09] a= [9.2175 -2.6952 1.0000] % original ----------------------- sys = tf(b,a,0.1,'Variable','z^-1'); % fixes -------------------------- sys=sys/dcgain(sys); % scale coefficients by b(2) sys1=tf(b/b(2),a/b(2),0.1,'Variable','z^-1') sys1=sys1/dcgain(sys1); bode(sys,'-', sys1,'--') Which results: Transfer function 'sys' from input 'u1' ...


2

I've used this method in Octave: function [c] = Hz_at_3dB(b, a, fs, samples) [H,W] = freqz(b,a,samples); magresp = 20*log10(abs(H)); maxresp = max(magresp); [I,~] = find(magresp < maxresp-3.0103,3,'first'); c=(fs/2 * W(I(1)))/pi; EDIT: SECTION 8.4: STANDARD RESPONSES - https://www.analog.com/media/en/training-seminars/design-...


0

As pointed out by Hilmar in a comment, you should remain in the discrete domain. This is most easily done by using the functions freqz() and zplane(): b = [.8,1]; a = [1,.8]; [H,w] = freqz(b,a,2048); subplot(2,1,1), plot(w/pi,abs(H)); subplot(2,1,2), plot(w/pi,angle(H)); figure, zplane(b,a) Note that for a first-order all-pass filter it's also quite ...


5

In general there is no straightforward analytical solution. As you know, you need to solve $$\left|H(e^{j\omega_c})\right|=\frac{1}{\sqrt{2}}\tag{1}$$ for $\omega_c$, where it is assumed that the maximum filter gain equals $1$. For Butterworth filters, the specified cut-off frequency always equals the $3\textrm{ dB}$ frequency. This is not the case for other ...


1

Hint: Check for time-invariance of the system by working out the output for a delayed input $x[n-n_0]$. Is it equal to the delayed output $y[n-n_0]$?


0

Traditional (analysis) filter banks are banks of linear filters followed by downsampling. This is not so efficient, because you convolve and then subsample: possibly a waste of operations. People have found ways to invert the operations, downsample and convolve, with other filters involve the polyphase components (even and odd ones in the two-channel case) ...


2

FIR filters that have coefficients symmetric about their center coefficient(s) are linear phase. Digital pulse filters commonly in use, including a Root-Raised-Cosine filter, are FIR and have this property, so they will have will have a linear phase response. For all digital modulations, I would avoid non-linear phase response filters.


0

As you know, we don't solve homework problems here, but you can get some hints. I don't know if you're really required to solve the problem in the frequency domain, but I would suggest to compute the output of the integrator in the time domain: $$y(t)=\int_{-\infty}^{\infty}x(\tau)u(t-\tau)d\tau=\int_{-\infty}^{\infty}e^{-\tau/T}u(\tau)u(t-\tau)d\tau\tag{1}$...


2

Note that a biquad has $5$ degrees of freedom (not $6$), because $a_0$ can always be chosen as $a_0=1$ without loss of generality: $$\begin{align}H(z)&=\frac{b_0+b_1z^{-1}+b_2z^{-2}}{1+a_1z^{-1}+a_2z^{-2}}\\&=b_0\cdot\frac{1+\hat{b}_1z^{-1}+\hat{b}_2z^{-2}}{1+a_1z^{-1}+a_2z^{-2}},\qquad \hat{b}_1=\frac{b_1}{b_0},\;\;\hat{b}_2=\frac{b_2}{b_0}\tag{1}\...


1

okay, the magnitude frequency response for a general $N$th-order Butterworth lowpass filter is: $$ \Big|H_\mathrm{LP}(f)\Big|^2 = \frac{1}{1 + \left(\frac{f^2}{W^2} \right)^N} $$ for bandpass filtering, centered at frequency $f_0$, this substitution is made to the LPF: $$ f \leftarrow \frac{f}{f_0} - \frac{f_0}{f} $$ so then it comes out as: $$ \Big|H_\...


0

It is simply a scaling. If you use $b0=1$ for example, you have the values for $b2$ and $b1$ directly. In contrast if you use $b0=2$ then the filter would have twice the gain and the values for $b2$ and $b1$ would be double. It is that simple. Where you really need to pay attention to the actually scaling used is when you implement the filter with fixed ...


0

If you apply the multiplication with $b_0$ at the output, then that multiplier is after the feedback loop. Consequently, if the output (after the multiplier) is $y[n]$ then the input to the delay element is $y[n]/b_0$. The corresponding difference equation is $$y[n]=b_0\left(x[n]-\frac{a_1}{b_0}y[n-1]\right)=b_0x[n]-a_1y[n-1]\tag{1}$$ which is identical to ...


4

First of all you see that the phase is a piecewise linear function, so it's a linear phase FIR filter. There's a phase jump at half the Nyquist frequency, which shows that the filter has a zero at that frequency. Note that the phase jumps by $\pi$ corresponding to sign inversion. You can also see what type of linear phase FIR filter it is. Since the phase ...


5

The reason is Euler's formula, from which you get $$\cos(\omega)=\frac12\big(e^{j\omega}+e^{-j\omega}\big)\tag{1}$$ and $$j\sin(x)=\frac12\big(e^{j\omega}-e^{-j\omega}\big)\tag{2}$$ If you have symmetric or anti-symmetric coefficients, the corresponding frequency response can always be decomposed in purely real-valued cosine terms $(1)$ or purely ...


1

if the implementation preserves bits until quantization must occur at the final output, the Direct Form is far simpler than the Transposed Form. using the transposed form requires that your states have double-wide word widths unless you quantize each of those states back to single width. but that is more quantization error than if you just add up a bunch ...


0

Hi: I've never dealt with discretization in the kalman filter ( my models were already discrete ) so take the following with a level of uncertainty ( no pun intended ). Also, you didn't show the original equations so I'll refer to them as the observation equation and the system equation. Based on your updating equations, it seems that you're using the non-...


1

I don't see how memory or computational burden can possibly be reduced between the two implementations (note this is not implying simplicity, just number of computations required, please read on...) Usually the decision to use transposed-form is for high speed FPGA implementations with a large number of taps as you can eliminate a long adder tree which would ...


2

Will the Outputs of both implementations be the same, always (i.e. error is almost 0)? That depends A LOT on the numerical precision of your data representation and mathematical operations and on the filter itself, specifically the location of the poles. If you use double precision in a communication application, there should be little to no difference. ...


1

I agree, the 1 Hz signal should be attenuated given the filter response. I suggest sweeping the input frequency to create the frequency response manually as I assume the filter was somehow scaled, possibly by not including a factor of $T$ in the mapping from the analog filter. Try a much higher frequency to see where it is nulled and then narrow in on the ...


5

So, from the discussion in the comments it's clear you know most you need to know. The window method for FIR filter design is based on this idea: We know the "ideal" frequency response $H(f)$ we want. Often, that's something like a rectangle in frequency design. Well, the easiest thing to achieve that shape would simply be transforming $H$ to time domain,...


6

The unit circle on the z-plane represents the frequency axis, similar to the imaginary axis $j\Omega$ on the s-plane for the Laplace Transform in the continuous time case. So the frequency response of the system is given by $H(z)$ when $z= e^{j\omega}$ with $\omega$ going from $0$ to $2\pi$ representing the normalized fractional radian frequency (which is ...


1

The ratio $$\frac{\textrm{Im}\{H(u,v)I(u,v)\}}{\textrm{Re}\{H(u,v)R(u,v)\}}\tag{1}$$ is only independent of $H(u,v)$ if $H(u,v)$ is real-valued, which is exactly the condition for a zero-phase filter. The phase can only be zero if the frequency response is real-valued, as you've already noted. For real-valued $H(u,v)$ we have $$\frac{\textrm{Im}\{H(u,v)I(...


2

Filters that affect the real and imaginary parts equally, and thus have no effect on the phase, are appropriately called zero-phase-shift filters." The filter itself is zero-phase, but the input (and therefore the output) waveform can be complex. In this case the real and imaginary components of the input would be effected equally since the filter is ...


1

Linear Equalizer: Depdends on the type, but no, generally you just estimate an optimal inverse ("optimal" according to the specific metric of linear equalizer type) of the channel impulse response and apply that. Decision-Feedback Equalizer: No. The way the channel equalization is computed is literally in the name.


3

A bump like this one is likely to be wide-band, especially with the sharp onset. Plus, the line may be hard to deal with in the Fourier domain. Hence, the combination is complicated to remove with a classical linear filter. The problem is very akin to baseline, background or trend removal, answered elsewhere here. Several options are possible, for ...


0

Note that the MATLAB result is floating point (or may be fixed point but with much higher precision) while the VSA hardware is fixed point with lower precision that also has dynamic range limitations in the analog portion of the hardware as well. To see this directly and more clearly, try these two experiments: Create a single carrier tone and capture ...


0

DC component is the zero frequency component. If you look at the DFT expression, this would mean summing up the input. So in mathematical terms this would be the sum (or the running sum) based on your application. In terms of filtering again this would be an averaging filter. Like moving average.


2

Consider the Inverse Fourier Transform as the impulse response of the filter. In the case of an ideal brick-wall filter with zero-phase, the impulse response would be a Sinc function centered about zero in time (given by the Inverse Fourier Transform). This is non-causal (time domain response is greater than 0 for $t<0$), but in order to be zero-phase as ...


0

IIR filters can be unstable, for this reaso high order filters are "divided" into smaller filters (which tend to be more stable). Imagine you have a an 8 pole filter, tou can transforme it to four second order filters that are executed in cascade (the output of one filter is the input of the next one) https://www.mathworks.com/help/signal/ref/tf2sos.html


Top 50 recent answers are included