New answers tagged

0

I'd suggest trying to get rid of the $p$ index. You can write $\mathcal H_1$ as $Y_i = W_i + A$, then you can do the detection on each sample. You put the self-study tag, so I'll let you do the math but it'll come down to detecting the pulse if $y_i > \frac{A}{2}$. This will only work, if you know $A$ of course. I think you'll need a fairly high SNR for ...


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? ...


0

The question can only be answered if it is clarified what it is that the function $G(z)$ describes. If $G(z)$ is the system's transfer function then we're done immediately, because only linear time-invariant (LTI) systems can be characterized by a transfer function of that form. If $G(z)$ is the transfer function, the output sequence $y[n]$ is given by the ...


3

For clarity, I would write this DCT as: $$F(u) = \alpha(u)\sum_{i=0}^{N-1}f(i)\cos\left(\frac{\pi u}{2N}(2i+1)\right)$$ We note that, with this 1-indexing of Matlab: $$y[i+1] = f(i)\,.$$ Then I would modify the inner limit (from $0$ to $N-1$ instead of $1$ to $N$): for i = 0:N-1 sum = sum + y(i+1)*(cos((pi*(2*i+1)*u(j))/(2*N))); end and you can remove the ...


4

You have mistyped the formula, replace this line sum = sum + y(i).*(cos((pi.*(2.*y(i)+1).*u(j))/(2*N))); with the one below, and it works fine. sum = sum + y(i).*(cos((pi.*(2.*u(i)+1).*u(j))/(2*N)));


1

If you have a pure tone signal that has a frequency higher than the Nyquist frequency, it doesn't "disappear", it looks like it has a different frequency (mirror image around the Nyquist). This is called aliasing. If it happens to be exactly at Nyquist, it could disappear if your sampling happens to hit the zero crossings. The same is true for a ...


1

Nyquist didn't say that. The Nyquist-Shannon sampling theorem says that the sampling rate asymptotically approaches twice the bandwidth of the signal, more or less no matter where the signal's center frequency is. So you care about the width of the signal, not its maximum frequency. But where you got the expression wrong in one direction pertaining to ...


0

Here is a real-life application on adaptive filtering on real signals. And watchout! We used 1-tap complex filters, filters with only one modulus/phase coefficient, which we called "unary filters". It was patented in Method of adaptive filtering of multiple seismic reflections, published in a limited form in Geophysics: Adaptive multiple ...


1

Probably no, but... maybe. The classical sampling theorem is often misstated: if a continuous signal is band-limited, it can be recovered exactly (in theory) if the sampling frequency is twice its maximum frequency. However, there are cases where signals can be recovered above the Nyquist limit, provided that we have more information, because ambiguities may ...


2

HINT: The frequency response has the form $$H(e^{j\omega})=a+be^{-j\omega}+ce^{-2j\omega}+be^{-3j\omega}+ae^{-4j\omega}\tag{1}$$ which can be rewritten as $$H(e^{j\omega})=e^{-2j\omega}\big[ae^{2j\omega}+be^{j\omega}+c+be^{-j\omega}+ae^{-2j\omega}\big]\tag{2}$$ Now note that the term in brackets is purely real-valued. I trust that you can take it from here.


0

Here you go: b = [-0.0625, 0.25, 0.625, 0.25, 0, 0, 0, 0, -0.0625]; a = 1; % **** Plot impulse response ***** [ImpResp,T] = impz(b,a,31); figure(1), clf plot(T,real(ImpResp),':bs','MarkerFaceColor','b','markersize',4) title('Filter Impulse Response'), grid on, zoom on % **** Plot poles & zeros ***** [Z,P,Q] = tf2zpl(b,a); % Calc poles and ...


0

Two hints: The standard way of writing a transfer function in the $\mathcal Z$ domain is a rational function in $z^{-1}$, not in $z$. Try this Use tf2zp() instead of residuez()


2

All the other responses are excellent, especially Envidia's, so not to take away from those but I want to add this very intuitive view that bottom lines it quickly: Consider the spectrums below that start with a real signal (positive and negative frequencies are complex conjugate symmetric). This is what we could measure with a single scope probe (one stream ...


11

Absolutely! Conjugates are mentioned in textbooks because conjugation has no effect on real signals, but it does on complex ones. This way, formulations are more general and apply to both real and complex valued signals. Complex numbers don't exist themselves, they are a mathematical construct. Having said that, their mathematical properties can be ...


