DSPRelated.com

Harry Commin (@weetabixharry)

I am a British electronic engineer with a background in implementing DSP in FPGAs and ASICs. I finished my PhD in Electronic Engineering at Imperial College London in 2013 and am currently working for an FPGA design service company in Zurich, Switzerland.

Generating Partially Correlated Random Variables

Harry Commin March 23, 201921 comments
IntroductionIt is often useful to be able to generate two or more signals with specific cross-correlations. Or, more generally, we would like to specify an $\left(N \times N\right)$ covariance matrix, $\mathbf{R}_{xx}$, and generate $N$ signals which will produce this covariance matrix.

There are many applications in which this technique is useful. I discovered a version of this method while analysing radar systems, but the same approach can be used in a very wide range of...


Re: Minimalist high performance Farrow Filters

Reply posted 2 weeks ago (09/22/2024)
You didn't say which FPGA resource(s) are limited, but if the main bottleneck is multipliers, then you should clock this component as fast as possible and share...

Re: Group delay in a multirate system

Reply posted 2 months ago (08/09/2024)
Edit: As kaz noted, your equation is correct (assuming M is the filter length): (M0-1)/2 + 4*(M1-1)/2 + 8*(M2-1)/2 + (M0-1)/2 + 4*(M1-1)/2 You can then input an...

Re: Group delay in a multirate system

Reply posted 2 months ago (08/09/2024)
I think a wideband input (such as an impulse) might be a more natural choice for eyeballing group delay. Then you avoid the ambiguity of a periodic signal.Nonetheless,...
@corvoattano I don't know any advantage of using the spatiotemporal array manifold (and i cannot imagine any advantage). In all the cases I ever analyzed, splitting...

Re: Maximally Decimated Polyphase Channelizer Help

Reply posted 5 months ago (05/16/2024)
I'm quite sure I faced exactly the same confusion the first time I saw this phenomenon. Glad to help.

Re: Maximally Decimated Polyphase Channelizer Help

