Tim Wescott (@Tim Wescott)

Tim Wescott is the owner of Wescott Design Services. He specializes in pragmatic methods to apply control theory to embedded systems projects. Mr. Wescott teaches and consults in the area of control systems, with occasional digressions into communications systems. He is the author of Applied Control Theory for Embedded Systems, plus numerous magazine and on-line articles.

New Video: Parametric Oscillations

Tim Wescott January 4, 2017

I just posted this last night.  It's kinda off-topic from the mission of the channel, but I realized that it had been months since I'd posted a video, and having an excuse to build on helped keep me on track.


Fibonacci trick

Tim Wescott October 10, 20164 comments

I'm working on a video, tying the Fibonacci sequence into the general subject of difference equations.

Here's a fun trick: take any two consecutive numbers in the Fibonacci sequence, say 34 and 55.  Now negate one and use them as the seed for the Fibonacci sequence, larger magnitude first, i.e.

$-55, 34, \cdots$

Carry it out, and you'll eventually get the Fibonacci sequence, or it's negative:

$-55, 34, -21, 13, -8, 5, -3, 2, -1, 1, 0, 1, 1 \cdots$

This is NOT a general property of difference...


Data Types for Control & DSP

Tim Wescott April 26, 20166 comments

There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.

I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code.  Numerically, this should work for most control problems, but it can be an extravagant use of processor resources.  There ought to be a better way to determine what precision you need...


PID Without a PhD

Tim Wescott April 26, 201614 comments

I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.

This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...


Finding the Best Optimum

Tim Wescott November 4, 2013

When I was in school learning electrical engineering I owned a large mental pot, full of simmering resentment against the curriculum as it was being taught.

It really started in my junior year, when we took Semiconductor Devices, or more accurately "how to build circuits using transistors". I had been seduced by the pure mathematics of sophomore EE courses, where all the circuit elements (resistors, capacitors, coils and -- oh the joy -- dependent sources) are ideally modeled, and the labs...


Of Forests and Trees and DSP

Tim Wescott February 10, 20083 comments

When Stephane invited me to write a blog for dsprelated.com I immediately came up with a flood of ideas for highly detailed, technical, narrowly focused articles related to the intersection of DSP and control systems.

Then the USENET groups that I frequent received a spate of posts from people that were either asking about how to implement highly detailed, narrowly focused algorithms in ways that were either fundamental misapplications or were flawed because they were having problems...


Re: mitigating phase shift

Reply posted 4 days ago (11/24/2022)
What are you using for a phase detector?  If you detect phase by multiplying by a sine wave, then you can filter noise after the multiplication.

Re: Whatever happened to "Wavelets"?

Reply posted 11 months ago (01/11/2022)
The popular technical press may have billed them as replacing the Fourier Transform, but I don't think the originators pretended that to be so.Otherwise -- what...

Re: Help with polynomial zeros

Reply posted 1 year ago (08/07/2021)
I'm enjoying this because it's making me think of something I haven't considered before.As a polynomial's order increases, the locations of the roots become ever...

Re: ARM IIR Filter - Why No DAC Output?

Reply posted 1 year ago (07/16/2021)
It looks like it ought to work -- but I don't have mileage with the CMSIS calls -- the work I've done on the Cortex cores hasn't included DSP.If it works the way...

Re: ARM IIR Filter - Why No DAC Output?

Reply posted 1 year ago (07/16/2021)
"This on an STM32L4 running at 80MHz"Do you mean you have an 80MHz processor clock rate, or you're sampling at 80MHz.If you're not sampling at 80MHz -- what is...

Re: Digital IIR Parallel Implementation

Reply posted 1 year ago (06/26/2021)
Oh man -- I've been trying to figure out how to do this for years.  And this is so obvious, and extensible to just about any first or second-order system.I would...

Re: DTFT optimization question

Reply posted 1 year ago (06/03/2021)
Oh my god!  I just realized that a Goertzel is pretty darned close to a super-regenerative receiver, only with the poles on the stability boundary instead of outside...

Re: DTFT optimization question

Reply posted 1 year ago (06/03/2021)
I have absolutely nothing against the Goertzel itself.  I do think that people tend to over-apply it; if you're thinking of using it you should do so in the context...

Re: DTFT optimization question

Reply posted 1 year ago (06/03/2021)
"Goertzel isn't an IIR filter. It is a recursive method of evaluating a polynomial in W_N."An IIR filter is a recursive method of evaluating a polynomial in W_N. ...

Re: DTFT optimization question

Reply posted 1 year ago (06/03/2021)
You say you need four sets of 70 coefficients, but you don't say what those are -- do you mean four sets of DTFT results at 70 different frequencies?

Re: DTFT optimization question

Reply posted 1 year ago (06/03/2021)
Bear in mind that the Goertzel algorithm may only require N multiplies and 2N adds per frequency, but -- being an IIR filter -- it will, in general, require a wider...

Re: Covariance Matrix diagonal or not?

Reply posted 2 years ago (05/27/2021)
Your results are correct.  Your statement that RxxPar should be non-singular is incorrect -- it should be$$\begin{bmatrix}24 & 24 & 0 //24 & 24 &...

Re: Covariance Matrix diagonal or not?

Reply posted 2 years ago (05/26/2021)
Could you show your results?  You keep posting code -- for Matlab, which I dislike -- and talking about your results, but you're not taking the trouble to show...

Re: Covariance Matrix diagonal or not?

Reply posted 2 years ago (05/26/2021)
The sequences still won't be orthogonal.

Re: Covariance Matrix diagonal or not?

Reply posted 2 years ago (05/25/2021)
You should show us your correlation matrices.I would expect, looking at that code, that none of the correlation matrices are diagonal, and that is because the signals...

Re: Viterbi equalizer

Reply posted 2 years ago (05/06/2021)
I did one project where I was literally trying to pull valid data out of the mud*.  I used what was essentially a DFE for this -- but each decision came with an...
On the splitter/combiner/diplexer.  My basic rule of thumb is that 20dB is no problem, 40dB is about as much as you want to expect from a commercial circuit, 60dB...
It sounds risky, but I'd have to do some math.  The general way that you do this is to make a chart of the frequency of every mixing product of every signal that...

Re: Low-pass filter image data

Reply posted 2 years ago (12/19/2020)
It seems to work, and if there's some other reply from you, it's gone.I'm looking for more info because I dislike having something that works dandy in practice but...

Re: Low-pass filter image data

Reply posted 2 years ago (12/18/2020)
I've been going off of this.  Which is nice, but isn't long on expositions on how to use it: http://epubs.siam.org/doi/pdf/10.1137/S00361445983...

Re: Low-pass filter image data

Reply posted 2 years ago (12/18/2020)
Another post I need to make is good books that include information on the DCT!  Something that's not over-the-top mathematically, yet is still rigorous enough that...

Low-pass filter image data