2

You should explore how are these complex time-domain symbols transmitted over channel (atmosphere or wire) using modulated waveforms. Also, a good starting point would be to figure out that complex numbers are nothing but 2 orthogonal/perpendicular dimensions. When we say $x = 3 + 3i$, we are basically saying we have a pair of numbers which lie in ...


5

Software-defined radio (SDR) models real band-pass signals as complex baseband signals. All signals and filters operate on complex numbers.


1

For each sample, we note $1$ if error and $0$ otherwise. Then, for bit error rate $q$, the tests are independent Bernoulli random variables $\{X_i\}$ with probability $q$. The estimate is $\hat{p} = \frac{S}{n}$ where $$S = \sum^n_i X_i \tag{1}$$ and $\mu = \mathbb{E}[X] = np$. Chernoff bound (see Corollary 5) tells us that for every $0 < t < \mu$, $$\...


0

If you mix up to $f_c$, but then use a filter with cut-off frequency of $f_c$, you're not downconverting your signal to baseband at all. You're just cutting off half the signal. I think you want to re-visit the block diagram of the receiver architecture you're trying to implement. You're most definitely missing the important step, but since I'm not sure what ...


1

If the signal is oversampled and the PSF variation corresponds (approximately) to a smooth local compression/expansion, perhaps you can resample y so as to make the PSF approximately LTI, then apply conventional methods (somewhat akin to homomorphic processing) If the input signal is convolved with a small discrete set of PSFs, perhaps you can devonvolve ...


2

When you upsample a signal by a factor of 4, then, you have to churn out 4 times the number of samples in the same time in order to maintain the same Symbol Rate. Otherwise your symbol rate will be $\frac{1}{4}$ times the original symbol rate. This means your DAC needs to operate at least at 4 times the sampling frequency now. This can be costly. Also faster ...


1

Hint: (1) $sinc(\frac{t}{T})$ is the inverse fourier transform of a $rect$ function in frequency domain with $f=[-\frac{1}{2T}, \ \frac{1}{2T}]$. Time-shift will only result in a phase term in Fourier transform which does not impact the bandwidth. (2) $z(t)$ is product of two $sinc(\frac{t}{T})$ in time-domain. Hence, its frequency domain representation will ...


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