Reply posted 5 months ago (05/16/2024)
Isn't that exactly what you expect? If the signal is a pure sinewave, with frequency exactly equal to the channel center, then after down-conversion (channelization)...
You don't show how "Data" is calculated, so it's impossible to be certain, but I suspect your calculation is wrong (unless the signal power happens to be exactly...

Re: Farrow Filter

Reply posted 6 months ago (04/06/2024)
@Shaiko Yes, that would be a valid way of doing it. (And, most likely, it's how I would do it, depending on the exact requirements).Technically, there may be ways...

Re: Farrow Filter

Reply posted 6 months ago (04/06/2024)
@ShaikoA key point that I think you may be missing is that sample rate and clock rate are not the same thing. The processing clock that clocks your resampler can...

Re: Farrow Filter

Reply posted 6 months ago (04/06/2024)
@Slartibartfast Can you point to any specific literature you would recommend for a hardware (ASIC/FPGA) implementation?The only helpful resource I have ever found...

Re: Acoustic Modems in Matlab

Reply posted 6 months ago (04/06/2024)
In response to Mannai_Murali:It seems a shame to limit the center frequency to 2 kHz because that leaves so little room for signal bandwidth. Do you have any experience...

Re: Acoustic Modems in Matlab

Reply posted 6 months ago (04/06/2024)
In response to ReinoT:Just to be clear, this isn't my forum question, so I don't want to hijack the discussion too much. But since you asked (and already provided...

Re: Acoustic Modems in Matlab

Reply posted 6 months ago (04/04/2024)
Hi ReinoT,I had an adaptive equalizer, which was intended to take care of multipath. (To test it, I modelled some simple multipath with an FIR filter in my transmitter,...

Re: Acoustic Modems in Matlab

Reply posted 6 months ago (04/04/2024)
I tried something similar in MATLAB and then Python. Both versions worked well over a cable, but fell to pieces over the air.I was transmitting between independent...

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
I could translate it into many diagrams, but the right diagram depends heavily on your application.What is your throughput requirement? To what extent do you need...

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
This is some very rough code, but it shows the difference between direct form and transposed form (and how to exploit symmetry differently in each case).The interaction...

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
No, they are different implementations of the same mathematical function (a linear convolution). Let me write some rough MATLAB code to clarify...

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
Are you now thinking about a direct form FIR filter? Your question was about transposed form.

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
Which part is not right? Are you saying that if h0 = hn-1, then h0*x[n] is not equal to hn-1*x[n]?

Re: Pre-add for transposed FIR

Reply posted 9 months ago (12/30/2023)
In the transposed form, we multiply the same input data value, x[n], across all the coefficients {h0, h1, ..., hn-1}. If any of the coefficients are the same (like...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
If x1 is defined like this:x1=[1*rand(1,50)  0.01*rand(1,40)+0.9  1*rand(1,50)]+10;Then what threshold value should I use?

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
The digital version of eyeballs (or, at least the retinal neurons at the back), would be a neural network.For sure, a suitable neural network would give excellent...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
@ChuckMcM The mean could be higher in the "low variance" region than in the "high variance" region. Therefore, the power could be higher or lower in the "low variance"...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
@SaeidSeyd You can assume I have infinite (parallel) processing capability, if required.1. How should I calculate the size of the block and the threshold from the...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
@heycosmo How important is the assumption that the samples are normally distributed? (I don't think my samples will be anything close to normally distributed in...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/24/2023)
@Slatribartfast It's definitely true that I have no hope of finding an algorithm that will always find the correct answer.However, given that I can eyeball the...

Re: How can I estimate the 2 parameters of this signal?

Reply posted 12 months ago (10/23/2023)
I think we can say quite quickly that no thresholds are required because I can erase the number labels from the y-axis and still identify the two regions easily....
I have a digital signal of fixed length (e.g. 100 samples). Somewhere within this signal is a contiguous region characterized by "low variance". The remainder of...

Re: How to avoid harmonic distortions in a DAC?

Reply posted 1 year ago (04/18/2023)
@neilrober Thank you for your comments and links. Your article is very clear and gives me confidence that I'm on the right track.The Analog Devices tool you linked...

How to avoid harmonic distortions in a DAC?

New thread started 2 years ago
I have a DAC which is assumed to be nonlinear, such that it produces unwanted harmonic distortions at integer multiples of the input frequencies. Any other nonlinear...
If you're familiar with MATLAB, then you can work through the full example of MUSIC I originally posted here back in 2013.The code is heavily commented and doesn't...
There doesn't seem to be anything fundamentally different about "frame-based" processing in MATLAB. The frames are not independent. Simply, the sample data is collected...
@kaz My sample rate is 4 GSps. So I was saying I can't clock my FFT core at 8 GHz (or 16 GHz, with 1/2-overlap) and reuse it for the IFFT. I will clock it at 250...
@kaz My FIR filters are large, so DSP slice utilization is reduced immensely by implementing them in the frequency domain. (By a rough calculation, the reduction...
@samecues I have read that WOLA article and some other papers related to WOLA. However, I cannot see anything related to a simple linear filter (like a lowpass filter).You...
@samecues You understood exactly. And my filter is just a lowpass filter.If I understood you correctly, you are saying that by changing my Hann "analysis" window...
@kschutz I'm not specifically tied to Welch's method and I had also considered your "poor man's power spectrum". It's something I would probably resort to if I...
I am familiar with the overlap-add and overlap-save methods for computing linear convolutions.I am also familiar with Welch's method for estimating power spectral...
You haven't said what the problem is. Since you are just using MATLAB's pre-packaged functions, I suggest you read the MATLAB documentation (which is typically quite...

Re: Coherent Sources for DOA estimation

Reply posted 3 years ago (07/07/2021)
I can, but your questions are too general. The literature on this topic is vast, so you will need to narrow down what it is you are trying to understand.Do you mean...

Re: Off by one windowing

Reply posted 3 years ago (05/09/2021)
I'm not sure if you're aware that we commonly use at least 2 different symmetries in window functions. You mentioned (or implied) that you don't have a practical...

Re: time recovery algorithm and CORDIC

Reply posted 4 years ago (03/06/2021)
@Mannai_Murali Why not share your code here in the forum so someone else may benefit from it in the future?@Ali23 Do you specifically need an example in MATLAB or...

Re: time recovery algorithm and CORDIC

Reply posted 4 years ago (03/05/2021)
The rough idea is that the +/- sign of the error should tell you to either increase or decrease the sample rate in your receiver.The point is that the sample clock...
I can't really say much about the first figure. I guess it shows your signal is not all zeros, which is a good start.Your second figure shows effectively all zeros...
Please attach your graphs and code for conventional beamforming.It is only a small modification to convert that to use MUSIC.
I don't know what your hardware setup is, but it is surprising to me that you talk about sound recordings and the speed of light. I would expect the speed of sound...
If the other methods are working, then I'm not sure exactly what you want to know. Presumably, you have already been able to calculate the received signal covariance...
I'm not sure if I understand your question. If you already have some received data, then you don't need to generate it, so you can ignore sections (1) and (2) of...
Your calculation of the direction matrix A looks incorrect to me. This matrix should include information about the source directions and the geometry of your sensor...
@kaz Quantization doesn't change anything.We can constrain the maximum input amplitude to be any number (quantized or not - it doesn't make any difference).And rounding...
@kaz If you don't impose any constraints on the input signal, then the output signal can be infinitely large (e.g. if you multiply all of your input signals by Inf).Therefore,...
@kaz For a FIR filter, the impulse response (y) is the filter (h). At the end of your code, if you compare y and h, you will find they are identical. So you have...
@hirnprinz Thank you very much for sharing that article. That was exactly the track I ended up going down. After reading the article, it seems so obvious, but I...
@kaz As the name suggests, an exact representation would typically need infinitely many FIR taps (in the same way that we would need an infinite sample rate and...
@dszabo This worked really well (once I remembered to flip the order of the FIR taps to get the convolution in the correct order).I wasn't really sure how to choose...
@dszabo Ah, now I see what you're saying! Great idea. I'll give it a try.
Yes, this is basically what I am researching.If we reduce the input amplitude, then the question remains: "by how much should it be reduced (for a given filter)?".If...
@philipoakley Thank you. This sounds logical. I need to mull it over, but I think this is going in the right direction...
@kaz I have written fixed-point software models that include the internal rounding.I have tested with a wide variety of input signals (including Gaussian noise,...
@Slartibartfast With a FIR filter, I feel like I have a clear idea about how to make this design decision. I can calculate exactly what the maximum output value...
@dgshaw6 In my current work, I am only dealing with 1st order filters. Does your rule of thumb apply there too?With all of the test signals I have tried, I haven't...
@dszabo An impulse will not typically produce the largest possible amplitude at the output of the filter (in the time domain).
@kaz As I said in my original post, even if gain (in the frequency domain) is < 0dB across all frequencies, the output amplitude (in the time domain) can still...
@philipoakley Maybe I can understand better using a specific example. I have a filter with this transfer function:$$H(z) = \frac{1 - z^{-1}}{1 - Az^{-1}}$$where...
When implementing a fixed-point digital filter, I need to think about overflow/saturation. For a FIR filter, the maximum +/- output values (OUTPUT+ and OUTPUT-) are...

Re: hardware FFT coefficients .vs. np.numpy.fft.rfft

Reply posted 4 years ago (12/19/2020)
I didn't fully understand your description, but please note that the ideal way to fix this is in the time domain (by aligning the samples fed to your software FFT...

Re: hardware FFT coefficients .vs. np.numpy.fft.rfft

Reply posted 4 years ago (12/14/2020)
Are the time-domain samples aligned identically into both the hardware and software FFTs?A shift in the time-domain corresponds to a phase ramp in the frequency...
If there is only one signal arriving from one direction, then M=1.If there is one signal source, but arriving from multiple directions (due to reflections/echoes),...
If a simple Matlab implementation would be instructive, then take a look at this forum post I wrote some years ago.Later in the same thread, I expanded it to 2D...

Re: Matlab/Octave loop vectorization

Reply posted 4 years ago (08/20/2020)
@kaz I assume it's because Matlab is an interpreted language, so there isn't a compiler doing that kind of optimization.

Re: Autocorrelation of OFDM Signal

Reply posted 4 years ago (06/18/2020)
The sequences don't repeat indefinitely in WiFi, or there would be no way to transfer any information. WiFi is a bursty signal, so some useful "preamble" is prepended...

Re: Autocorrelation of OFDM Signal

Reply posted 4 years ago (06/16/2020)
If I understand correctly, you expect the "true" autocorrelation peak to correspond to the offset for which all the cyclic prefixes in the capture are aligned with...

Re: Autocorrelation of OFDM Signal

Reply posted 4 years ago (06/15/2020)
Are you sure these built-in autocorrelation functions do what you want? I suspect they don't, unless you are being pretty careful about how you feed them data.Or...

Re: Autocorrelation of OFDM Signal

Reply posted 4 years ago (06/15/2020)
Is it possible that the sequence you are autocorrelating contains a repeating, repeating pattern? (i.e. something that repeats several times).This is pretty common,...

Re: Digital down-conversion and cross-talk

Reply posted 4 years ago (05/20/2020)
The thing I feel more worried about is whether a real-valued mixer is definitely suitable for your application.However, as per emeb's reply, I don't feel worried...

Re: Design a preamble structure for OFDM

Reply posted 4 years ago (04/09/2020)
Everything in those Matlab scripts is specified explicitly in the 802.11 specification. The comments in the Matlab code refer to the part of Annex I (e.g. "I.1.3.2"...

Re: Design a preamble structure for OFDM

Reply posted 5 years ago (04/09/2020)
Have you seen Annex I of the 802.11 PHY standard? This takes you through every step of the 802.11a/g modulation process to make sure you get everything exactly right....

Re: Curve Modelling

Reply posted 5 years ago (02/02/2020)
If I understand what you are trying to do, then I don't think the method of finite difference is the best choice. As far as I know, the method of finite difference...

Re: Curve Modelling

Reply posted 5 years ago (02/01/2020)
If you use Matlab, then I think these 2 very simple lines of code sum up Least Squares polynomial curve fitting very well:C = bsxfun(@power, (0:L).', (0:N)); a =...

Re: How to parallelize polyphase FIR resampling filters

Reply posted 5 years ago (01/13/2020)
@kaz I understand the principle of rational-ratio resampling, but the challenge here lies in determining (in closed form) where the redundancy will be. Or, equivalently,...

Re: How to parallelize polyphase FIR resampling filters

Reply posted 5 years ago (01/13/2020)
@kaz I don't think I follow your explanation. Could you give a simple example? For example, if I want 6 parallel inputs and 8 parallel outputs (interpolation by...

Re: How to parallelize polyphase FIR resampling filters

Reply posted 5 years ago (01/11/2020)
@Slartibartfast Fixed resample rate. The resample rate can even be 1. For example, the most popular structure in the literature seems to be the "two-parallel FIR...
I am struggling to find a good reference for implementing parallel rational-ratio FIR resampling filters. By "parallel", I mean a high-throughput hardware filter...

Re: What is the cost of a typical MSEE degree?

Reply posted 5 years ago (12/17/2019)
My 4-year "undergraduate Masters" at Imperial College London (2005 - 2009) cost around £3,600 total in tuition. I believe it's now £9,000/year tuition for EU...

Re: Signal Generation methods and alternatives

Reply posted 5 years ago (07/15/2019)
Does N change only at compile time, or at run time too?Do the frequencies that you want to generate change only at compile time?Could you explain a little more about...

Re: Low cost audio DSP Exploration

Reply posted 5 years ago (05/24/2019)
Thanks for the clarification. I think an extra sentence in the original post to provide any kind of context would have eliminated any doubt. It's now obvious it...

Re: AD9601 with 200MSPS connected to DSP

Reply posted 5 years ago (05/16/2019)
I agree that this is likely to be a problem in many applications. However, not necessarily, since it depends what Yash5 wants to do with the data. I don't think...

Re: AD9601 with 200MSPS connected to DSP

Reply posted 5 years ago (05/15/2019)
I think the most direct answer to your question is that you could buy the smallest, cheapest FPGA on the market and use it to simply deinterleave (split) your samples...

Re: Somewhat Off Topic: Manipulating a PDF File.

Reply posted 5 years ago (05/15/2019)
I second the "print to pdf" option suggested by rrlagic. A possible downside to this is that you will lose any metadata (such as links within the document).My favourite...

Re: half and quarter sample meaning

Reply posted 5 years ago (04/23/2019)
Sounds like interpolating.  What is the context?I second that. In fact, that's more or less word-for-word what I was going to reply.

Re: Fixed point filter gain

Reply posted 6 years ago (03/23/2019)
This is not correct in general, and I don't think @dsplearn has provided enough information to be sure that it is definitely suitable for them.If, for example, your...

Re: Fixed point filter gain

Reply posted 6 years ago (03/22/2019)
I would like to add that "discarding" is not your only option when you want to divide a fixed-point number by $2^n$. Discarding in this context is referred to as...
@neiroberI could be misunderstanding, but there may also be different (equally valid) ways to look at it. In the summary, I see Steps 1 and 2 as moving all the FIR...
@neiroberI read through your post quickly and, if I understand correctly, you are saying that the multi-stage decimator is still equivalent if we reorder the filtering...
@neiroberGreat, thanks Neil. I am amazed (and a little embarrassed) that I didn't find your post in any of my Google searches.This looks like really valuable material...
@Rick LyonsBrilliant. Thank you for the excellent response. Your article looks like exactly what I was looking for from the start (if only I had entered better search...
Ahhh, I see. That makes sense. I'm just now starting to realise what that lecture 13 years ago was about!If a system is not LTI, I'm a bit lost... In the case of...

Re: Auto Correlation in DSP processor

Reply posted 6 years ago (03/16/2019)
Firstly, I would like to offer my deepest condolences that you have to work with LabVIEW. In my opinion, it is quite nice for connecting simple pieces of hardware...
I am trying to characterise the combined frequency response of several (FIR) decimating filters connected together in series. I basically want to be able to tweak...

Use this form to contact weetabixharry

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address