New thread started 2 years ago
I have some image data that I want to smooth out, but I want it to smooth out nicely to the edges.Fourier transforms wouldn't do this without windowing -- if you...
Good work!  May I suggest more work?  Probably in order of importance:Put a controller in there (or make it more obvious if it's already there!).  I'd start with...

Re: Will this FPGA be suitable for DSP purposes?

Reply posted 2 years ago (09/29/2020)
Not really enough information.  Look at the resources on the chip, and guesstimate how many MAC operations per second you need for each of the tasks.  You've got...

Re: SDR/DSP Question

Reply posted 2 years ago (08/15/2020)
There are just so many ways that you can do this that you're spoiled for choices.  In addition to the other suggestions, I have these:See if you can find a digital...

Re: Reflectometry in power lines (spread spectrum TDR)

Reply posted 2 years ago (08/12/2020)
I was going to write that!Reasons to go to a longer PN sequence that I can see are either because the longest return time is longer than your PN sequence repeat...

Re: Moving Average Filter's Magnitude Response

Reply posted 2 years ago (07/27/2020)
You do not say how you are actually calculating the moving average filter's magnitude response.  I suspect numerically, and without a lot of insight.  The MA filter's...

Re: DSP chip ??

Reply posted 2 years ago (07/01/2020)
The way that problem is solved these days is by getting an evaluation board.  Most chip companies have them for the parts they have in current production.DigiKey...

Re: A DSP Online Conference?

Reply posted 2 years ago (06/29/2020)
"Nyquist didn't say that: Common misconceptions about sampling, and how to get the job done right".If you're interested, and don't mind the fact that it'll be based...

Re: A DSP Online Conference?

Reply posted 2 years ago (06/29/2020)
Me, too.

Re: Fourier transform question

Reply posted 2 years ago (06/18/2020)
Have you tried just finding $$ Y(e^\omega) $$ symbolically, and then solving?  For $$ \omega \in \left \lbrace 2 \pi k / 5 \right \rbrace $$ there should only be...

Re: PhD in E.E. is it really worth it

Reply posted 3 years ago (05/10/2020)
I would like it if someone would check my math on this, but I have the impression that having an advanced degree makes it easier to get hired with gray hair (i.e.,...

Re: PhD in E.E. is it really worth it

Reply posted 3 years ago (05/10/2020)
All the above, plus, writing a thesis teaches you -- and shows that you can -- write a book-length work.I've worked with PhD's who wouldn't get their hands dirty,...

Re: Undersampling FM radio frequencies

Reply posted 3 years ago (04/30/2020)
The ADC specs have nearly nothing to do with your 100MHz sine wave.If you can get the FPGA to generate a 100MHz square wave, then buffer it and filter it.If you're...

Re: Undersampling FM radio frequencies

Reply posted 3 years ago (04/30/2020)
That plot is for the signal that's fed to the modulator.  But it's FM, so the modulation process is nonlinear. That means that you cannot pick and choose what part...

Re: Undersampling FM radio frequencies

Reply posted 3 years ago (04/30/2020)
You have a fundamental problem.  You want to deal with FM radio -- broadcast radio by the frequency you quote -- but you have a board with a 200ksps ADC.The frequency...

Re: Covid-19 Stories

Reply posted 3 years ago (03/27/2020)
My story is similar to everyone else's.  I changed jobs to a startup in the middle of January (I'm employee #5 -- I had a shot at #4, but I'd stepped out of the...
It had a "figures", "letters", and "capitals" mode.  It's in Wikipedia.
Baudot-Murray is the 5-bit Teletype code that preceeded ASCII, so you can encode "hello world!" into 60 bits.
I'll never teach the class, so I need to mention it here:Take "hello world!", encode it into Baudot-Murray code (so, 60 bits out).Run it through a suitable rate...

Re: Sampling and using the data

Reply posted 3 years ago (03/17/2020)
And what's your sample rate?

Re: Sampling and using the data

Reply posted 3 years ago (03/17/2020)
What RBJ said about telling us what software you're using.  Better would be to tell us what that software actually does with the settings you set.Having said that:If...

Re: CIC Implementation details

Reply posted 3 years ago (12/31/2019)
As long as the register in question has enough bits to roll over no more than once for your maximum input magnitude, then you're fine.  So you can always go with...

Re: ADC sampling rate matlab/simulink M-PSK

Reply posted 3 years ago (12/24/2019)
You keep using "prove" in the same statements with Matlab.  In other words, you're asking how to prove something using experimental mathematics.You can use experimental...

Re: ADC sampling rate matlab/simulink M-PSK

Reply posted 3 years ago (12/24/2019)
"How will one confirm the Nyquist-Shannon theory given the above?"Forgive me if English is not your native language, but there's a terminology issue here.  It's...

Re: Guaranteed stable sliding Goertzel implementation

Reply posted 3 years ago (12/03/2019)
"For my applications, the output only needs to be calculated once per block of samples."Then you don't need a sliding anything!The "sliding" in sliding Goertzel...

Re: Guaranteed stable sliding Goertzel implementation

Reply posted 3 years ago (12/02/2019)
I doubt I'll be much help -- I lean more toward brute-force approaches (i.e. just make a sine table, and index into it).And, for the AM demodulation, again, same...

Re: Guaranteed stable sliding Goertzel implementation

Reply posted 3 years ago (12/02/2019)
Any zero-damping (infinite Q) resonator is metastable by definition.  Any noise that gets in will cause a response that persists forever.Any finite-precision operation...
Absolute amplitude matters if there's some nonlinear process -- even if it's "just digital" like truncation or saturation.But if the OP is assessing purely linear...

Re: Delta Sigma Modulator Decimation output

Reply posted 3 years ago (10/18/2019)
I can't give you an exact answer, but broadly there's one of three possibilities: Either the polyphase filter structure just inherently passes more out-of-band...
Everything that's been said, plus:It is simply your responsibility, as the system designer, to make sure that you use appropriate algorithms, and data paths that...

Re: CMSIS DSP ARM Complex FFT output arrangement

Reply posted 3 years ago (09/06/2019)
> The definition is different for the two cases and is different ...I would say "different for every different code library out there".  But maybe things have...

Re: Designing an IIR comb (peak) filter

Reply posted 3 years ago (09/03/2019)
$$ H(z) = \left(1 - d \right)\frac{z^N}{z^N - d} $$Choose $$ N = f_s / 10\mathrm{Hz} $$ and make d as small as you want your peaks to be pronounced.

Re: DAC dithering for low frequency signal measurement

Reply posted 3 years ago (08/23/2019)
If you have a 14bit, 125MSPS ADC, then it has way more than 1LSB of noise.  It's been a good long while since I've worked on this stuff, but if the noise has a...
I thought the linefeeds might be messing things up.  Hmm.  Should be $$ \dot x = A x + B\,(k\,\hat x) $$
Actually, the usual way I see Nyquist expressed is that if you are strictly below the limit, then you can perfectly reconstruct.  What's not mentioned is that if...
Nyquist did not say that when you plot your sampled signal on paper it will look like your continuous-time signal -- he just said you'd be able to reconstruct it...
This isn't rendering (at least not the first time):$$\dot x = A x + B (k \hat x)$$
(I'm doing this from memory, don't sic Rudi Kalman on me):\(P_n^- = F^T P_{n-1}^+ F + Q\)

Re: FFT Interpolation

Reply posted 3 years ago (07/26/2019)
I'm trying to remember who it was that was hard over on the "no, it's just a finite domain, don't make it periodic".  I think it was Rune Alnor.

Re: FFT Interpolation

Reply posted 3 years ago (07/26/2019)
It works for any finite domain, whether that finite-length thing represents the problem's entire world, or just one cycle of an infinitely repeating signal.

Re: FFT Interpolation

Reply posted 3 years ago (07/26/2019)
Here's the thinking that works for me:The DFT (of which the FFT is just an algorithm for fast computation) is exact for the data it's given, and mathematically at...

Re: FFT Interpolation

Reply posted 3 years ago (07/26/2019)
"The true spectral magnitude of a finite-length sequence of numbers is a continuous, infinite-resolution, infinitely fine-grained, curve."Uh -- point of order, honored...

Re: OFF TOPIC: A Question About PI

Reply posted 3 years ago (07/01/2019)
In English "irrational" means a number that cannot be expressed as a ratio of integers.  sqrt(-1) is called "imaginary", while A + B*sqrt(-1) is called "complex".(One...

Re: Machine learning and detection in noise

Reply posted 3 years ago (06/28/2019)
Tim's First Rule of Pragmatism: if you can do it with a rock, don't take the time to build a hammer (or even to get one from the shed).There are a lot of known algorithms...

Re: Clock drift and compensation

Reply posted 3 years ago (06/28/2019)
I would put a FIFO in there someplace (or look for one) and make that the "phase detector" of my PLL, with the setting for the sample rate conversion being the driven...

Re: Clock drift and compensation

Reply posted 3 years ago (06/28/2019)
Or if not, put a VXCO on the DSP and use it as the VCO of your PLL.  Which could look pretty demented, but should be solid if you get the controller right.

Re: Real to Complex conversion

Reply posted 3 years ago (06/28/2019)
What are you really doing, why do you believe that your suggested approach is a potential solution, and why do you believe that mixing is not a solution?

Re: Pool Ball Pendulum Animation in MATLAB

Reply posted 3 years ago (06/22/2019)
As far as when they line up -- if they're simple harmonic oscillators, then each will have a period p_n, and they'll line up when there's a set of integers N_n such...
Just a comment on this already-solved problem: a good way to test this sort of thing is to run a collection of impulses through the system at various delays (various...

Re: Simulating higher order all-pass filters in matlab?

Reply posted 4 years ago (05/17/2019)
First, I'm almost certain that convolving a with b is not the way to go.Second, Matlab should have a set of functions that will take a ratio of polynomials and...

Re: The Spectral Complexity of a Single Musical Note

Reply posted 4 years ago (05/07/2019)
Bells are weak in their fundamentals: https://en.wikipedia.org/wiki/Strike_tone.The inharmonicity is a known thing, and it's why the partials are called that, and...
You need to spiff up your memory, for sure.Yes, the decimator is not linear time invariant (LTI).  That is because the sampling step is time-varying.  So it cannot...

Phase Locked Loop Books in a time of DSP

New thread started 4 years ago
I was just explaining to my last remaining customer that when I need to do a phase locked loop in DSP, as likely as not I open my 28 year old book on phase locked...

Re: Not understanding digital signal processing

Reply posted 4 years ago (01/07/2019)
It does need to be broken apart, but it should yield given patience.> x(n) = sin(2pi * f * nt) = sin(2pi * f * nt + 2pi * m) = sin(2pi(f + m/nt)nt)First part:> sin(2pi...

Re: Real to Complex conversion

Reply posted 4 years ago (12/14/2018)
In the case of (a), you are (probably) ignoring the fact that the real signal has a spectrum that's symmetric around f = 0.  So when you down-sample by 2 that spectrum...

Re: Hilbert-Huang Transform

Reply posted 4 years ago (11/07/2018)
Interesting.  I have a very intense pet peeve about the term "nonlinear signal" -- linearity is simply not a property of a signal, but rather of a system that may...

Re: Hilbert-Huang Transform

Reply posted 4 years ago (11/07/2018)
Agh!  You had a link in there, I just didn't see it last time -- I forget that my phone doesn't color-code links well at all.

Re: Hilbert-Huang Transform

Reply posted 4 years ago (11/06/2018)
Link?
Are you actively deciding on what operations to do in the frequency domain each time, or are you making decisions on a per-batch basis, or are you always doing...

Re: Starting point for non-gaussian estimation

Reply posted 4 years ago (09/28/2018)
I have ingested caffeine, but it is still working its way into my bloodstream.  So my answers may be a bit elliptical.First, just treating the process as having...
Quoting things out of order:"I need to select a bandwidth of about 10 KHz so the only way to do this is implementing a multirate filter."No.  If you need a bandwidth...
As I posted below in reply to someone, no, it probably won't help.However -- do you mean actual real-time delay, or do you mean group delay that varies with frequency? ...
Yes.  The transfer function determines the delay.  Putting two low-pass filters in parallel will, in general, give you a different transfer function.  \(H_1 +...

Re: Tones in sigma delta modulator and dithering

Reply posted 4 years ago (07/26/2018)
"(One might then argue that the FCC testing requirements should rely more on averaging and not peaks, but it is what it is.)"One might argue in reply that in a...
To answer the question posed in your title: yes.  Because you could always use a bit-accurate simulation of your Verilog or VHDL code.The really slow and pedantic,...

Re: Arbitrary Resampling issue : 30.72 MHz to 20 MHz

Reply posted 5 years ago (05/29/2018)
Your original text says that the sampling rates are 30.72MHz and 20MHz, but your drawing seems to indicate that you're talking about carriers -- except that those...

Re: Arbitrary Resampling issue : 30.72 MHz to 20 MHz

Reply posted 5 years ago (05/28/2018)
Until I ran into some compelling reason to do otherwise, I would sample it at whatever was convenient, bring it down to baseband at a sampling rate that is appropriate...

Re: Direction finding with Uniform Circular Array

Reply posted 5 years ago (05/28/2018)
This set of slides may help.  I only read it deeply enough to know that the author isn't full of BS, and I only read through the first half of the section on doppler...

Re: Arbitrary Resampling issue : 30.72 MHz to 20 MHz

Reply posted 5 years ago (05/28/2018)
Does the sampling rate at the receiver need to match the sampling rate at the transmitter? 

Re: A Mathematical Notation Suggestion

Reply posted 5 years ago (05/20/2018)
Well, he was!  Those poor murderous psycho-killers!I didn't mean to be confrontational.  Correcting laziness in writing is good, and I'm all for it -- unless there's...

Re: A Mathematical Notation Suggestion

Reply posted 5 years ago (05/20/2018)
Except: Rick may want to get input from academics whose first language is not English.  On the one hand, I'm certain that there's folks out there who can barely...

Re: Online interpolation of temporal signal

Reply posted 5 years ago (05/16/2018)
I see green bars arriving at irregular time intervals and of large positive magnitude, from which you are "interpolating" black dots at (presumably) regular time...
Oh, and -- you are correct in your sampling rate worries.  The frequency response of the filter is relative to the signal's frequencies in radians (or cycles) per...
First, pay attention to the wrong transfer function -- a better one to think with would be H = 0.1/(z - 0.9).Second, you calculate the gain of the transfer function...
Hah.  My eyeballs passed right over that.  It should (I'm sure, really!) be \( H \left( z \right) = \frac{1}{z - 0.9} \).  Better would be \( H \left( z \right)...

Re: Looking for a good tutorial for Viterbi decoding

Reply posted 5 years ago (05/05/2018)
Oooh.  Looks good.  I'll forward the link -- thanks.
I've got a really good idea of how Viterbi decoding works, but I'm working with someone who needs to look at some code that I've written and understand it.  He's...
Question 1:First and foremost, you seem stuck on representing the streams as binary.  In amath-land, each channel of an audio stream would be represented as a vector...

Re: CIC Filter "zero-crossing" Distortion

Reply posted 5 years ago (04/14/2018)
I'm a bit suspicious of the word width of 18 for the last differentiator.  Either it needs to be 19, or you need to do something fancy in that last comb to allow...

Re: z-transform: Confused on how to find ROC of H(z)

Reply posted 5 years ago (04/10/2018)
I never got deeply into that ROC stuff, because I've never been able to extract much physical meaning from it.In general, I'm not sure that you can determine the...
(Sorry for the slow response).  Ah, I see.  That's still an issue with floating point.  Even if you've got more than enough overhead in theory-land, there's still...

Re: Proper Overflow Adjustment

Reply posted 5 years ago (03/10/2018)
Mixed by adding all the channels together?  If so, the overflow could be happening in the mixer.

Re: Proper Overflow Adjustment

Reply posted 5 years ago (03/10/2018)
Are you sure you're overflowing in that step?  Running the code on a test vector and looking at the output may be instructional.  It certainly sounds nasty --...
"why wouldn’t the simplest method of cascading first order filters work?"Because you need to decompose the filter into sections that have real coefficients. ...
It's not cascading IIR filters that lands you in numerical difficulty.  You want filters of as low an order as possible, which is 1st or 2nd, depending on the...

Re: spectrum of rectangular pulse using two methods

Reply posted 5 years ago (03/03/2018)
You are misapplying the math.  You are comparing apples to oranges.  You are -- well, you are making words fail me.The sync function is the Fourier transform of...

Re: spectrum of rectangular pulse using two methods

Reply posted 5 years ago (03/03/2018)
Yes.  The formal method that I learned for modeling mixed continuous- and discrete-time systems is to model the discrete-time signals as trains of impulses with...

Re: How to Obtain Biquad Coefficients

Reply posted 5 years ago (02/20/2018)
D'oh.  Too much Scilab -- Scilab just gives you transfer functions, not anonymous arrays of coefficients.

Re: Looking for tips to improve SNR

Reply posted 5 years ago (02/20/2018)
"Non-AM demodulation Method:Thinking more about this, perhaps there's a way to perform tone detection on the upper sideband tone only, and eliminate the AM demodulation...

Re: How to Obtain Biquad Coefficients

Reply posted 5 years ago (02/19/2018)
Divide every coefficient by \(b_0\), i.e. \(a_0' = \frac{a_0}{b_0}\), \(b_1' = \frac{b_1}{b_0}\), etc..  The resulting \(b_0'\) will be equal to 1.  Assuming...

Re: Frequency Shifting Confusion

Reply posted 5 years ago (02/09/2018)
I hate it when I do that.  Having the ' operator do a conjugate transpose is exactly correct, but forgetting that is a pain. .' to the rescue.

Re: Ideas for simple bitrate regulation

Reply posted 5 years ago (02/08/2018)
If the clock coming in is unambiguous then you should have to problem.It's when the clock has to be recovered from the signal, or when there's lots of noise, or...

Re: Clock drift and compensation

Reply posted 5 years ago (01/28/2018)
I've done similar for genlocked video, although in this case we were strictly locked at the output end, and varied the timing of a camera at the source end.  But...

Re: Looking for tips to improve SNR

Reply posted 5 years ago (01/25/2018)
You are asking the guy with the worst Google-fu in the universe for keywords.  Just so you know."Matched filter to a pulsed tone" is probably close, but may not...

Re: Looking for tips to improve SNR

Reply posted 5 years ago (01/24/2018)
"when I tried using an FFT with these data several of my tones fell between frequency domain samples and appeared as broader peaks with lower magnitudes."Well, yes,...

Re: Looking for tips to improve SNR

Reply posted 5 years ago (01/24/2018)
Your filter length is 60ms (give or take a few samples).  The Goertzel algorithm implements a boxcar-in-time filter (which translates into a sinc function centered...

Re: Looking for tips to improve SNR

Reply posted 5 years ago (01/24/2018)
SNR = 10dB with respect to what bandwidth?  The bandwidth after running through the Goertzel filter (i.e., about 1/T), or the total bandwidth of your signal?

Re: Looking for tips to improve SNR

Reply posted 5 years ago (01/24/2018)
I get a lot of flak for being an anti-fan of the Goertzel (it's fine for teeny processors, but if you can spend some clock ticks in the interest of clarity, ...)The...

Re: Artifacts in Time Varying IIR Filters

Reply posted 5 years ago (01/06/2018)
Some thoughts:There are basically two things that you're dealing with here: first, the suitability of biquads for IIR filters in general; and second, how you might...

Re: Artifacts in Time Varying IIR Filters

Reply posted 5 years ago (01/05/2018)
"Fred, the filter is implemented using single precision floating-point data.  I couldn’t find links to your papers, but will keep looking, I’d love to read...

Re: Artifacts in Time Varying IIR Filters

Reply posted 5 years ago (01/05/2018)
Hey Fred:Am I correct that your complex 1st-order filter is similar to (or the same as) a 2nd-order state-space with a state transition matrix of something like...

Re: How to downconvert a Complex RF signal in Matlab?

Reply posted 5 years ago (12/26/2017)
What Eric is saying (if it's not clear) is that if the Rayleigh fading channel model is complex, it's implicitly modeling the up- and down-conversion, and acting...
Model the delay in your Kalman filter.  If it's really exactly two samples, it should be easy -- just put two stages of pure delay into the system model (your \(A\)...

Re: Help on Demodulating an 8-PSK Signal

Reply posted 5 years ago (12/17/2017)
Oi.  Even this is hard to get out succinctly:Don't downconvert the RF to baseband.  Get it down to a frequency that you can sample with your ADC, then sample,...

Re: Upsampling of data

Reply posted 5 years ago (11/20/2017)
You can even do something like use DFTs with zero padding, e.g., take the DFT of the length N array, zero pad it up to 2048, take the inverse DFT back to the original...
You need to multiply by a sine wave of the appropriate frequency.  This is a downside of sampled-time control.  Using an XOR effectively means that you're multiplying...

Re: Off Topic: A geometry problem

Reply posted 5 years ago (11/17/2017)
I've seen this problem before, only stated better.  At least I'm pretty sure that's the case.  If so, what they left out of the problem statement is that you can...
Most important: You can look at the command to the VCO to get an idea if the problem is the spectral purity of the VCO itself or if you're giving it a noisy command. ...

Re: "Real" data?

Reply posted 5 years ago (11/15/2017)
See my reply to Fred.  It almost always means that just one channel is being sampled (or that the speaker is talking about the inphase part of a quadrature pair),...

Re: "Real" data?

Reply posted 5 years ago (11/15/2017)
Called "Re" and "Im" (or "complex" when you're talking about the pair of 'em) because a quadrature pair of signals acts like a complex signal, with, for the most...

Re: AGC on FPGA

Reply posted 5 years ago (11/15/2017)
Ooh ooh!  I get to use "homologous" in it's natural habitat!Because if you do the naive AGC loop, then the loop gain is proportional to the AGC gain and (if I recall...

Re: Quick question on Deconvolution

Reply posted 5 years ago (11/05/2017)
My question pertains to the "estimated" portion (in red). If we know h (our convoled signal) and g (our impulse response), is our deconvolved signal the same...
Do you know your way around dB? The RMS bit is confusing, but is probably 1uPa RMS and -196 dBRMS. We're it me I'd double-check, but assume that you just need to...

Re: DDS jitter

Reply posted 5 years ago (11/04/2017)
I'm not sure that this is a PhD level subject -- in practical terms, a determined guy with a math-heavy master's degree can pursue the calculation beyond the point...
This is kind of a reiteration of what Fred's saying, but here's a step-by-step.First, decide whether you want to pretend that the frequency response is flat, correct...

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
What anti-aliasing filter should I use in my control loop?

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
Why does my anti-aliasing filter make my EKG response look worse?  (Because it's ringing!)

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
How can people get away with sampling radio signals at less than the carrier frequency?

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
If I'm sampling a power line at 60 (or 50) Hertz, why is 120 (or 100) Hertz just about the worst choice of sampling rates?

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
Why can't I set my anti-aliasing filter cutoff equal to the Nyquist frequency?  Why must it be lower?  How much lower?

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
And when we don't.  And what it means.

Re: New DSP FAQ Section - please suggest topics

Reply posted 5 years ago (10/26/2017)
Pretty much everything addressed in Sampling: What Nyquist Didn't Say, and What to Do About It.  It all came from questions that were asked frequently, so it should...

Re: Digital Modulation Methods

Reply posted 5 years ago (10/22/2017)
And even though I've re-read your original post, I have no clue what your second question is!!!Your constellation diagram would work.  A normalized signal power...

Re: Noise aliasing with CIC filter

Reply posted 5 years ago (10/19/2017)
I'm not entirely sure what you're trying to say here, because with a constant input sample rate, changing the decimation ratio changes the output sampling rate. ...

Re: Audio FFT Filter, noisy clicks

Reply posted 5 years ago (10/17/2017)
I'm glad that things are better.  That shouldn't happen, and doing an FFT followed by another FFT will result in a time-reversed signal.  Either there's something...

Re: Audio FFT Filter, noisy clicks

Reply posted 5 years ago (10/17/2017)
Well, no.  Sampling from a real signal introduces a jump.  The FFT itself loses no information, and "edinsam" is perfectly correct that an FFT followed by an IFFT...

Re: Audio FFT Filter, noisy clicks

Reply posted 5 years ago (10/17/2017)
You are doing a forward transform and then an inverse one, yes?It may be very instructive to calculate X from x with a forward transform, then x' from X with a...
John beat me to it.  Some additional points:The phase modulation will be different for different frequencies in the input spectra -- a 1Hz input signal will have...

Re: Choice between Scilab and Python + numpy

Reply posted 5 years ago (09/11/2017)
Scilab's treatment of transfer functions is way superior to Matlab's.  For over a decade it was the product of a grad school of control systems engineering, and...

Re: An Oddball Electrical Engineering Question

Reply posted 5 years ago (09/11/2017)
I'm not sure how big a transistor has to be to withstand 5V, but yea, that sounds like you're in the ballpark.This document lists the dielectric strength of intrinsic...

Re: Book tips for "control systems"

Reply posted 5 years ago (09/07/2017)
I do not know about availability in Switzerland specifically, but I do know it's sold world-wide.  Amazon (in the US at least) has a substantial preview -- I got...

Re: Extract a period from a unkown signal

Reply posted 5 years ago (09/04/2017)
You haven't told us enough, but if that FFT is representative, you may just be able to low-pass filter, or band-pass filter, the signal and then see clean-enough...

Re: Removing a known noise component from a signal

Reply posted 5 years ago (08/31/2017)
Is that typical?  Because the graphs are saturating, which is way bad.  You sure there's not equipment problems?

Re: Book tips for "control systems"

Reply posted 5 years ago (08/30/2017)
Consider "Applied Control Theory for Embedded Systems", by moi.  If there were such a thing as a MacArthur sub-genius grant, I could maybe afford to take some time...

Re: Narrow band filter at high rate

Reply posted 5 years ago (08/27/2017)
Basically, bandwidth vs. group delay is kind of like the laws of thermodynamics: you can't win, you can't break even, and you can't even get out of the game.More...
Hey Neil:I've done this sort of thing before.  As long as the capturing counter's clock tick is small enough it all works.  You can treat it as quantization noise,...

Re: DSP Windowing function

Reply posted 5 years ago (08/23/2017)
If resources are REALLY constrained you may end up needing to find windowing functions that are a better fit with the resources and finding which is most acceptable,...

Re: Goertzel algorithm

Reply posted 5 years ago (08/23/2017)
I couldn't tell you exactly how without wrapping myself in math for a while, but if you mind your p's and q's you should only need \(N\) points.  Get the math right...
I did not realize that the \(\pm\)10% was a fallback from a desired \(\pm\)2%.  That's what set off the alarm bells.Without having any information about how rapidly...
So, in one place you say that the input square wave will vary by up to 10% of the expected value (10% of what?), and someplace else you say you need to track it...

Re: Burg's Recursion anomalies

Reply posted 5 years ago (08/20/2017)
Code it up in Matlab or Scilab, and see if it works?  I don't know squat about Burg, but if an algorithm looks good on paper but misbehaves in C++ I'll see if I...

Re: FIR All pass filter with Linear Phase

Reply posted 5 years ago (08/12/2017)
We're all trying to figure out what you really want, and then answering the question we imagine you should be asking -- so refining your question for us may be a...
It's really a function of getting the data acquired.  There's no solid answer because speed, resolution, and cost are one of those classic trade-off triangles....

Re: DSB-SC demodulation

Reply posted 5 years ago (07/12/2017)
Oy crap.  I missed the DSB-SC part, 'cuz I just skipped down to the math.Are the sidebands identical?  (I.e., is it AM  suppressed carrier?  Or is it stereo...

Re: using eye diagram to model output waveform

Reply posted 5 years ago (07/12/2017)
I forgot to ask if you have the original data stream.I'm assuming that your channel acts like\[r = h\left(s\right) + n\]where \(s\) is the transmitted signal, \(r\)...

Re: DSB-SC demodulation

Reply posted 5 years ago (07/12/2017)
I think you're already set, but the least computationally intensive way to shift your signal in frequency is to multiply it by a complex sinusoid in the time domain.What...

Re: using eye diagram to model output waveform

Reply posted 5 years ago (07/11/2017)
Just an eye diagram won't be sufficient if you have significant intersymbol interference. Do you have the underlying time-domain data? 
I don't know that it's a book-length subject.  I could see getting a medium-sized chapter out of it in a larger practical DSP book, but not a whole book in its...
I'm not familiar with Matlab functions, but it looks like your frequency response off by what appears to be a factor of pi -- are you calling the fir2 function with...

Re: Spherical Mapping/Unmapping

Reply posted 5 years ago (06/30/2017)
Any arbitrary rotation in 3D, small rotations, rotations in 2D only, what?This may be a "can't get there from here" sort of problem, at least not without an exhaustive...

Re: Creating Frequency Selective time invariant channel

Reply posted 5 years ago (06/28/2017)
"The equation" that you refer to is an impulse response.  You might want to study up on what that means.  If you did know what it means, you'd know that it defines...
Unless the process is something like electrostatic noise, where there's a burst of noise any time there's a spark someplace (i.e., a lightning strike near or far). ...
The only thing that stationarity means is that absolute time isn't a factor in the statistics of the noise.  You could have an autocorrelation function that takes...

Re: Estimating SNR without windowing

Reply posted 5 years ago (06/17/2017)
Your problem is that the formula is subject to errors in calculating \(A\), and if you overestimate it, then you can get your negative number in the denominator.A...

Re: Estimating SNR without windowing

Reply posted 5 years ago (06/17/2017)
But that's what he's doing with his formula, basically.
1: I'm not sure exactly what they're attempting, but it looks like they're constructing a structure F that matches the input structure.  The "why" is because sometimes...

Re: A million UARTs....

Reply posted 5 years ago (06/03/2017)
It sounds like your top-level problem is to attach a bunch of sensors that talk using RS-232 to Ethernet?If you don't have any particular size or environmental constraints...

Re: A million UARTs....

Reply posted 5 years ago (06/03/2017)
Without knowing why you want a million UARTs on a router, I don't think anyone is going to be able to help you.

Re: complex values in Short-time Fourier Transform

Reply posted 5 years ago (06/01/2017)
atan(0 / 1) = 0.atan(0 / -1) = 0.atan(1 / 1) = pi/8atan(-1 / -1) = pi/8etc.What David said about atan2 -- you need to capture the whole picture on the phase, and...

Re: anti aliasing filter

Reply posted 6 years ago (05/19/2017)
So, first, put my summation together with the spectrum of the noise density at the sampling element, and yes, there's enough information.Second, please do a web...

Re: anti aliasing filter

Reply posted 6 years ago (05/18/2017)
Your confusion confuses me.  If my answer is right, and if you truly understand it, then you can answer your question yourself.But you didn't.  What's missing?...

Re: I need help

Reply posted 6 years ago (05/17/2017)
This makes sense to me.  If a symbol is destructively interfering with itself, then it can reduce the signal strength to an unlimited degree.  If, on the other...

Re: anti aliasing filter

Reply posted 6 years ago (05/17/2017)
You are sampling at \(F_s\).  Just from sampling, the signal at any frequency \(f\) gets contributions from \(f \pm F_s, f \pm 2F_s, \cdots\).If the noise is truly...

Re: Optimal Filter lineup selection

Reply posted 6 years ago (05/16/2017)
Keeping in mind that you can spend too much engineering time on things, I would just try each way and see how it works out.  Then you'll have a feel for it next...

Re: DFT

Reply posted 6 years ago (05/16/2017)
Actually, I posted this question after working out an FFT example. There are certain areas I did not understand. Hence my questions. Anyway, I am going to go back...

Re: DFT

Reply posted 6 years ago (05/15/2017)
1) The N points of X is the observation window in frequency domain. Is this correct?I've never heard the term "observation window" applied to the frequency domain....

Re: Magnitude/phase vs real/imaginary

Reply posted 6 years ago (05/10/2017)
I agree but my question is, what inference I can draw by looking at a re/im plot?Usually I infer that I wish the author of the plot had used magnitude/phase.

Re: AD9361 Filter Wizard

Reply posted 6 years ago (05/09/2017)
I'm assuming that the wizard uses Parks McLellan at its core.  Which is good if your problem fits the Parks McLellan mold.  In order to shoe-horn your 1:50 filter...

Re: AD9361 Filter Wizard

Reply posted 6 years ago (05/09/2017)
I'm actually an RF guy thrown in with a bunch of software engineers, so naturally I'm doing the DSP, right?!Of course!  All my formal training is in analog circuit...

Re: AD9361 Filter Wizard

Reply posted 6 years ago (05/09/2017)
Be aware that the software will design a filter it thinks you "want" rather than the filter you "need."Which is why I don't like wizards...

Re: AD9361 Filter Wizard

Reply posted 6 years ago (05/09/2017)
I'm not a fan of "wizards", so condition my answers accordingly.1: Are you using a set filter length?  For similar passband flatness and stopband attenuation, your...

Re: DSP Filter Verification in FPGA

Reply posted 6 years ago (05/05/2017)
What is the DC gain of your filter, and the maximum gain?  Worst-case maximum gain is the sum of the absolute values of the coefficients.

Re: DFT of a signal and system

Reply posted 6 years ago (05/05/2017)
Since everyone's diving in:It is the same DFT.  It is the same because the impulse response of a linear, time-invariant system contains all the information that...

Re: DFT of a signal and system

Reply posted 6 years ago (05/05/2017)
Windowing is applied to signals before you do a DFT for spectral analysis.  It is not, in general, applied before filtering.

Re: Subharmonic distortion?

Reply posted 6 years ago (04/28/2017)
Changing the source frequency, both by a bit and by a lot may also be informative. 

Re: Subharmonic distortion?

Reply posted 6 years ago (04/27/2017)
Google parametric oscillation and subharmonic oscillation.  It's a thing.  I suspect it's not what you're seeing, and I'd look for other things first -- but who...

Re: Filtering of amplitude spectrum

Reply posted 6 years ago (04/21/2017)
Do you really want to perform a moving average on the amplitude, as opposed to performing a moving average on the signal itself?If the answer is yes, then just...

Re: Back to back CIC filters

Reply posted 6 years ago (04/21/2017)
slash open-paren, math, slash close-paren.This may work:\(\frac{z - 1}{z}\) and\(\frac{z - 1}{z}\) 

Re: Back to back CIC filters

Reply posted 6 years ago (04/21/2017)
For the combs and integrators that he's talking about, the sampling rate is the same -- so from that perspective I not only see no reason why they can't be optimized...

Re: Back to back CIC filters

Reply posted 6 years ago (04/21/2017)
I think it's time to grab a pencil and paper and work it out.  Or do some simulations.

Re: Back to back CIC filters

Reply posted 6 years ago (04/21/2017)
Y'know, when I'm dealing with a smart person who I think is wrong, and the discussion isn't proceeding, I often just go dark while I scurry off and try stuff out...

Re: Back to back CIC filters

Reply posted 6 years ago (04/21/2017)
I'm pretty sure that's not true, or at least not in the way that you think.  You have \(\frac{z - 1}{z}\) cascaded with \(\frac{z}{z - 1}\), so the product is one. ...

Re: Correct method to add AWGN

Reply posted 6 years ago (04/14/2017)
I think you may be embedded too deep in theory-land.Gaussian noise comes from the environment and from the receiver.  In general there is no significant amount...
Thank you for your update.  You just reminded me of something I should have already known.

Re: dsp in optical fiber or wireless

Reply posted 6 years ago (04/13/2017)
I really need to write up this rant and post it on my website.DSP is not Matlab.  And Matlab is not DSP.  Physics is not Matlab, and Matlab is not Physics.  Knowing...

Re: PAPR (peak to average power ratio)

Reply posted 6 years ago (04/13/2017)
For the same average power, power amplifiers that can handle higher peak powers cost more and are harder to get right.  There's a big bump from an amplifier designed...
Wow.  That would certainly make things tedious, and may mean it's better to do it by experiment after all.  Do you know every possible set of coefficients, or...
Tell us about the filter and maybe someone (maybe even someone named Tim) will help you to figure out how to analyze it analytically.
Everyone uses the term "dynamic range" differently, so it's good to either mention what service you're talking about, or go ahead and define it.If you're just interested...

Re: Correct method to add AWGN

Reply posted 6 years ago (04/11/2017)
The "A" in AWGN stands for "additive".  So all that your "awgn(x)" function is doing is adding in white Gaussian noise.So, now you know.  Think about it, and then...

Re: Correct method to add AWGN

Reply posted 6 years ago (04/11/2017)
Eb is the energy per bit.  N0 is the noise energy per bit.  White noise comes in power per Hz -- you need to solve for that to get the right noise level.

Re: ARM CMSIS FFT output scaling

Reply posted 6 years ago (04/08/2017)
First, if there's a formal, or even an ad-hoc industry standard, you want to follow it or know why you're deviating from it.Second, a sample-by-sample FFT can be...

Re: ARM CMSIS FFT output scaling

Reply posted 6 years ago (04/08/2017)
Isn't the magnitude of the sine-wave the G-load (ie no power scaling)?Oi.  That seems like a simple question, doesn't it?Possibly not in any sensible way, unless...

Re: ARM CMSIS FFT output scaling

Reply posted 6 years ago (04/07/2017)
Well, not really.  The total energy in the FFT bins will be the same as the total energy in the time-domain signal.  Consider that a unit-magnitude sine wave has...

Re: How to calculate time delay estimation?

Reply posted 6 years ago (04/07/2017)
Specifically, run the transmitted data through various filters and see how well the correlation works.  Some signals do better than others when you're trying to...

Re: ARM CMSIS FFT output scaling

Reply posted 6 years ago (04/07/2017)
The normal FFT -- as in, done more than \(99 \frac{44}{100}\) percent of the time -- expects complex inputs, and gives you frequency bins corresponding to a complex...

Re: Odd Convolution Results

Reply posted 6 years ago (04/06/2017)
Oh damn.  Now that I see the spectrograms I realize that if you ran that dry signal through that filter, the answer would be zero.  Don't believe me, though --...

Re: Odd Convolution Results

Reply posted 6 years ago (04/06/2017)
OK, that sounds wacky.Given a specific dry signal that has holes in the spectrum, then you could design an impulse response that was rich in energy where the dry...

Re: Can we paralleize the integrator stage of CIC?

Reply posted 6 years ago (04/06/2017)
Dunno if this is the right answer, but search on "pipelined adder", or maybe "pipelined accumulator".  I just tried it and got oodles of results that at least looked...

Re: Odd Convolution Results

Reply posted 6 years ago (04/06/2017)
Before I do that, could you post the abstract of your thesis in a new thread, with a title along the lines of "Is This Work Feasible?".  Maybe include the core...

Re: Odd Convolution Results

Reply posted 6 years ago (04/06/2017)
Yes and no.Theoretically, in a perfect scenario, you could deduce the room response with THAT wet signal generated by THAT dry signal (the gated 40Hz tone).Realistically,...

Re: Odd Convolution Results

Reply posted 6 years ago (04/05/2017)
So, first, we're running afoul of the correct definition of a sine wave.  In the mathematically pure sense, a 40Hz sine wave has been going at 40Hz since forever,...

Re: Odd Convolution Results

Reply posted 6 years ago (04/05/2017)
I'm a bit out of my area of expertise here, but I believe that it is not only possible, but a done thing to find the impulse response of a system given a "dry"...

Re: Odd Convolution Results

Reply posted 6 years ago (04/05/2017)
A reversed impulse response will have the same frequency response only inverted phase (now, I didn't check that against the formulas - its just my feeling).You are...

Re: Odd Convolution Results

Reply posted 6 years ago (04/05/2017)
By "irregular", we mean IR's which don't adhere to the standard definition of an IR (ex. drop in amplitude by 60 db).Huh?  I've never heard this term.  Is it specific...

Re: Noise removing

Reply posted 6 years ago (04/04/2017)
So, you're making a FIR filter 30 taps long?  That's not nearly long enough for decimation by a factor of 23.  I'm guessing something that's 200 taps long or more...

Re: Noise removing

Reply posted 6 years ago (04/04/2017)
It looks like a reasonable block diagram.  Doing some low-pass filtering after the demodulate step might help a little, but I'd be surprised if it made your problems...

Re: Real or complex FFT on IQ data

Reply posted 6 years ago (04/03/2017)
OK.  If you have an ordinary old FFT with a purely real (or, for that matter, purely imaginary) input, then the output will, by necessity, be mirrored around DC....

Re: Real or complex FFT on IQ data

Reply posted 6 years ago (04/03/2017)
I'm not sure what your mean by "real FFT" then -- an FFT can have real-valued inputs, but the output is going to be complex for all but some special-case inputs.So...

Re: The MathJax CDN is shutting down on April 30, 2017!

Reply posted 6 years ago (03/31/2017)
And thank you for keeping up the site.  Mathjax is \(\mathrm{cool}^2\).

Re: Real or complex FFT on IQ data

Reply posted 6 years ago (03/30/2017)
The way you stated it (the response to the cosine vs. the sine basis functions) is correct, but doesn't reflect what matters in the real world.  I can't think of...

Re: Real or complex FFT on IQ data

Reply posted 6 years ago (03/30/2017)
In the end, you want to perform complex FFTs.  IQ data is basically modeling complex data, so, do a complex FFT.

Re: Hermitian matrix

Reply posted 6 years ago (03/29/2017)
Nothing really specific, however in nearly all the applications in linear algebra where you'd take the transpose of a real-valued matrix, you take the Hermitian...

Re: Hermitian matrix

Reply posted 6 years ago (03/27/2017)
Matrix conjugate is just the element-wise, plain old complex conjugate.  There's nothing special about the "matrix" part.
"i guess i still dont get how the noise in my stopband is folded back into the passband"Read my paper (or anyone's for that matter).  After sampling, a signal at...
This article may also help: http://wescottdesign.com/articles/Sampling/samplin....Go down to the section titled "Nyquist and Filters".I'm not sure if I give an exact...

Re: PDM asynchronous sample rate conversion

Reply posted 6 years ago (03/21/2017)
Wow.  Mark just said exactly what I would have said, only (probably) better.I have not used this code, but I've seen it highly recommended, and it looks like it'll...

Re: ZigBee and Multipath

Reply posted 6 years ago (03/18/2017)
I was under the impression that in DSSS systems you could choose the largest correlation peak and run with it -- at least if you've got a few distinct reflections,...
Any such hack requires an "attack surface".  I'd be surprised if there was something that would allow much more than disabling the phone's ability to precisely...

Re: Standard deviation in DSP

Reply posted 6 years ago (03/11/2017)
Whoops.  I missed that.  Sorry.

Re: Signal power at the receiver

Reply posted 6 years ago (03/11/2017)
Ignoring noise, on the baseband side the signals will have the same shape but different amplitudes.  Paying attention to the noise, the signals will have different...

Re: Signal power at the receiver

Reply posted 6 years ago (03/11/2017)
Typically, the signal strength of received signals in an RF link will vary widely, and sometimes rapidly.  It's the job of the system designer to design signals...

Re: Signal power at the receiver

Reply posted 6 years ago (03/11/2017)
I well-designed receiver should be pretty robust in the face of the intended receive signal's power being very strong.  If the wrong combination of interfereing...

Re: Signal power at the receiver

Reply posted 6 years ago (03/11/2017)
In the wide-band case, if the bandwidth is wide because the symbol length is short, then a multipath delay that's a significant proportion (or even longer than)...

Re: Standard deviation in DSP

Reply posted 6 years ago (03/11/2017)
>and how does the round-off error occur in the calculations?jms_nh's link answers this, but the short answer is that floating-point numbers are subject to the...

Re: Standard deviation in DSP

Reply posted 6 years ago (03/11/2017)
You mean \( \left| k_i \right| < 6\sigma \).  Otherwise -- yes, you beat me to it, and said exactly what I would have said.

Re: Data prediction in small embedded systems

Reply posted 6 years ago (03/08/2017)
In order: Wiener filtering,  Kalmar filtering,  and neutral nets with the training done offline. Doing any kind of prediction without knowing the underlying process...
"Du hast entweder eine Seite erreicht, die nicht angezeight werden kann, oder die Anqeigebechraenkung fuer dieses Buch erreicht" (umlauts mangled).My German is only...

Re: measure signal power

Reply posted 6 years ago (03/03/2017)
The only thing that I'd add to this is that if you're RMS-ing noise, it can take an astonishingly long averaging interval to get a good-looking output.  I've never...
For a given size of thing, low-frequency sounds would certainly refract more, and regardless of any technical definitions of "scatter" they'd get spread around.So...
I think you need to find another web site to trust.  You're getting some basic physics wrong.1: Yes, different frequencies will be reflected at different amplitudes...

Re: On-Off Keying Communications

Reply posted 6 years ago (02/27/2017)
If the signal is 500Mbps NRZ, and you sample the receiver at 500Msps and you don't happen to get the receive samples lined up with the peaks of the symbols, then...

Re: On-Off Keying Communications

Reply posted 6 years ago (02/27/2017)
NRZ and OOK are mutually contradictory.  Is your signal on (not zero) and off (return to zero), or is it something else?

Re: On-Off Keying Communications

Reply posted 6 years ago (02/27/2017)
2B (1Rb) if the sampling is synchronized to the incoming bits, yes.  But if you need to do bit synchronization then you need to sample faster, and the slower you...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/22/2017)
First, if it measures time, it's a clock.Second, if it makes one precise interval, you can easily modify it to keep on making precise intervals -- then it's a clock...

Re: Filter design

Reply posted 6 years ago (02/22/2017)
I'm not familiar with Matlab, but from that code scrap, the 'fir1' routine wants a cutoff frequency in per-sample units.  So if you want to specify the filter in...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/21/2017)
The problem with that logic is that it breaks down when you invent the World's Best Clock -- because then you have nothing to check it against.  In your example,...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/21/2017)
I'm not sure exactly what you're proposing, but you'd need to get \(\sigma_{BC}^2\) by measurement.  Basically, you'll need three equations in three unknowns (with...

Re: Interpolation and filter gain

Reply posted 6 years ago (02/21/2017)
As an added bonus, if you design it right a half-band filter is zero on every other tap except for the center tap, so the math is reduced even further.  I'm trying...

Re: Interpolation and filter gain

Reply posted 6 years ago (02/21/2017)
If by "here" you mean "in this problem", yes, if you want to keep the same overall gain.  If by "here" you mean "in the filter coefficients", then probably not. ...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/20/2017)
Given time bases \(A\), \(B\), and \(C\), for any time interval \(\tau\), the measured variance between two instruments \( \sigma_{AB}^2(\tau) = \sigma_A^2(\tau)...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/20/2017)
It makes sense to me.  No matter what you do you're going to have lots of nit-picky work to get it all right, and there will be a point where the variance of the...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/20/2017)
If you have known-identical clocks then two should be enough (unless their variance is synchronized somehow).  I can see how three comparable clocks should let...

Re: Measuring Allan Variance of atomic clock

Reply posted 6 years ago (02/20/2017)
What signal would you be sampling where an ADC would be of help?  A traditional square wave will look like "small" followed by "big".I suppose that band-pass filtering...

Re: Any fancy idea for an algorithm ?

Reply posted 6 years ago (02/20/2017)
Well, it's not at all clear to me.  Tell me what OP wants to know from the comparison, then.  He doesn't even say if he's interested in "match" vs. "no match"...
In general you want to let things settle before taking your data when doing a sweep, or you at least want to take a long enough chunk of data so that when you average...

Re: Any fancy idea for an algorithm ?

Reply posted 6 years ago (02/20/2017)
What the other two guys said: without understanding what you're looking for and why no one is going to be able to come up with something that'll give meaningful...

Re: Bode plot analysis

Reply posted 6 years ago (02/20/2017)
It looks like at least some of the irregularity in the phase plot at high frequencies is due to noise as the amplitude of your signal goes down.  Yes, a sampling...

Re: ASK BPSK

Reply posted 6 years ago (02/15/2017)
The details of doing this all came out as I was working my career, so I've just kind of absorbed it.  If it's not in a book on designing radios, then it should...

Re: ASK BPSK

Reply posted 6 years ago (02/15/2017)
Well, MSK is FSK, so if you do know how to generate MSK but don't know how to generate FSK then I think maybe you only know how to look in a book that tells you...
Get more basic yet.  What's the average value of \( \left( \cos \omega t \right)^2 \)?  What's the average value of \( \left( \cos \omega t + \sin 2\omega t \right)^2...
If you remove the \(\sin 2\omega t\) term from \(x(t)\), does the total power go up or down?  Does that answer your question about whether that term's power should...
I started to write something like this in my original answer and desisted because it was going to be Too Much Work.It's a much better and more general-purpose answer...
In your sine wave case you're getting a component out at \(2\omega t\).  That is the \(2^{nd}\) harmonic of your fundamental.People can argue about whether the...
Take a sine wave, \(x = \sin \omega t \).Gin up a nonlinear function -- preferably something mild. \(y = x + ax^n\) with \(a\) small and \(n\) selectible.Now, using...

Re: ASK BPSK

Reply posted 6 years ago (02/14/2017)
What are you trying to do, and with what knowledge base?There are quadrature up-converter chips which can be used to generate ASK, yes.  That's such an obvious...
Are you going to be simulating the PLL?  If so think you'll find that a FIR filter that accurately duplicates the characteristics of your Laplace-domain specification...
If the reference signal is adjusted to be spectrally white that might make sense -- in that case the "whitening matrix" would probably be a decent equalizer.
Sounds like some variation of Wiener filtering or something based on the same notions, or maybe equalization.  Are you running the signal through a matched filter...
Uh, I may not have read all the way to the end?
Reading the book pages the OP referenced, the goal is to downconvert the signal from being centered on a carrier to being centered on 0Hz.  Or, probably, to get...
Ah.  Look at equation 3.4.2.  Equation 3.4.1 (which is what you stated in your original post) ends with \[ x\left( t \right) = \Re \left \{ \tilde x\left(t\right)...
I said this before, but apparently too weakly: you absolutely positively cannot shift an arbitrary RF signal from a frequency somewhere within its bandwidth down...
Hint:LaTeX has defeated me.exp(j * w_1 * t) + exp(j * w_2 * t) =(exp(j * (w_1 - w_2)/2 * t) + exp(j * (w_2 + w_1)/2 * t)) * exp(j * (w_1 + w_2)/2 * t)Trivial, yes...
I'm going to put on my Socratic Method hat and turn your question around: is it still the same two-tone signal?  Can you show that it is or is not by grinding through...
With the phase variation (your \(\Phi\)), I don't think that it's valid to take just the real part of your low-pass expression -- but that's a nit.For your two-tone...

Re: harmonic distortion of a single-tone excitation

Reply posted 6 years ago (02/08/2017)
"I also know, the amplitude of the harmonic components will be smaller than the amplitude of the fundamental component."Build an amplifier with two amplifying elements,...
I suspect that the formula for the AM to PM assumes that you will do that test with just one carrier wave that is amplitude modulated.Circuits with nonlinear elements...
One would have to read the paper to know what the authors had in mind.  I expect, though, that they meant that they're AM modulating one carrier and seeing how...

Re: Frequency multiplication in the digital domain

Reply posted 6 years ago (02/05/2017)
What is your sampling rate?If your sampling rate is a good bit above your maximum frequency, and if the noise level is reasonably low, then you can do a first-cut...
Just to calibrate your thinking:  if the two sine waves are equal in magnitude, then their sum is equal to \(\cos \left(\omega_1 + \omega_2\right)t \cos \left(...
With difficulty and great imprecision.Without sitting down and doing a bunch of math to back up my intuition, I would say that your best bet is going to be some...

Re: Why do we want an amplifier to be linear?

Reply posted 6 years ago (02/01/2017)
Hey.  I'm blond.  Well, now I'm gray, but I used to be blond.

Re: Why do we want an amplifier to be linear?

Reply posted 6 years ago (02/01/2017)
Yes, I wasn't trying to denigrate class C amps (or any of the classes E through Z that make a constant-envelope wave more efficiently) -- I was just making the point...

Re: Why do we want an amplifier to be linear?

Reply posted 6 years ago (01/31/2017)
So, I'm going to rearrange things a bit:An ideal amplifier just multiplies the input by some constant gain \(g\).  Part of that "ideal-ness" is that it's linear...

Re: Why do we want an amplifier to be linear?

Reply posted 6 years ago (01/31/2017)
A better question is "when do we want an amplifier to be linear, and why?"Yes, the ideal linear amplifier "relates the input power to the output power of a signal...

Re: TWTAs as compared to SSPAs

Reply posted 6 years ago (01/29/2017)
Folks have answered your questions about the technologies fairly well.On bandwidth, an amplifier is usually specified for it's useful bandwidth, so yes, if it's...

Re: Filter signal with fundamental and harmonics

Reply posted 6 years ago (01/26/2017)
Not knowing \(\omega_0\) may well throw a wrench into your works, depending on your accuracy requirements and the amount of noise you need to contend with.I'm reframing my...
I can't even put it into words!  25 years of doing this stuff for pay, dodging bullets, and having to clean up after other people who said "OK, boss!", or worse...

Re: Filter signal with fundamental and harmonics

Reply posted 6 years ago (01/23/2017)
Comments.  Hmm.It sounds like you're not so much interested in the whole time-domain shape of the thing as you're interested in the fundamental, the 4th harmonic,...

Re: Spurious when Fs/F is not an integer

Reply posted 6 years ago (01/23/2017)
OK.  You sucked me into playing with this for entirely too long.If you're doing your math the way I'm doing my math then in theory you're fine -- do the FFT of...

Re: Upsampled input to an Adaptive filter?

Reply posted 6 years ago (01/22/2017)
I don't know what the right terminology is in adaptive filtering terms, but when you upsample, you're generating a signal where the neighboring samples are strongly...

Re: Upsampled input to an Adaptive filter?

Reply posted 6 years ago (01/22/2017)
If you're upsampling and interpolating just the input signal, won't the input and desired signals be at two different rates?To clarify, in your filtered case, are...
I think that it would be very tedious and not at all straightforward.  But it would be tedious and not straightforward to try to turn my intuition into something...
The way I would describe what I think they are saying is that their oscillator frequency doesn't have an exact integer ratio to the decimated frequency. The technique...
If you're not there already I'd say to start with just making it work independently.  Anywhere that you can set a WiFi receiver next to a totally separate ZigBee...
Wow.  10 years ago I'd say "that's wacky enough to be a good thesis topic", but I have this sad feeling that technology has progressed to the point where it may...
Presumably you're trying to do a dual WiFi/Zigbee receiver?I don't see anything wrong with it in principle; the devil is always in the details, however.

Re: Decimation by 2

Reply posted 6 years ago (01/15/2017)
So, first (and the part that everyone else left out) -- what's the expected signal content between 192 and 384kHz?  If the answer is "nothing", then just decimate:...

Re: Preemphasis Filter Design

Reply posted 6 years ago (01/15/2017)
Do you want the thing to have the same power gain at both frequencies?  If so then you need something frequency-sensitive, which means you need a filter.As Michael...

Re: Voice recognition using TMS

Reply posted 6 years ago (01/14/2017)
Strictly speaking, you're dealing with a combination of DSP and embedded programming.  The DSP part is doing the math and coming up with the algorithm; the embedded...

Re: Voice recognition using TMS

Reply posted 6 years ago (01/14/2017)
Be careful, in choosing what to do, to bite off as small a chunk as you can to get a grade.  Voice recognition is not trivial in the least.Have you checked to see...

Re: Voice recognition using TMS

Reply posted 6 years ago (01/14/2017)
I would start even further back than that: just make the LED blink.  Then make the board act as a transparent conductor of audio.  I've found that when you hand...

Re: ARM CMSIS FFT - does it produce correct results?

Reply posted 6 years ago (01/14/2017)
If the vector you're handing to the FFT routine is expected to be complex, and you're thinking a vector of reals, then it would explain much if not most of the problem.Your...

Re: ARM CMSIS FFT - does it produce correct results?

Reply posted 6 years ago (01/13/2017)
I think all the suggestions so far are good ones.  I would add to Rick's tests, though: once you've done his, do a sweep from frequency 1/N to 1/2 in steps of 1/N...

Re: TMS320C6000: read/write Flash Memory from Host PCI

Reply posted 6 years ago (01/09/2017)
I don't know the specifics of your processor, so I'm treating this like a general embedded question for some general hardware.In addition to what BEB said, ask these...
And note, too, that a typical way to use such 'optimal' control design strategies is to select cost functions which you know, a-priori, to result in outcomes that...
Each loop being stable going out is, indeed, a sufficient but not necessary condition.  But in many cases (mostly when there's a 'natural' progression of loops:...
The old traditional way of implementing a multi-loop controller is to start with the innermost loop and get it stable and behaving well, then treat it like a fixed...

Re: Interpolate complement value

Reply posted 6 years ago (12/19/2016)
I'm not sure that anyone outside of ADI has the real nitty-gritty details, but from reading the pertinent parts of the data sheet I gather that they're doubling...

Re: Interpolate complement value

Reply posted 6 years ago (12/19/2016)
They say (on p. 45) that the filter is being clocked at 2x the data input rate, and is interpolating the data.So, it's basically putting a reconstruction filter...

Re: Predictive Analytics from Sensor Data

Reply posted 6 years ago (12/17/2016)
You cannot have a prediction unless you have some sort of a model to work from.  To use some ad-hoc technique is to implicitly assume a model.If you assume that...

Re: 3D fft Matlab

Reply posted 6 years ago (12/14/2016)
If I may add: putting a 3D matrix of data into the frequency domain seems odd.  I'm sure there are problems where it's the right thing to do -- but if you haven't...

Re: 3D fft Matlab

Reply posted 6 years ago (12/14/2016)
To clarify what Mike said (if it's needed): you do an FFT on each row in each plane, making a new 3D matrix.  Then you do an FFT on each column in each plane of...

Re: down conversion vs de-modulation

Reply posted 6 years ago (11/20/2016)
"One more question - what is the practical application of DDC or DUC?"Purely digital up-conversion is useful in the transmit chain.  Consider a system where you...

Re: down conversion vs de-modulation

Reply posted 6 years ago (11/19/2016)
Unless they've really gone downhill in the last ten years, you want to get an ARRL Handbook (or the GBRS Manual, if you're in England).  Not just for this question...

Re: Some ideas I had

Reply posted 6 years ago (11/18/2016)
Oh god, there's no limit.  I'm 54, and I can get a chip that's 3mm on a side that has more storage and processing power than the first desktop computer I worked...

Re: Some ideas I had

Reply posted 6 years ago (11/18/2016)
There you go.  In such cases you're stuck with hand-optimizing.  I often end up steering customers away from such design choices, because most of my customers...
So, you're depending on The MathWorks to write your code for you, and it doesn't work?How are the PWM signals from the dspace 1104 and the f28335 different?  How...

Re: Some ideas I had

Reply posted 6 years ago (11/16/2016)
In theory, if you haven't marked anything as 'volatile' that shouldn't be, a good optimizing compiler would generate the same assembly code from either of those...

Re: Some ideas I had

Reply posted 6 years ago (11/15/2016)
You have the misfortune of being born too late.  Silicon has gotten cheap enough that such heroic measures are rarely needed, unless you actually need the characteristics...
Normally the \( a_k \) in your eq1 should be a time series, that comes from the problem you're trying to solve.And as has been noted, you're kind of mixing terms,...

Re: Matlab Home-use version

Reply posted 6 years ago (11/10/2016)
I gave up on Simulink the second or third time that I couldn't get a large model to run after an upgrade.  You can do everything you need with straight code.And...

Re: Matlab Home-use version

Reply posted 6 years ago (11/10/2016)
+1 for Scilab.  It's not compatible with Matlab, but it has a common ancestor, so someone who's conversant in Matlab can pick it up pretty quickly.

Re: two image correlation

Reply posted 6 years ago (11/07/2016)
I'm having problems sorting out just what you're asking for here.  Are you sure that it's not checking the overall correlation, or do you just think that might...

Re: Understanding maths behind DFT?

Reply posted 6 years ago (11/07/2016)
Yes!  Much of signal processing is, at its root, about solving differential or difference equations that are both exceedingly complicated and limited to certain...

Re: CW Burst Signal Detection

Reply posted 6 years ago (11/07/2016)
I assume that you don't have the option to change the preamble?

Re: LTI system

Reply posted 6 years ago (11/02/2016)
Here's another thought: if you can put the system description into the form of a linear state-space system without making any approximations, then it has to be...

Re: LTI system

Reply posted 6 years ago (11/02/2016)
There's no reason that the concept of a linear system can't be extended to multiple-input, multiple-output systems.In fact, one of the required classes for my undergraduate...

Re: LTI system

Reply posted 6 years ago (11/02/2016)
Dunno what's too rigorous for you, but if it obeys superposition then it's linear, and you can always test that.  If the characteristics of the system don't vary...

Re: Downsampling from 2.0 MHz to 192kHz

Reply posted 6 years ago (10/25/2016)
There's precious little pertinent information here.The original signal is sampled at 2MHz.  What's its frequency content?  Is there any noise?  How much of the...

Moo-ography

New thread started 6 years ago
So, listening to Science Friday on OPB, a segment about using muons to image the innards of pyramids.But, they're saying "moo-on", and "moo-ography" (http://www.sciencefriday.com/segments/pyramid-remodeling-the-neighborhood-behavior-of-sperm-whales-and-neanderthal-sex/)....

Re: Proof of Z-transform of M-Fold Decimator/Compressor

Reply posted 6 years ago (10/21/2016)
Hey Srikar:If you define p = nM and then try to do the transforms around z^(-p), then the index isn't going 0, 1, 2, etc.  Rather, it'll be going 0, M, 2M, etc.I...

Re: Proof of Z-transform of M-Fold Decimator/Compressor

Reply posted 6 years ago (10/21/2016)
"Intuition and math takes a lot of practice."I prefer the word "pruning".  When you start to approach these problems, some of your brain cells understand what's...

Re: Zero-Padding as scalloping loss attenuator

Reply posted 6 years ago (10/21/2016)
If Rick is like me, he'll have to check that section to see what he said.  I've found that one of the nice things about authoring a book is that when I forget what...

Re: Zero-Padding as scalloping loss attenuator

Reply posted 6 years ago (10/20/2016)
First, there are FFT algorithms that work with numbers of bins other than 2^n -- even prime numbers of bins are supposed to be pretty fast.  I can't remember then...

Re: Elliptic BPF spectrum (DSP)

Reply posted 6 years ago (10/20/2016)
If by "input is asymmetric" you mean that the input signal is complex or in quadrature, then no, you can't discard one peak.If the input signal is real, then all...

Re: Power Measurement of Complex Signal

Reply posted 6 years ago (10/19/2016)
Oh, lordy.  My Inner Pedant, excited by all the nits to pick, is becoming ascendant:If you have an actual (I hesitate to use "real" here for fear that you'll think...

Re: Removing DC and low frequency noise from a spectrum

Reply posted 6 years ago (10/18/2016)
It'll probably work better to subtract the power (energy, take your pick) of each bin.

Re: SSB Demodulation

Reply posted 6 years ago (10/16/2016)
Hilbert transforms can't have non-zero gain at zero frequency.  You need to find the gain of your transform at the frequencies of interest.Try looking at the FFT...

Re: SSB Demodulation

Reply posted 6 years ago (10/16/2016)
Many things are possible.  I suggest you run a pure tone through your Hilbert transform and through the equivalent delay, and put those two results up on a graph. ...

Re: Steepest-slope 2nd-order resonant filter?

Reply posted 6 years ago (10/15/2016)
What everyone else is saying -- the best you'll get out of a 2nd-order lowpass, away from the peak, is 12dB/octave.  The best you'l get out of a 2nd-order bandpass...

Re: convolution coding for FEC

Reply posted 6 years ago (10/14/2016)
Punctured codes are done by pre-arrangement with the decoder.  So you remove transmitted symbols from the encoded stream, and the decoder (or perhaps even the stage...
(Some of the papers looked substantive, and it sounds like if you're going there you'll be jumping into a huge, ongoing cat and mouse game.  Never, ever, will you...

Re: Sampling frequency in Baseband

Reply posted 6 years ago (10/12/2016)
If the 30.72MHz sampling is in quadrature, then there are 61.44Msps, so you'd be golden.I don't think I have it in that document (and perhaps I should update), but...

Re: SSB Demodulation

Reply posted 6 years ago (10/11/2016)
Forgive me if I'm being overly pedantic, but until someone shows me a real system that has a quantity that is measured in imaginary numbers, you're not doing complex...

Re: Sampling frequency in Baseband

Reply posted 6 years ago (10/11/2016)
This article goes on a bit about sampling.  Look at figure 3 on page 5 (page 6 by the browser's count) -- it shows you what happens when you sample a base-band...

Re: Sampling frequency in Baseband

Reply posted 6 years ago (10/11/2016)
What?  I'm not sure exactly what you're trying to ask.For just "normal" modulation, you need to sample quickly enough at baseband to capture all of the desired...

Re: SSB Demodulation

Reply posted 6 years ago (10/11/2016)
I'm not sure what you're missing -- perhaps the fact that if you downconvert with a single channel (no "imaginary" part), you'll get _both_ sidebands on receive.So,...

Re: FSK demodulation and SNR measurements

Reply posted 6 years ago (09/11/2016)
I'm pretty sure that Eric means taking more than one sample per bit period.Whatever you use, in the real world you'll have to deal with multiple peaks, and somehow...

Re: Calculate Directivity index of nonlinear line array

Reply posted 6 years ago (09/01/2016)
OK.  I'm not a sonar guy, so maybe I'm vastly oversimplifying this.But shouldn't you be able to find the gain of an array of transponders just by adding up the...
If you know the properties of your transponders and of the acoustic media (presumably water) that you're designing for, shouldn't you be able to work out the behavior...
OK, I'm not a sonar guy -- but wouldn't the answer to your question be found in a good book on sonar that's up-to-date enough to include MVDR beam forming?  Presumably,...

Re: CIC Filter

Reply posted 6 years ago (08/27/2016)
Wouldn't a 5-stage, decimation of 10 CIC filter also have a bandwidth of roughly 1/10000 of the sampling rate?  So at an input sampling rate of 120MHz, wouldn't...

Re: Code vs Uncoded EbN0

Reply posted 6 years ago (08/22/2016)
...
Too many TLAs!  If you can abbreviate it in three letters, you can SPELL IT OUT!If they're defining the minimum discernible signal as a function of the signal to...

Re: Higher order filter from 1st and 2nd order design

Reply posted 6 years ago (08/19/2016)
This really boils down to the question of what characteristics you want to preserve.  If you want to preserve all the filter characteristics, then you just want...

Re: Best Real Time Convolution Algorithm?

Reply posted 6 years ago (08/16/2016)
I assume that by "zero delay" you really mean "within one sampling interval", since you can't transfer from one register to another without some delay.I'm sitting...

Re: Window-presum FFT problem

Reply posted 6 years ago (08/16/2016)
Whatever you believe you're doing, I don't think you're actually doing it.You're basically taking one sequence, windowing it, chopping it into four, adding them,...

Re: Removal of DC Spike from quadrature receiver

Reply posted 6 years ago (08/14/2016)
Subtracting the mean from the signal should, indeed, reduce the DC content to zero.So something is going on either with your FFT or your adjustment.  Keep in mind...

Re: Removal of DC Spike from quadrature receiver

Reply posted 6 years ago (08/13/2016)
Look at the actual FFT bins.  If you see a zero at bin 0, surrounded by tall numbers, then (as JOS said) you've got a spike at more than DC.Eliminating this after...

Re: How to estimate the SNR

Reply posted 6 years ago (08/12/2016)
Then -- assuming you know the pulse shape and the bit rate -- you know a hell of a lot about your signal.Assuming that you can get frequency and bit-clock lock on...

Re: How to estimate the SNR

Reply posted 6 years ago (08/12/2016)
In general, the correct answer is "I'm sorry, that can't be done."You need to know enough about the signal to at least calculate it's power.  If you can't, then...
Use the real part then, or try various things.  Nothing is going to be quite right up there, thanks to your choice of how you represent things.
So the really high frequency content is important to you, and you're low-pass filtering the data to get rid of the high frequency content?Why?I'm feeling like I'm...
The very first thing to remember here is that you are doing some approximation of some real-world continuous filtering.The second thing to remember is that if your...
I can't answer your questions, but I may be able to give you some more information.1: NTSC video is 525 lines, of which around 480 are active (most TVs in the US...

Re: Error Growth for Various Goertzel Resonators

Reply posted 6 years ago (08/07/2016)
Normally the way you'd calculate the error in a linear filter (which is what the Goertzel algorithm is), would be to treat the coefficient quantization as a fixed...
"Can you help me understand how the time-variant nature of a PLL translates to seeing the tone at 0.1*Fs?"Because your phase detector is acting like a sampler....

Re: ADPLL vs Linear PLL

Reply posted 6 years ago (08/04/2016)
Set the loop gains low.  Be done with it.  It should be that simple.  If there's a paper on how to do it it's a page of title sheet, a page of references, and...

Re: ADPLL vs Linear PLL

Reply posted 6 years ago (08/03/2016)
What do you mean by "ADPLL"?  If you mean "all digital PLL", then there's no specific reason that the bandwidth needs to be high -- I've implemented such PLLs with...
Ah.  I see your problem.  You are trying to model the PLL as a linear, time-invariant lowpass filter, which it isn't.  Because of the mixing action of the phase...
If the clock signal truly shows up in a spectrum analyzer as a tone at \( 1 F_s \) and a tone at \( 1.9 F_s \), then when you sample it with the phase detector what...

Re: Matlab - How to plot magnitude error

Reply posted 6 years ago (07/31/2016)
If you're working with audio, particularly stored audio, you may find it helpful to try matching the gain and phase of a slightly delayed version of your analog...

Re: Matlab - How to plot magnitude error

Reply posted 6 years ago (07/31/2016)
I'm not familiar with either Matlab or Octave (I use Scilab), but basically you want to find the calls that let you evaluate the transfer functions at specified...

Re: Matlab - How to plot magnitude error

Reply posted 6 years ago (07/31/2016)
Why do you not want to use freqz/freqs for the task?  If they do what I think they do (calculate the frequency response point-by-point) that's probably the best...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/29/2016)
For all of them it's the absolute value of the real part of the pole.  For a high-pass filter that's roughly the corner frequency.  For a notch filter it's roughly...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/29/2016)
I would use a flat-topped window rather than divide by the window after the fact.  Either a trapezoidal window or a raised cosine up to 1, then a raised cosine...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/29/2016)
So, given that you're locked into that specific way of representing things...Yes, given your constraints, giving the filter's transients time to die down is probably...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/29/2016)
That's an incredibly bad way to do it, but you're stuck with what you've got.  On the plus side, using your technique one could (I think) specify a filter that...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/29/2016)
There are several things that sound off, here -- starting with Laplace when you should be in the z-domain, and a transfer function of an infinite impulse response...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/28/2016)
(1) For a filter with transfer function \( H \left ( s \right ) = \frac{\omega_c}{s + \omega_c} \), the impulse response is \(h \left ( t \right ) = \omega_c e^{-\omega_c...

Re: how to create filter kernel from Laplace equation?

Reply posted 6 years ago (07/28/2016)
You can't filter sampled-time data with a Laplace-domain filter.  They're in two different domains.You can approximate sampling by that filter with sampled-time...

Re: All digital PLL loop bandwidth

Reply posted 6 years ago (07/25/2016)
Your confusion confuses me.  If you really know how to do this in the Laplace domain then doing in the z domain is a simple matter of variable substitution.Make...

Re: "System Identification" Ideas

Reply posted 6 years ago (07/24/2016)
I would consider running away, screaming.  Or perhaps strolling off quietly while acting as casually as I can manage, so as not to attract any attention.Seriously,...

Re: Polyphase CIC structure

Reply posted 6 years ago (07/22/2016)
Let's call the two channels \( x_1 \) and \( x_2 \).  Are they two channels that must be kept independent, like from two antennas or the outputs of a quadrature...

Re: Polyphase CIC structure

Reply posted 6 years ago (07/21/2016)
Hey Krishna:If you mean "has anyone in the world implemented..." then the answer is yes -- just about every sigma-delta ADC I've ever looked at includes a CIC filter.If...
+1 to everything that's been said, and, if you're only ever transmitting from that itty bitty PIC, remember that for most codes, the transmitter side is much easier...

Re: Prewarping Fc, Q or both

Reply posted 6 years ago (07/19/2016)
I don't know about picture shrinking, but if you had the patience you could post six photos.(Other sites that I'm on post a thumbnail with a link to the bigger picture...

Re: Prewarping Fc, Q or both

Reply posted 6 years ago (07/19/2016)
It looks like it might be interesting, but:Graphs are too small too readTLA density is way too high -- what does "turning into II" mean?  What do bacon, lettuce...

Re: Test PLL against step change in phase

Reply posted 6 years ago (07/14/2016)
Ask yourself what would happen if you had a step change of exactly \( 2\pi \) radians in phase -- what would happen to the signal?  What would your PLL do in response?...

Re: Implementing generic first order transfer function

Reply posted 6 years ago (07/13/2016)
OK.  Give up on "implement the transfer function in s domain in Matlab".  That simply cannot be done as stated.What you can do is express the associated differential...

Re: Implementing generic first order transfer function

Reply posted 6 years ago (07/13/2016)
What are you trying to DO???  The tree bark that you are describing seems off -- could you at least tell me what the tree is, if not give me an overview of the...

Re: Implementing generic first order transfer function

Reply posted 6 years ago (07/13/2016)
First, let's back up a bit.You are not implementing the transfer function \( \frac{a_1}{s} \).  To implement that transfer function you must find some analog electronics...

Re: Phase locked Loop Bandwidth for second order system

Reply posted 6 years ago (07/12/2016)
It's easy to get confused.  I didn't actually get it completely straight in my head until I was doing a lot of sampled-time control, pondering switching power supplies...

Re: Phase locked Loop Bandwidth for second order system

Reply posted 6 years ago (07/12/2016)
I think you're confused about when to use z-domain analysis.  Like Laplace domain analysis, z-domain analysis only makes sense when you're analyzing a linear system....

Re: Phase locked Loop Bandwidth for second order system

Reply posted 6 years ago (07/12/2016)
Yes, you can find the (linearized) closed-loop transfer function and from that you can find the loop bandwidth.Setting the loop bandwidth to 1/10 or 1/20 of the...

Re: Adding 45 degrees phase shift to a FIR bandpass

Reply posted 6 years ago (07/12/2016)
So, I'm going to disagree with everyone else and say that yes, if you see the value in it, go ahead and proceed with your plan.Since you're making the filter anyway,...

Re: MIM and PIM

Reply posted 6 years ago (07/10/2016)
I'm not sure why the author feels he has to do cepstral processing, unless it's because he's trying for IIR filters.There are other ways of making an IIR filter...

Re: MIM and PIM

Reply posted 6 years ago (07/10/2016)
In non-answer to your original question, I don't know of any implementations out there.  Frankly, I don't think this is going to take the world by storm, because...

Re: MIM and PIM

Reply posted 6 years ago (07/09/2016)
The paper is behind the oddest sort of paywall -- so maybe I'll get a copy, maybe not.In the mean time, I don't particularly believe in putting in a lot of effort...

Re: fft combinations

Reply posted 6 years ago (07/09/2016)
If you're doing a 512 complex in, 512 complex out, then you're using a too-complicated algorithm.Isn't your data real?  If so, a 512 real points in, 257 complex...

Re: fft combinations

Reply posted 6 years ago (07/09/2016)
Hey Kaz:I think that if you look carefully at what Rick is saying (well, if you look at the book -- I think the diagram is leaving out a step) you'll see that the...

Re: Tuning PID controllers

Reply posted 6 years ago (07/07/2016)
I'm not sure if this is what you want, but:I built it, purely to provide an inexpensive, easy-to-manufacture control system trainer.  At one point I had ambitions...

Re: Tuning PID controllers

Reply posted 6 years ago (07/07/2016)
"I like to start with proportional gain"That can result in a seriously under-performing system in a lot of cases.  If you have a plant that acts like a double...

Tuning PID controllers

New thread started 6 years ago
Yet another video on tuning PID controllers has been tossed into the YouTube pool.

Re: A digital filter question

Reply posted 6 years ago (07/06/2016)
"This comes up in PLL analysis.  For PLL's, the e/X response is the phase error relative to the reference phase, and it is a high-pass response."Actually, \( S...

Re: A digital filter question

Reply posted 6 years ago (07/06/2016)
How is that better than doing a detrend plus window?  I can see how you're sorta-kinda doing a frequency-selective windowing, but it seems that unwinding the effect...

Re: A digital filter question

Reply posted 6 years ago (07/05/2016)
That would be death in a control loop.  Dunno if that's where Mike's using it, tho.

Re: A digital filter question

Reply posted 6 years ago (07/04/2016)
I can't speak for what Rick's remembering, but \( H_A = 1 - H_B \) is a valid way of making a something-pass filter into a something-stop filter -- you just need...

Re: A digital filter question

Reply posted 6 years ago (07/04/2016)
As long as your \( H_B \) is proper in \( z \) (by which I mean the order of the numerator is strictly less than the order of the denominator) you can, indeed, implement...

Re: A digital filter question

Reply posted 6 years ago (07/04/2016)
But it sounds like you're implementing something more like this:where the zero in \( H_A \left ( z \right ) \) will occur at those values of \( z \) where \( H_B...

Re: A digital filter question

Reply posted 6 years ago (07/04/2016)
Hey Shahram:I don't know if there are any references that really rub your nose in it, but just about any introductory book on closed-loop control will have that...

Re: A digital filter question

Reply posted 6 years ago (07/04/2016)
Thanks Stephane.  You'll note that I've edited my post -- it looks much better now.

Re: A digital filter question

Reply posted 6 years ago (07/03/2016)
This mostly rehashes what Jerry is saying.No, possibly not that exact diagram, but yes, that principle is pretty well known in dynamic systems circles.  (Now watch...

Re: Restorative Upsampling

Reply posted 6 years ago (07/01/2016)
I see very slick web-design skills, I see grammatically-correct use of buzzwords, I see some very questionable use of the FFT, and I see absolutely no math to back...

Re: Coherent Sampling (Very Brief and Simple)

Reply posted 6 years ago (06/22/2016)
The input to the ADC is various.The motivation is that most successive-approximation ADCs have a significant amount of noise.  The pertinent features are that it...

Re: Coherent Sampling (Very Brief and Simple)

Reply posted 6 years ago (06/22/2016)
I do that quite often with control systems when I have a SAR ADC -- sample the ADC as fast as it'll go, then use the sum of the resulting samples at the control...

Re: Similarity between two data points

Reply posted 6 years ago (06/20/2016)
Thanks JOS -- I intuitively knew that there was a strong relationship between correlation and Euclidean distance, but I didn't want to say anything at risk of putting...

Re: Similarity between two data points

Reply posted 6 years ago (06/20/2016)
Well, I'd like to know if correlation can be applied, too.  But you have absolutely positively not given enough information to know the answer.Can the degree of...

Re: Similarity between two data points

Reply posted 6 years ago (06/20/2016)
First, I suspect that with just three dimensions, "correlation" between X, Y and Z will boil down to either the Elucidean distance, or to some other simpler measure...

Re: Starting A Sucessfull Independent Engineering Firm

Reply posted 6 years ago (06/16/2016)
Wing it!  Oh -- you want more detail than that.Your biggest problem is going to be getting business.  So, you need to advertise somehow.  The best thing to do...

Re: Processing block size and matched filtering

Reply posted 6 years ago (06/16/2016)
Using this rule, if the frequency error is greater than 1/(2 * minimum-time-duration), then you start to hit diminishing returns on the integration step -- to the...

Re: Processing block size and matched filtering

Reply posted 6 years ago (06/15/2016)
So, yes, this is complercated.  I should have expanded above "SNR" as a general term means something, but noise spectral density vs. signal power has more meaning,...

Re: Processing block size and matched filtering

Reply posted 6 years ago (06/15/2016)
Matched filter theory presumes that you know the starting time, stopping time, duration, frequency, and phase of the tone, as well as the intensity of the noise....

Re: Goertzel filter with decay?

Reply posted 6 years ago (06/15/2016)
Yes, but please see my correction to my February post.'k' is just a gain, so that the peak gain of the filter is something manageable.  Trying to find a general...
This is one of those six of one, half a dozen of the other decisions that often pop up in communications design.  I strongly suspect that in the case of the one...
I see zeros in the neighborhood of 56, 64, & 72, and then ones in the neighborhood of 80, 88, and 96.  Then a zero again around 104.What's the problem?
I'm pretty sure that when you say "how can I sample this" you don't just mean how can you sample _this data_, but rather "what is the proper way to do this in real...
AH!  AH HA!Your filter has a delay of 32 samples.  You're only treating a vector that's 40 samples long.  Try padding the vector with 64 zeros (32 + 32) and run...
There's several things going on here.First, you shouldn't be finding peaks and sampling there -- you should be sampling where the peak should be.  More correctly,...
You aren't telling us the data pattern, unless you really mean that it's a single 0 and a single 1.Normally you'd be using NRZ data before filtering -- i.e., a zero...

Re: Pass band in digital up conversion of LTE signals

Reply posted 6 years ago (06/10/2016)
Much of the story is on Figure 5 on page 5.  The filter (and signal) that they're referring to is at baseband.  At baseband, signal bandwidths are measured from...

Re: Acquisition Range of PLL

Reply posted 6 years ago (06/04/2016)
How does one define the meaning of the term, or how does one calculate a number?  The answer in both cases is "it depends", but different.  "It depends" and it's...
You didn't mention that part!  The next step in this FFT stuff is to consider that getting the scaling right is always confusing.  I'm sure that there are people...
When you decimate you don't change the noise power.  I assume that the noise is white.  In frequency domain terms this means that you've just taken the noise energy...

Re: Loop bandwidth for symbol timing recovery

Reply posted 7 years ago (05/27/2016)
You want a book, and you probably want a book recommended by someone other than me.  I say this because my go-to book on this subject is "Phase Locked Loop Circuit...

Re: Loop bandwidth for symbol timing recovery

Reply posted 7 years ago (05/27/2016)
If Bn is the bandwidth in Hz, then for roughly the same loop performance it should probably remain approximately constant as you change Ts.You should choose the...

Re: Phase rotation after matched filtering

Reply posted 7 years ago (05/25/2016)
So, first, what Rick said -- if you're looking at a specific system then tell us, and we'll do a better job.  Otherwise we have to guess.Second, here's my guess:I'm...

Re: FDATool

Reply posted 7 years ago (05/24/2016)
I'm trying to think of why one would want to do what you're suggesting -- either my understanding of OFDM is insufficient (and it _is_ sketchy), or you're doing...

Re: Newbie with questions about decimation for SDR

Reply posted 7 years ago (05/16/2016)
In general, if I'm replying to everyone I reply to my original post (or to the head of a whole sub-thread, if that's appropriate).  I'f I'm going to reply to just...

Re: Newbie with questions about decimation for SDR

Reply posted 7 years ago (05/16/2016)
"So now the spectrum will now show 256000 hz bandwidth with the bins 15 Hz apart. Is this all correct?"Yup.

Re: Newbie with questions about decimation for SDR

Reply posted 7 years ago (05/16/2016)
All good advice so far, to which I might add a couple of things.First, it's a good idea to keep in mind why you're filtering (to beat down stuff you don't care...

Re: VOCODER FAX RELAY (T.38) - TMS320C55x

Reply posted 7 years ago (05/11/2016)
1: Have you looked at the T.38 fax specifications?  I don't have the document to hand, but I suspect that this is spelled out pretty directly.2: I'm sorry, but...

Re: PID Video

Reply posted 7 years ago (05/06/2016)
Ideally, yes, and it used to be better.  The axle's a bit bent (I didn't pack it correctly to got to a seminar), so it wants to have a preferred position -- but...

Re: PID Video

Reply posted 7 years ago (05/05/2016)
I had started with the goal of doing a short "PID Without a PhD" talk, and this was the introductory half.  So yes -- it's pretty basic.  But I suspect there's...

PID Video

New thread started 7 years ago
Just got done posting this.  As a video it's rough as a cob -- but then, I'm a beginner.  I think the information content is right, and now that I've posted it...

Re: IQ frequency shifting (software radio tuning)

Reply posted 7 years ago (05/03/2016)
1: assuming that z(t) is complex (or IQ), yes2: Yes, but.  Your understanding about why aliasing occurs is correct, but quadrature mixing done in the real world...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/29/2016)
Then you're probably fine.  You might want to check with your sales department, though -- in most places in the US you can run a clock off of the power line, but...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/29/2016)
Yes, low-pass filtering should remove harmonics; just design your filter for a cutoff somewhere between 70Hz and 100Hz (2nd-harmonic of 50Hz), and bear in mind the...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/29/2016)
Well, if you think about it, your 90-degree phase shifted signal isn't at all necessary to your application, so no matter what you do you need to compute intermediate...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/29/2016)
"The all-pass filter that you mention would give me a lock at 90º phase shift for all frequencies?"NO!  You absolutely, cannot, in this world, get a 90 degree...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/29/2016)
On the suggestion to delay one of the signals, the difference is that I suggested that you lock into the frequency with a phase-locked loop.  As long as the PLL...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/28/2016)
The true (i.e., physically unrealizable) Hilbert transform does.  Your Matlab Hilbert transform is, perforce, an approximation (you can tell this because you've...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/28/2016)
To answer your actual question: yes, if you could somehow implement a Hilbert transform using an IIR filter, then the phase shift would be 90 degrees from the original...

Re: 90 Degrees Shift of Digital Signal

Reply posted 7 years ago (04/28/2016)
To rephrase things a bit, you're skinning a cat using method number 394, and you're thinking that you need a different knife to do the job correctly.Might I suggest,...

Re: Implement 2nd order IIR filter

Reply posted 7 years ago (04/15/2016)
This is really a VHDL question.  The mind-set that you want to use is to ask the question "how do I get the desired effect in my arithmetic operations?".In C, assuming...
I dimly recall that Matlab has a one-step filter that does this -- it finds all the poles and zeros, puts the unstable one into the "non-causal" filter, runs the...
Go back and review the relationship between causality and stability.A rough definition of stability for an IIR filter is that all of its modes diminish to zero as...
I'm not sure of the exact shape of the concept that Dr. Harris is trying to get across, and I probably can't without reading the book.  However, it appears that...

Re: Biquad Optimization

Reply posted 7 years ago (03/29/2016)
I would suggest that if, between sampling rates and entries in your drop-down menu, you have a finite number of possibilities, that you just store fixed coefficients...

Re: Biquad Optimization

Reply posted 7 years ago (03/28/2016)
I was thinking happy thoughts as I read your post until it got to the "embedded" part -- then I kind of ground to a halt.For an embedded system where you want the...

Re: s_to_z (Pupalaikis)

Reply posted 7 years ago (03/23/2016)
Papers aren't for casual reading -- you generally have to sit down and study them, often with reference works, a notepad, a pencil, and a great big eraser.

Re: Welcome to the New Forum Interface!

Reply posted 7 years ago (03/22/2016)
Thanks

Re: Welcome to the New Forum Interface!

Reply posted 7 years ago (03/22/2016)
Uh -- dammit?Edit: Embedded works:$$ F \left ( x \right ) = \int_{bob}^{mary} q \left ( x \right ) dx $$Inline?$ F \left ( x \right ) = \int_{bob}^{mary} q \left...

Re: Welcome to the New Forum Interface!

Reply posted 7 years ago (03/22/2016)
Trying out MathJax:$ F \right( x \left) = \int _bob^mary q\right( x \left) dx $

Re: s_to_z (Pupalaikis)

Reply posted 7 years ago (03/22/2016)
1:p1 = 3180e-6; // 50.05p2 = 75e-6; // 2.122kz1 = 318e-6; // 500.5z2 = 0.0; // not always zeroPlaying fast and loose with notation:p1 = 1/(3180e-6 sec) = 314 radian/secp2...

Re: s_to_z (Pupalaikis)

Reply posted 7 years ago (03/22/2016)
First, you turn the time constants into frequencies.Second, you prewarp those frequencies (and hence pole and zero locations).Third, you make numerator and denominator...
I did a really quick look at the ZigBee protocol, and it appears that you are misinterpreting what you're seeing.  Based on the diagram in the section "2450 Phy...

Re: Goertzel filter with decay?

Reply posted 7 years ago (02/25/2016)
I'll try not to rant about the Goertzel.  It's a perfectly good algorithm, except that it is really a special case of a resonator with infinite Q.You want a nice...

Re: Overlap-Save Size for M-1 Points

Reply posted 7 years ago (02/22/2016)
Groger, you do not say what you consider "Nyquist rate" to be in this context.  Given that it could be just about anything from 10Hz to light, I think you need...

Use this form to contact Tim Wescott

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

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