[Apologizing: most of the following is already covered by Matt L.] Expression $$X(e^{j\omega}) = \sum_{n=-\infty}^{+\infty} x[n]e^{-j\omega n}$$ is not valid in general, because we do not know whether it exists. One (classical) sufficient condition for the DTFT (discrete-time Fourier transform) is that the sequence $x[n]$ is summable. In other words, let us ...


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 = [...


2

HINT: The error energy can be written as $$\begin{align}\sum_k\big|d[k]\big|^2&=\sum_k\left|x[k]-\frac{1}{2\pi}\int_{-W}^W\sum_nx[n]e^{-jn\omega}e^{jk\omega}d\omega\right|^2\\&=\sum_k\left|x[k]-\sum_nx[n]\frac{1}{2\pi}\int_{-W}^We^{j(k-n)\omega}d\omega\right|^2\tag{1}\end{align}$$ Now compute the integral $$I(k-n,W)=\frac{1}{2\pi}\int_{-W}^We^{j(k-n)\...


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

Based on the references and the definitions given, here is a proof. Given: $$x[n] \leftrightarrow a[k], \ and$$ $$y[n] \leftrightarrow b[k]$$ Fourier Series expansion of $x[n]e^{j\frac{2\pi}{N}nm}$ would be derived as follows: $$\frac{1}{N}\sum^{N-1}_{n=0}x[n]e^{j\frac{2\pi}{N}nm}e^{-j\frac{2\pi}{N}nk} = \frac{1}{N}\sum^{N-1}_{n=0}x[n]e^{-j\frac{2\pi}{N}(k-m)...


2

This symbol denotes a rectangular pulse of length $N$: $$\mathcal{R}_N(n)=\begin{cases}1,&0\le n\le N-1\\0,&\textrm{otherwise}\end{cases}$$ I'm not sure where it is defined for the first time, but this definition is clear from the equation above Eq. $(5.24)$ on page $130$ of the 3rd edition of Digital Signal Processing Using Matlab by V.K. Ingle and ...


3

We can! In your example, $N=4$, and the DFT is real-valued, so you get $X[k]=X[4-k]$, and that's true: $$\begin{align}k=0:\;X[0]&=X[4]=0\\k=1:\;X[1]&=X[3]=0\\k=2:\;X[2]&=X[2]=-4\end{align}$$ Note that by definition the DFT is $N$-periodic, so $X[N]=X[0]$.


0

It's not derived, it's just chosen in a smart way such that the relationship between the decimated and the original sequences becomes obvious. It's just a rearrangement of the terms of the sum. As a simple example, take an infinite sum of numbers $a_r$: $$S=\sum_{r=-\infty}^{\infty}a_r\tag{1}$$ Under certain conditions that we don't need to bother with now ...


1

This problem is related to deconvolution and equalization. You are basically undoing the effect of a filter by another filter, such that the total system has a flat response, i.e., has a unit impulse as its impulse response. From $$(h\star g)[n]=\delta[n]\tag{1}$$ it follows that $$H(z)G(z)=1\tag{2}$$ must be satisfied. So the solution to the problem is $$...


2

They are indeed equal. The first term is $$-3(-2)^nu[n]=(-3)(-2)(-2)^{n-1}u[n]=6(-2)^{n-1}u[n]\tag{1}$$ The value of $(1)$ at $n=0$ is $6/(-2)=-3$, so we can rewrite it as $$-3\delta[n]+6(-2)^{n-1}u[n-1]\tag{2}$$ Adding the second term $(-2)^{n-1}u[n-1]$ results in $$x[n]=-3\delta[n]+7(-2)^{n-1}u[n-1]\tag{3}$$


1

Given the definition of the correlation matrix $\mathbf{R}_{\mathbf{x}}$ here, I am assuming that $\mathsf{E}[\mathbf{x}] = \mathbf{0}$. I do this because the correlation matrix is usually defined as $\mathsf{E}[(\mathbf{x} - \mathsf{E}[\mathbf{x}])(\mathbf{x} - \mathsf{E}[\mathbf{x}])^{\dagger}]$, where $\dagger$ indicates complex conjugate tranpose. Note ...


4

Note that $$1+z^{-1}+\ldots + z^{-(N-1)}=\sum_{n=0}^{N-1}z^{-n}=\frac{1-z^{-N}}{1-z^{-1}}\tag{1}$$ where I've used the formula for a finite geometric series. So both your results are identical and correct. The ROC is $|z|>0$, which is the case for all causal sequences of finite length. Note that in the expression on the right-hand side of $(1)$ there ...


1

Maybe I am wrong but here is how I look at it: The two methods you wrote give the same result. Let's choose $z=2 + j0$ for example and length $n=5$ If we sum $Z\{x[n]\} = Z\{ u[n]-u[n-5] \} = 1+2^{-1}+2^{-2}+2^{-3}+2^{-4}=1.9375$ Same thing goes for your method 2: $\dfrac{1}{1-z^{-1}}-z^{-n}\dfrac{1}{1-z^{-1}} $ would be $\dfrac{1}{1-2^{-1}}-\dfrac{2^{-5}...


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 ...


0

Found the error by myself now. I did not use the instantaneous frequency for the calculation of the sweep signal, as stated here or here. The corrected code is: clear %% Input (linear frequency sweep) Ts = .1e-3; duration = 30; t = (0:Ts:duration); fs = 1/Ts; f = (fs/2)*t/duration; finst = 1/2*(fs/2)/duration*t; u = sin(2*pi*finst.*t); %% PT1-system ...


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 ...


1

Have you considered reading the documentation ? https://www.mathworks.com/help/curvefit/fit.html Goodness-of-fit statistics, returned as the gof structure including the fields in this table. sse: Sum of squares due to error rsquare: R-squared (coefficient of determination) dfe: Degrees of freedom in the error adjrsquare: Degree-of-...


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

Hint : Use following properties of Discrete-Time Fourier Transform : If $DTFT\{x[n]\} = X(e^{j\omega})$, then $DTFT\{x[n - n_0]\} = e^{-j\omega n_0}X(e^{j\omega})$ $IDTFT\{j\frac{\partial{}}{\partial\omega}X(e^{j\omega})\} = n x[n]$


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

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.


0

We cannot design an ideal filter! So we should trade off our requirements and approximate the best filter. In this case: b=firls(63,[0,0.25,0.28,1],[1,1,0,0]); figure() freqz(b) may be an acceptable solution. Also we can use fir1 function instead.


Top 50 recent answers are included