DSPRelated.com

Cedron Dawg (@Cedron)

Cedron Dawg is the pen name of a reclusive math enthusiast and programmer. His primary interest is in the Discrete Fourier Transform having discovered numerous new equations which are documented in the blog articles, with more to come. For non-members of DspRelated he can be contacted at cedron at protonmail dot com. Members can click on the envelope icon below.

Frequency Formula for a Pure Complex Tone in a DTFT

Cedron Dawg November 12, 2023

The analytic formula for calculating the frequency of a pure complex tone from the bin values of a rectangularly windowed Discrete Time Fourier Transform (DTFT) is derived. Unlike the corresponding Discrete Fourier Transform (DFT) case, there is no extra degree of freedom and only one solution is possible.


Pentagon Construction Using Complex Numbers

Cedron Dawg October 13, 2023

A method for constructing a pentagon using a straight edge and a compass is deduced from the complex values of the Fifth Roots of Unity. Analytic values for the points are also derived.


Overview of my Articles

Cedron Dawg December 10, 2022
Introduction

This article is a summary of all the articles I've written here at DspRelated. The main focus has always been an increased understanding of the Discrete Fourier Transform (DFT). The references are grouped by topic and ordered in a reasonable reading order. All the articles are meant to teach math, or give examples of math, in context within a specific application. Many of the articles also have sample programs which demonstrate the equations derived in the articles. My...


Candan's Tweaks of Jacobsen's Frequency Approximation

Cedron Dawg November 11, 2022
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by explaining how a tweak to a well known frequency approximation formula makes it better, and another tweak makes it exact. The first tweak is shown to be the first of a pattern and a novel approximation formula is made from the second. It only requires a few extra calculations beyond the original approximation to come up with an approximation suitable for most...


A Recipe for a Basic Trigonometry Table

Cedron Dawg October 4, 2022
Introduction

This is an article that is give a better understanding to the Discrete Fourier Transform (DFT) by showing how to build a Sine and Cosine table from scratch. Along the way a recursive method is developed as a tone generator for a pure tone complex signal with an amplitude of one. Then a simpler multiplicative one. Each with drift correction factors. By setting the initial values to zero and one degrees and letting it run to build 45 values, the entire set of values needed...


Off-Topic: A Fluidic Model of the Universe

Cedron Dawg February 2, 20226 comments
Introduction

This article is a followup to my previous article "Off Topic: Refraction in a Varying Medium"[1]. Many of the concepts should be quite familiar and of interest to the readership of this site. In the "Speculations" section of my previous article, I mention the goal of finding a similar differential equation as (18) of [1] for light traveling in gravity. It turns out it is the right equation, but a wrong understanding. As a consequence of trying to solve this puzzle, a new...


The Zeroing Sine Family of Window Functions

Cedron Dawg August 16, 20202 comments
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by introducing a class of well behaved window functions that the author believes to be previously unrecognized. The definition and some characteristics are displayed. The heavy math will come in later articles. This is an introduction to the family, and a very special member of it.

This is one of my longer articles. The bulk of the material is in the front half. The...


A Two Bin Solution

Cedron Dawg July 12, 2019
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by showing an implementation of how the parameters of a real pure tone can be calculated from just two DFT bin values. The equations from previous articles are used in tandem to first calculate the frequency, and then calculate the amplitude and phase of the tone. The approach works best when the tone is between the two DFT bins in terms of frequency.

The Coding...

Angle Addition Formulas from Euler's Formula

Cedron Dawg March 16, 20199 comments
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT), but only indirectly. The main intent is to get someone who is uncomfortable with complex numbers a little more used to them and relate them back to already known Trigonometric relationships done in Real values. It is essentially a followup to my first blog article "The Exponential Nature of the Complex Unit Circle".

Polar Coordinates

The more common way of...


Off Topic: Refraction in a Varying Medium

Cedron Dawg July 11, 20183 comments
Introduction

This article is another digression from a better understanding of the DFT. In fact, it is a digression from DSP altogether. However, since many of the readers here are Electrical Engineers and other folks who are very scientifically minded, I hope this article is of interest. A differential vector equation is derived for the trajectory of a point particle in a field of varying index of refraction. This applies to light, of course, but since it is a purely theoretical...


Phase and Amplitude Calculation for a Pure Complex Tone in a DFT using Multiple Bins

Cedron Dawg March 14, 201812 comments
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas to calculate the phase and amplitude of a pure complex tone from several DFT bin values and knowing the frequency. This article is functionally an extension of my prior article "Phase and Amplitude Calculation for a Pure Complex Tone in a DFT"[1] which used only one bin for a complex tone, but it is actually much more similar to my approach for real...


Phase and Amplitude Calculation for a Pure Complex Tone in a DFT

Cedron Dawg January 6, 2018
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas to calculate the phase and amplitude of a pure complex tone from a DFT bin value and knowing the frequency. This is a much simpler problem to solve than the corresponding case for a pure real tone which I covered in an earlier blog article[1]. In the noiseless single tone case, these equations will be exact. In the presence of noise or other tones...


An Alternative Form of the Pure Real Tone DFT Bin Value Formula

Cedron Dawg December 17, 2017
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving alternative exact formulas for the bin values of a real tone in a DFT. The derivation of the source equations can be found in my earlier blog article titled "DFT Bin Value Formulas for Pure Real Tones"[1]. The new form is slighty more complicated and calculation intensive, but it is more computationally accurate in the vicinity of near integer frequencies. This...


Improved Three Bin Exact Frequency Formula for a Pure Real Tone in a DFT

Cedron Dawg November 6, 2017
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by extending the exact two bin formulas for the frequency of a real tone in a DFT to the three bin case. This article is a direct extension of my prior article "Two Bin Exact Frequency Formulas for a Pure Real Tone in a DFT"[1]. The formulas derived in the previous article are also presented in this article in the computational order, rather than the indirect order they were...


Two Bin Exact Frequency Formulas for a Pure Real Tone in a DFT

Cedron Dawg October 4, 20179 comments
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas for the frequency of a real tone in a DFT. This time it is a two bin version. The approach taken is a vector based one similar to the approach used in "Three Bin Exact Frequency Formulas for a Pure Complex Tone in a DFT"[1]. The real valued formula presented in this article actually preceded, and was the basis for the complex three bin...


Exact Near Instantaneous Frequency Formulas Best at Zero Crossings

Cedron Dawg July 20, 2017
Introduction

This is an article that is the last of my digression from trying to give a better understanding of the Discrete Fourier Transform (DFT). It is along the lines of the last two.

In those articles, I presented exact formulas for calculating the frequency of a pure tone signal as instantaneously as possible in the time domain. Although the formulas work for both real and complex signals (something that does not happen with frequency domain formulas), for real signals they...


Exact Near Instantaneous Frequency Formulas Best at Peaks (Part 2)

Cedron Dawg June 11, 20174 comments
Introduction

This is an article that is a continuation of a digression from trying to give a better understanding of the Discrete Fourier Transform (DFT). It is recommended that my previous article "Exact Near Instantaneous Frequency Formulas Best at Peaks (Part 1)"[1] be read first as many sections of this article are directly dependent upon it.

A second family of formulas for calculating the frequency of a single pure tone in a short interval in the time domain is presented. It...


Exact Near Instantaneous Frequency Formulas Best at Peaks (Part 1)

Cedron Dawg May 12, 2017
Introduction

This is an article that is a another digression from trying to give a better understanding of the Discrete Fourier Transform (DFT). Although it is not as far off as the last blog article.

A new family of formulas for calculating the frequency of a single pure tone in a short interval in the time domain is presented. They are a generalization of Equation (1) from Rick Lyons' recent blog article titled "Sinusoidal Frequency Estimation Based on Time-Domain Samples"[1]. ...


A Recipe for a Common Logarithm Table

Cedron Dawg April 29, 2017
Introduction

This is an article that is a digression from trying to give a better understanding to the Discrete Fourier Transform (DFT).

A method for building a table of Base 10 Logarithms, also known as Common Logarithms, is featured using math that can be done with paper and pencil. The reader is assumed to have some familiarity with logarithm functions. This material has no dependency on the material in my previous blog articles.

If you were ever curious about how...


Three Bin Exact Frequency Formulas for a Pure Complex Tone in a DFT

Cedron Dawg April 13, 20171 comment
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving exact formulas for the frequency of a complex tone in a DFT. This time it is three bin versions. Although the problem is similar to the two bin version in my previous blog article "A Two Bin Exact Frequency Formula for a Pure Complex Tone in a DFT"[1], a slightly different approach is taken using linear algebra concepts. Because of an extra degree of freedom...


A Two Bin Exact Frequency Formula for a Pure Complex Tone in a DFT

Cedron Dawg March 20, 20179 comments
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving an exact formula for the frequency of a complex tone in a DFT. It is basically a parallel treatment to the real case given in Exact Frequency Formula for a Pure Real Tone in a DFT. Since a real signal is the sum of two complex signals, the frequency formula for a single complex tone signal is a lot less complicated than for the real case.

Theoretical...

DFT Bin Value Formulas for Pure Complex Tones

Cedron Dawg March 17, 2017
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving an analytical formula for the DFT of pure complex tones and an alternative variation. It is basically a parallel treatment to the real case given in DFT Bin Value Formulas for Pure Real Tones. In order to understand how a multiple tone signal acts in a DFT it is necessary to first understand how a single pure tone acts. Since a DFT is a linear transform, the...


Exponential Smoothing with a Wrinkle

Cedron Dawg December 17, 20154 comments
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by providing a set of preprocessing filters to improve the resolution of the DFT. Because of the exponential nature of sinusoidal functions, they have special mathematical properties when exponential smoothing is applied to them. These properties are derived and explained in this blog article.

Basic Exponential Smoothing

Exponential smoothing is also known as...


Phase and Amplitude Calculation for a Pure Real Tone in a DFT: Method 1

Cedron Dawg May 21, 20151 comment
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving exact formulas for the phase and amplitude of a non-integer frequency real tone in a DFT. The linearity of the Fourier Transform is exploited to reframe the problem as the equivalent of finding a set of coordinates in a specific vector space. The found coordinates are then used to calculate the phase and amplitude of the pure real tone in the DFT. This article...


Exact Frequency Formula for a Pure Real Tone in a DFT

Cedron Dawg April 20, 20152 comments
Introduction

This is an article to hopefully give a better understanding of the Discrete Fourier Transform (DFT) by deriving an exact formula for the frequency of a real tone in a DFT. According to current teaching, this is not possible, so this article should be considered a major theoretical advance in the discipline. The formula is presented in a few different formats. Some sample calculations are provided to give a numerical demonstration of the formula in use. This article is...


DFT Bin Value Formulas for Pure Real Tones

Cedron Dawg April 17, 20151 comment
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by deriving an analytical formula for the DFT of pure real tones. The formula is used to explain the well known properties of the DFT. A sample program is included, with its output, to numerically demonstrate the veracity of the formula. This article builds on the ideas developed in my previous two blog articles:


DFT Graphical Interpretation: Centroids of Weighted Roots of Unity

Cedron Dawg April 10, 20151 comment
Introduction

This is an article to hopefully give a better understanding to the Discrete Fourier Transform (DFT) by framing it in a graphical interpretation. The bin calculation formula is shown to be the equivalent of finding the center of mass, or centroid, of a set of points. Various examples are graphed to illustrate the well known properties of DFT bin values. This treatment will only consider real valued signals. Complex valued signals can be analyzed in a similar manner with...


The Exponential Nature of the Complex Unit Circle

Cedron Dawg March 10, 20155 comments
Introduction

This is an article to hopefully give an understanding to Euler's magnificent equation:

$$ e^{i\theta} = cos( \theta ) + i \cdot sin( \theta ) $$

This equation is usually proved using the Taylor series expansion for the given functions, but this approach fails to give an understanding to the equation and the ramification for the behavior of complex numbers. Instead an intuitive approach is taken that culminates in a graphical understanding of the equation.

Complex...

Re: Error in frequency estimation for low frequencies

Reply posted 7 months ago (05/22/2024)
Thanks for the detailed update.  You seem to have covered the "calibrate for it" option I was going to suggest.  The only other thing I can suggest is that if...

Re: Error in frequency estimation for low frequencies

Reply posted 7 months ago (05/20/2024)
Can you tell us which approach you ended up using?

Re: Occam's razor, Physics example

Reply posted 7 months ago (05/14/2024)
I thought this post might get a little more attention than it has, especially from R B-J.  Which one of these equations better describes reality?Here are the graphs...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/22/2024)
Honestly, it's more frustration than enthusiasm, but I still hope it is helpful.  There is no point in doing the extra calculations if the data doesn't support...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/21/2024)
You're welcome.  I appreciate your positive response, they are rare.Any of the exact formulas should solve your phase dependency problem.  For a pure generated...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/19/2024)
That looks like nice high SNR data to me.  The close up indicates that you are not going to have good success with the nearly instantaneous time domain formulas.I...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/19/2024)
You have lots of options.  In my limited experience with an inexpensive radar unit the variation in frequency from cycle to cycle exceeded the approximation error...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/18/2024)
It's better to have exact formulas for real valued signals instead of approximation formulas for complex valued tones.  Also, your conversion process will introduce...

Re: Error in frequency estimation for low frequencies

Reply posted 8 months ago (04/18/2024)
You could use a DFT and formulas that are exact for real valued signals.  I disagree with Dan, I would say the conjugate peak is 'interfering' not 'aliasing'.You...

Re: Occam's razor, Physics example

Reply posted 8 months ago (04/15/2024)
That's an interesting example.  It could apply to hardware or software.  I don't think there is any expectation of correlation between levels in a hierarchy and...

Occam's razor, Physics example

New thread started 8 months ago
From the Wikipedia article:"Suppose an event has two possible explanations. The explanation that requires the fewest assumptions is usually correct....However, Occam's...

Re: Keyboard Synthesizer

Reply posted 1 year ago (11/29/2023)
Yes, there will be function calls where you can construct customized notes with any pitch, delays, and panning. There will also be embellishments to the note...

Re: Keyboard Synthesizer

Reply posted 1 year ago (11/27/2023)
I appreciate the encouraging words. This is one of those back burner projects I finally decided to tackle. It is very efficient, and you asked before, the tones...

Re: Keyboard Synthesizer

Reply posted 1 year ago (11/26/2023)
Thanks for the reply.I recommend you download the code and look at it, and your answers would be obvious.  I am not trying to re-invent the wheel.  I did delve...

Keyboard Synthesizer

New thread started 1 year ago
Yep, turn your computer keyboard into a music keyboard.  Almost four full octaves.https://forum.gambas.one/viewtopic.php?t=1651This is a project that implements...

Re: resolution of the phase information from the fft

Reply posted 1 year ago (08/01/2023)
Here a couple of answers of mine from the DSP Stack Exchange:https://dsp.stackexchange.com/questions/69186/dft-...https://dsp.stackexchange.com/questions/67243/wher...How...

Re: resolution of the phase information from the fft

Reply posted 1 year ago (08/01/2023)
I'm sorry, by "meaningless" I meant "it doesn't matter", not "stupid".If you select a frame size that is a whole number of cycles in the frame, say seven.  No matter...

Re: resolution of the phase information from the fft

Reply posted 1 year ago (07/31/2023)
To elaborate a little bit on what it seems you are trying to accomplish.  For a pure complex tone, a shift in the phase causes tandem rotations of all the bins. ...

Re: resolution of the phase information from the fft

Reply posted 1 year ago (07/31/2023)
You are in essence asking a nonsensical question.  I hope the following explanation helps.  You didn't specify a real or a complex signal, so I will illustrate...

Re: LEGO Block Filters

Reply posted 2 years ago (05/22/2023)
The second part is about Academic publishing.  This is much more important to me.There are basically three steps to get an idea to be the currently accepted best...

Re: LEGO Block Filters

Reply posted 2 years ago (05/21/2023)
"Dear readers, I apologise for not pursuing this development in the professional venue of peer-reviewed publishing (don't have enough energy)." Don't apologize...

Re: Electromagnetic waves question

Reply posted 2 years ago (05/14/2023)
https://en.wikipedia.org/wiki/Double-slit_experime..."In the basic version of this experiment, a coherent light source, such as a laser beam, illuminates a plate...

Re: Electromagnetic waves question

Reply posted 2 years ago (05/13/2023)
"Thanks for the clear reply. Your example of room light intensity is intuitive."And it's false.  That kind of room light is not coherent.The second part is simply...

Re: Is there any DAC math model around?

Reply posted 2 years ago (03/28/2023)
Let me get this straight, you model a continuous signal with a sinusoid that is a whole number of cycles in your DFT frame.  Then you apply what amounts to be some...

Re: Has any one seen this window function?

Reply posted 2 years ago (02/17/2023)
I don't know.  I kind of appreciate old posts being read.The topic of FPGAs is kind of unfamiliar ground to me, so I didn't make a response, as there didn't really...
When you have a pure tone in a signal frame, the DFT spectrum follows a pattern.  For any tone, the results are proportional to the input tone in terms of any real...
At 8500 Hz tone:1/8500 = 0.000117647 seconds per cycle0.0064 seconds per delay (your figure)0.0064 / (1/8500) = 54.4 cycles per delay (wrappings)Perhaps you should...
Unfortunately for this situation, I'm not a MATLAB user, nor can I tell how dedicated you are to applying the "gccphat" function.Presuming you want the answer to...
That's a good rule for floating point, but those are integers.  A multiply by 0.25 would force several unnecessary conversions.  The  /4 can be replaced by >>2...
This answer is what you might be looking for.https://dsp.stackexchange.com/questions/62893/#630...It divides the arc up without the division, and multiplies the...
Here is an improved answer over the one in my earlier reply to Dan.The '7' is actually the number of effective significant bits.  Headroom calculations are application...
IIRC, some of the methods did this by computing the two values and comparing them.  Anyway, the post covered the OP's equation to some detail as well as many other...
Dan,I can't believe you didn't mention these:Efficient Magnitude Comparison for Complex NumbersBest Approach to Rank Complex Magnitude Comparision Problem

Re: Blog editor issues

Reply posted 2 years ago (10/03/2022)
The difficulty I have is my network connection is slow, limited, and the MathJax takes a long time to render.  To get around this, about 5 articles ago I started...

Re: Continuation of phase calculation comments

Reply posted 2 years ago (09/25/2022)
This posting is a continuation from the comments at Phase and Amplitude Calculation for a Pure Complex Tone in a DFT using Multiple Bins.Thinking about it a little...

Continuation of phase calculation comments

New thread started 2 years ago
Have a look at:  https://dsp.stackexchange.com/questions/69186#6923 Mhz 500kHz Bin width 0.5 ...

FYI, Article on optical computation

New thread started 3 years ago
Light computes any desired linear transform without a digital processor Kinda cool.

Re: Real Numbers

Reply posted 4 years ago (04/15/2021)
In that regard, it was poorly worded on my part, I maybe should have said "an example that seems to counter", or just left out the "counter".  Again, this example...

Re: Real Numbers

Reply posted 4 years ago (04/11/2021)
Here is a much simpler example to understand how the function values of two converging sequences can diverge.  Suppose f(x) = 1/x and you have two sequences a_n...

Re: Real Numbers

Reply posted 4 years ago (04/11/2021)
Okay, look at my words:  "but I also have a counter example the seems to indicate that 0.9999... and 1.0000... are distinct."See the "seems"?  (Should have been...

Re: Real Numbers

Reply posted 4 years ago (04/10/2021)
Here is a neat profile of a flaming intuitionalist at work you may enjoy:https://www.quantamagazine.org/the-octonion-math-t...From the "Final Theory" section, my...

Re: Real Numbers

Reply posted 4 years ago (04/08/2021)
Well, be careful.  It does matter how you get to infinity.I think your path is actually better.  This is material that is best contemplated/learned by being interest...

Re: Real Numbers

Reply posted 4 years ago (04/08/2021)
I've posted it below.

Re: Real Numbers

Reply posted 4 years ago (04/08/2021)
Spoken like a true intuitionalist.  Whether it "makes sense" or not is immaterial.  That is kind of the whole thrust of Real Analysis, a playground for the reductionist...

Re: Real Numbers

Reply posted 4 years ago (04/07/2021)
Yes, that is the crux of it.  Understanding that the limit is usually never reached, only approached, yet is still a distinct knowable value.0.999999... and 1.00000... ...

Re: Real Numbers

Reply posted 4 years ago (04/06/2021)
I'm sorry, that wasn't the counter example.It starts with "Is it possible to make a continuous mapping from R onto R^2?"

Re: Real Numbers

Reply posted 4 years ago (04/06/2021)
0.9999999... = 9 * ( 0.111111111... ) = 0.9 * ( 1 + 0.1 + 0.01 + 0.001 + 0.0001 + ... ) = 0.9 * ( 1 + r + r^2 + r^3 + r^4 + ... )Where r = 0.1 < 1 so it converges.So...

Re: Real Numbers

Reply posted 4 years ago (04/06/2021)
Hi Bernhard and Rick,They are not distinct.  The dots represent a limit argument and the limit of both is the same value.  Thus decimal representations of numbers...

Re: Real Numbers

Reply posted 4 years ago (04/05/2021)
Hi Rick,It's fun to see when you get mathy.I'm in the camp that considers zero distinct from the Natural numbers.  I don't think the leap to having the concept...
On 16 bit VS 24 bit.  Suppose you divided a mile into 64K pieces.  Each piece would be 5280/65536 ~=~ 0.08 feet ~=~ 1 inch.If you are measuring a changing length...

Re: LFT

Reply posted 4 years ago (09/19/2020)
It sure looks to me like after the first four Octave steps you should have your original signal back, i.e. h = R.  As for the other parts, I can't help any.

Re: Has any one seen this window family?

Reply posted 4 years ago (08/19/2020)
Hi Bernhard,Thanks for the reply and kind words.It seems to me that every generation, since the dawn of civilization, has decried that the following generation are...

Re: Has any one seen this window family?

Reply posted 4 years ago (08/18/2020)
Let me propose another analogy:Suppose you visited a country where they did addition by taking the anti-log of each number, multiplied them, then took the log to...

Re: Has any one seen this window family?

Reply posted 4 years ago (08/18/2020)
Thank you.  However, my prowess is not what I want to debate (or defend).What this example points out, is the huge blind spot created by doing discrete math coming...

Has any one seen this window family?

New thread started 4 years ago
This is a followup to my earlier forum posting:  Has any one seen this window function? Nobody claimed to have seen that member or thought it was special.  I think...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/16/2020)
Okay, there was indeed a prize at the end of this search.  If you want to find out what it is, follow this link to my latest article:[Spoiler protected Title]A...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/04/2020)
I think the whole window thing is easily understood from a definitional basis.Compare how the (1/N) DFT is related to its continuous counter parts, the FT and DTFT,...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/03/2020)
Hi Rick, thanks for your reply.  For any N more than fingers and a few toes, I totally agree, no functional difference beyond a gnat hair.  This is more of a theoretical...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/01/2020)
Agreed about the boxcar window not being a window. If this window function is "new", then the best name IMO, as I mentioned, is "The Discrete VonHann".  Follow...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/01/2020)
It is, very close.  I would call it the Discrete VonHann (I consider the term hanning erroneous even if it is commonly used).$$ \lim_{N \to \infty} w[n] = VonHann[n]...

Re: Has any one seen this window function?

Reply posted 4 years ago (08/01/2020)
Follow the link, it sort of is.  I wanted a more slow paced, discussion oriented forum.

Has any one seen this window function?

New thread started 4 years ago
Here is the definition:\( w[n] = 4 \sin \left( \frac{n}{N}\pi \right) \sin \left( \frac{n+1}{N}\pi \right) \)It's special, because it ensures that$$ w[0] =  w[N-1]...
If you know that your negative frequency integral calculations are supposed to give you the complex conjugate value of the postive one, there is no point in calculating...
I didn't notice Platybel's observation that you were missing the DC component in your data.  You've tried zero padding, maybe you should try zero insertion.Another...
Good.  These are extremely powerful tools in the right situations.  I think upon review, the original answers are going to look excessively clear.Power systems?...
Your alternative to doing zero padding in the frequency domain is to recognize that the bin values in a 1/N normalized DFT are the coefficients of the Fourier series...
You've done well.  There are three common conventions for normalizing the DFT.1) 1 forward 1/N backward2) 1/sqrt(N) forward, 1/sqrt(N) backward3) 1/N forward, 1...
Yeah, sorry, rush job.  N isn't in the DFT, so up to N-1 if you will.  But N would align on 0.
It looks like from your "spatial location" chart that you are looking for a real valued solution.  A property of the DFT is that the bin values for real valued...
You're welcome.  It's so easy to be misled when the proper terms aren't used.  Having said that, the forward and reverse FTs are only distinguished by a negative...
"I have a continuous function that defines a 1D frequency domain signal."Let's stop right there.  In the frequency domain you have a spectrum.  Numerically the...
It may help you conceptually to view the same situation in common logarithms and scientific notation.For instance:log(2) ~=~ 0.301log(200) ~=~ 2.301log(0.02) ~=~...
If you are really stuck, and have only paper and pencil in hand...and some free time: A Recipe for a Common Logarithm Table

Re: N-point DFt of cosine and sine

Reply posted 5 years ago (04/05/2020)
I regard to: "(correct me if I am wrong) but it looks like this equation only has an interesting value at m=k."The equations of mine I referred you to earlier are...

Re: N-point DFt of cosine and sine

Reply posted 5 years ago (04/03/2020)
This blog article of mine completes what you started. DFT Bin Value Formulas for Pure Real Tones Note: The simplification assumption done with equation (20)...
Hi Sara, If you have had your presentation already, I hope it went well. I didn't see this until just now. I would start with the proclamation: "It is the...

Re: MathJax/Latex question

Reply posted 5 years ago (02/16/2020)
That's interesting.  I've never hung out there so I wouldn't know.You don't have to tell them it's MathJax.  I do all my rough drafts as .tex files, then I have...

Re: MathJax/Latex question

Reply posted 5 years ago (02/16/2020)
There is a Latex group on StackExchange.  I'll bet you'd find some experts there as well.https://tex.stackexchange.com/

Re: Simplifications With Eulers Equation (DTFT, DTFS)

Reply posted 5 years ago (02/12/2020)
That's hard for me to read.  Since you didn't post the book's answer, I can't tell you whether it's equivalent.  The thing with trig expression is they are incredibly...

Re: Simplifications With Eulers Equation (DTFT, DTFS)

Reply posted 5 years ago (02/12/2020)
Upon a reread, it isn't even that hard:$$ \sin( \frac{2}{3}\pi ) = \frac{\sqrt{3}}{2} $$Similar for the other terms.Sorry, I should have looked closer first.+++++++++++++++++++++The...

Re: Simplifications With Eulers Equation (DTFT, DTFS)

Reply posted 5 years ago (02/12/2020)
I highly recommend that you read my blog The Exponential Nature of the Complex Unit Circle$$ e^{i \theta} = \cos( \theta ) + i \sin( \theta ) $$$$ e^{-i \theta}...

Re: damping filter - finite stationary error

Reply posted 5 years ago (12/02/2019)
I'm just looking at your charts without diving into the gory detail.  Nobody has uttered the magic words "median filter" yet so I thought I would.  Those look...

Re: Frequency estimation in between the bins ...

Reply posted 5 years ago (07/23/2019)
Okay, for my formulas, you don't want to do that.  I sent you an email.  If that didn't work try me at cedron at protonmail dot com.

Re: Frequency estimation in between the bins ...

Reply posted 5 years ago (07/23/2019)
Is the time domain graph after you applied the VonHann (Lots of us don't like the "Hanning" label) window?

Re: Frequency estimation in between the bins ...

Reply posted 5 years ago (07/20/2019)
Hi Rick,By my testing, all those are obsolete.  None are exact, most require a lot of points to be near accurate, and none are as robust in noise as the ones I...

Re: Frequency estimation in between the bins ...

Reply posted 5 years ago (07/19/2019)
The good news is a complex signal is simpler than a real one.The bad news is I don't really know the nature of your signal so I can't tell you how good these will...

Re: Fixed point exponentiation

Reply posted 5 years ago (07/05/2019)
Ah, a brute force approximation.  Where's the elegance in that?Just kidding.  If it is fast enough, generally simpler is better.  Thanks for the followup letting...

Re: Fixed point exponentiation

Reply posted 5 years ago (07/03/2019)
Well it should, it is a Taylor series centered at zero.  But that is the key, the expected argument values (y) are also centered on zero, so by symmetry, tweaking...

Re: Fixed point exponentiation

Reply posted 5 years ago (07/03/2019)
Hi rbj,Did you see what I did above?Ced

Re: Fixed point exponentiation

Reply posted 5 years ago (07/02/2019)
This is how I would do it.  Split your value into its integer (n) and fractional (f) parts.$$ 2^x = 2^{n+f} = 2^n 2^f = 2^n  e^{\ln(2)f} = 2^n  L e^{\ln(2)f -...

Re: OFF TOPIC: A Question About PI

Reply posted 5 years ago (07/01/2019)
0 is rational because 0 is an integer and the integers are a subset of the rationals.Alternatively:A rational number is a number that can be represented as the ratio...

Re: OFF TOPIC: A Question About PI

Reply posted 5 years ago (07/01/2019)
#4 is quite incorrect as well.  Only true for finite series.  It does not necessarily hold if you get to go to infinity as your ... implies. Consider the Arctangent...

Re: OFF TOPIC: A Question About PI

Reply posted 5 years ago (07/01/2019)
Consider this:The sin(x)/x limit is my example of choice to introduce the concepts of limits to newbies, especially those who struggle with the concept.Draw a row...

Re: Pool Ball Pendulum Animation in MATLAB

Reply posted 5 years ago (06/17/2019)
Hi Rick,Pendulums have periodic motions which approximate simple harmonic motion.  The difference is $\theta$ vs $\sin(\theta)$ in the guiding differential equation. ...

Re: Is this time-domain aliasing?

Reply posted 6 years ago (05/28/2019)
That is very cool.  Thanks for sharing that Rick.To me, who tends to see things through DFT colored glasses, this looks like a representation of the real part of...

Re: Low cost audio DSP Exploration

Reply posted 6 years ago (05/25/2019)
Thanks for the thoughtful reply.Discussing #1 will take us too far afield.  I don't disagree at all.  Unfortunately, I wouldn't characterize our democracy as strong...

Re: Low cost audio DSP Exploration

Reply posted 6 years ago (05/24/2019)
Well Mr. Tomkins, that is a beautiful rendition of the siren song, and it is hard to resist.  Yes, I know it is a big thing right now, but that does not necessarily...

Re: Low cost audio DSP Exploration

Reply posted 6 years ago (05/23/2019)
Funny you should mention edge detection.  This is my latest answer at DSP.SE:https://dsp.stackexchange.com/questions/58341/afte...Personally, I am not enthralled...

Re: Low cost audio DSP Exploration

Reply posted 6 years ago (05/23/2019)
...

Re: Low cost audio DSP Exploration

Reply posted 6 years ago (05/22/2019)
Hmmmmmmmmmm,Let's see.1) A good text editor2) A good compiler3) A half-way decent computer with a sound card.Most of us already have those, so really cheap.Let's...

Re: Todo List: Improvements to the Related Sites

Reply posted 6 years ago (05/02/2019)
Rough draft, but I hope you get my drift.Here are some prototypes.  I think if sections are empty, they should be eliminated entirely for that user.Ced=================================================User...

Attn Linux Users: Check out Gambas

New thread started 6 years ago
I wish I would have found this years ago. If you like the way you could rapidly design and code in VB in Windows, you want to seriously check this out.  It is...

Re: The Spectral Complexity of a Single Musical Note

Reply posted 6 years ago (02/20/2019)
Followup:I took a small excerpt of ten waveforms from one of the strikes in "sound_example_8.mp3".   This is what the 1/N normalized DFT looks like: Zooming in...

Re: The Spectral Complexity of a Single Musical Note

Reply posted 6 years ago (02/20/2019)
Sorry, I should have mentioned that I am quite familiar with the concept of this missing fundamental. What your ear hears (and autocorrelation detects) is the repeat...

Re: The Spectral Complexity of a Single Musical Note

Reply posted 6 years ago (02/19/2019)
Hi Rick,I, too, was puzzled by the lack of the fundamental.  Out of the three explanations so far:1) Sounding board2) Recording Equipment3) Actually MissingI would...
Or my generalized followup articles:https://www.dsprelated.com/showarticle/1051.phphttps://www.dsprelated.com/showarticle/1056.phphttps://www.dsprelated.com/showarticle/1074.phpThey...
This problem is usually posed as one coin being spun around another.  From the stationary penny's perspective, the rotating penny makes one revolution.  From an...

Re: spectrum of rectangular pulse using two methods

Reply posted 7 years ago (03/03/2018)
Hi kaz,That is a different issue, one I am not that knowledgeable in, but I believe that is correct.Ced

Re: spectrum of rectangular pulse using two methods

Reply posted 7 years ago (03/03/2018)
That would be equation (27) in my article I referenced (adjusted to T).Ced

Re: spectrum of rectangular pulse using two methods

Reply posted 7 years ago (03/03/2018)
The sinc function is for the continuous case and is only an approximation in the discrete case.It is fairly straightforward to derive the DFT bin values of a rectangular...
The math looks kind of bad to me.  As the others have already pointed out, (5) comes from applying the geometric series sum formula to the "n=0 to L-1" summation...

Re: FFT complexity

Reply posted 7 years ago (12/13/2017)
Hey, that last point is a neat trick.  New to me, so I looked it up.Solve for A and B:A + Bi = ( a + bi )( c + di )Straightforward:A + Bi = ( ac - bd ) + ( ad +...
The two biggest questions in an application like this are:1) Does it need to be done real time?  Your answer is no.2) Does it have to be done efficiently? You haven't...

Re: C5505 eZdsp - reproducing wav file

Reply posted 7 years ago (11/29/2017)
You're welcome.A few notes:1) This code is for a stereo file.  If you want to produce a mono file the track count should be one.  This also affects the 'theBytesPerSample'...

Re: C5505 eZdsp - reproducing wav file

Reply posted 7 years ago (11/29/2017)
Reading and writing .wav files is rather straightforward in C or C++, you don't need any special libraries. There are a couple of header blocks that hold the configuration...

Re: fft/ifft scaling revisited

Reply posted 7 years ago (11/29/2017)
All the answers have been good.  I just wanted to add the term "unitary matrix" to the discussion for the 1/sqrt(N) scaling.  It is the one that preserves the...

Re: reconstruct phase-shifted sine tone

Reply posted 7 years ago (11/22/2017)
"I believe the reason for this is my one frame of sine wave does not contain the complete cycles."Yep, this is your main problem.  This is why I added my edit of...

Re: reconstruct phase-shifted sine tone

Reply posted 7 years ago (11/21/2017)
Hi,You have a few things wrong:1) As Y(J)S alluded to, real valued signals have the top half of the DFT as the conjugate mirror of the bottom half so if you rotate...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/17/2017)
Rick, yes and yes.If you look carefully at the photo, the line m is actually superimposed.  Poor color choice.The problem is also poorly worded.  Taken literally,...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/17/2017)
It would have been clearer had I originally said "Thus the solution stays in the same place horizontally."  or "Thus the solution stays in the same place on the...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/17/2017)
Assuming the line is moved in a parallel manner, e.g. the sidewalk is wider or narrower.Yes, it will move vertically on the diagram, but not horizontally.  It will...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/16/2017)
Hi Rick,I think you have made a small mistake in your analysis of the book's solution.  If you move the line "m", you also move the point "B'" as it is supposed...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/16/2017)
Hi Rick,No.The first paragraph is the same sentiment as SteveSmith's comment below.  Showing alternatives to the final solution would better show why the final...

Re: Off Topic: A geometry problem

Reply posted 7 years ago (11/16/2017)
Hmmmmmm.  I don't think it is as bad as you say.  Had they shown an additional different position for 'C', perhaps several of them, why this suffices as a "proof"...

Re: New DSP FAQ Section - please suggest topics

Reply posted 7 years ago (10/27/2017)
Here is a suggestion:  There is a large history of questions in your forum, and an even larger one in comp.dsp.  I would think that looking through these should...
A little searching found this:www.linkedin.com/help/linkedin/answer/4214/importi...Ced
Hi Jeff,I think that is how it works.  The permission is probably stated somewhere in the fine print.  I don't belong to LinkedIn so I can't tell you for sure.The...
I suspect that "Joe Jones" used the "Add Connections feature" and RL's address was in JJ's contact list.  Since he was already a member, a confirmation email was...
Hi Rick,I don't have an account on LinkedIn.  Every once in a while I get "invitations" from LinkedIn to join as a contact to so-and-so who I have corresponded...

Re: Audio FFT Filter, noisy clicks

Reply posted 7 years ago (10/17/2017)
You probably have a bug in your code.  The clicks come from big discontinuities in the signal which shouldn't be there if you are just doing a forward and reverse...

Re: Frequency Interpolation Algorithms

Reply posted 7 years ago (10/17/2017)
With other tones and noise you won't be able to get an exact answer.  There are a bunch of frequency estimators which can be divided into two classes:  exact and...

Re: Differential frequency measurement

Reply posted 7 years ago (10/11/2017)
I whipped up a graphic to demonstrate the sum of two tones of the same amplitude.The top graph is the two tones cos(A) and cos(B).  The bottom graph has cos(A)+cos(B)...

Re: Differential frequency measurement

Reply posted 7 years ago (10/07/2017)
Hello techn0mad,A key assumption of the approach I mentioned above is that the two tones are of the same amplitude.  If they aren't, the summation equation becomes...

Re: Differential frequency measurement

Reply posted 7 years ago (10/07/2017)
A few questions:1) How many wavelengths are in each short duration?2) Are they consistent?3) Is the sampling rate somewhat steady?Here is an approach which may work...

Re: Generating Random Numbers Through Audio

Reply posted 7 years ago (09/22/2017)
www.hindawi.com/journals/mpe/2013/285373/Here's one paper.  A little more searching on terms you find within it should find you some more.Ced

Re: Generating Random Numbers Through Audio

Reply posted 7 years ago (09/22/2017)
My suggestion wasn't based on literature, so there may be some.  There is a similar approach using a webcam feed instead so you may find something written about...

Re: Generating Random Numbers Through Audio

Reply posted 7 years ago (09/20/2017)
I'm not sure I agree with the need for your assumption about PRGs, but accepting it as a requirement you can still do it with an audio stream.  The problems mentioned...

LabVIEW Warning

New thread started 7 years ago
Anybody who uses LabVIEW should probably be aware of this:thehackernews.com/2017/08/hacking-labview-vi-file.htmlI'm not a user, but I think I recall seeing it discussed...

Re: Is there a fast algorithm about this type of FFT

Reply posted 7 years ago (08/13/2017)
There is a faster method for smaller N, but it probably isn't fast as you desire.  Any potential savings also depends on the size of N.If you think of the DFT and...

Re: time delay ---- frequency shift Fourier property

Reply posted 7 years ago (07/26/2017)
For complex signals, a phase shift in the time domain turns into rotation in the DFT.For real values signals, which can be thought of as the sum of two complex signals,...

Re: Cross Correlation with Increasing Finite functions

Reply posted 7 years ago (07/07/2017)
Here's a suggestion building on what Y(J)S did:x(t) = a log( k*t + d_x )y(t) = a log( k*t + d_y )Estimate "a".  X(t) = exp( x(t)/a ) ~=~ k*t + d_xY(t) = exp( y(t)/a...

Re: Spherical Mapping/Unmapping

Reply posted 7 years ago (07/02/2017)
Your distortion probably comes from failing to account for the perspective view introduced by your camera.Your ultimate goal is to build a mapping from the pixel...

Re: Spherical Mapping/Unmapping

Reply posted 7 years ago (07/01/2017)
What is the nature of the image?  For instance, is it a generated image or a picture taken by a camera?I have home grown math for both cases.  Too complicated...

Re: Magnitude of frequency components

Reply posted 7 years ago (06/28/2017)
I'm sorry, I misunderstood your original question.I thought you were trying to find the phase and magnitude of the harmonics.That becomes the first step.  Once...

Re: Magnitude of frequency components

Reply posted 7 years ago (06/28/2017)
Hi electrin,I don't know a better way than the DFT.  However, I can make some recommendations for your DFT usage and give you formulas for when the frequency varies...

Re: Estimating SNR without windowing

Reply posted 7 years ago (06/17/2017)
Looking at your equation again, it seems you are doing the same calculation we recommended.  Therefore, you're problem is probably how you are calculating "A".Could...

Re: Estimating SNR without windowing

Reply posted 7 years ago (06/17/2017)
The OP has a single complex tone signal.  Your answer appears to be for a real tone.Ced

Re: Estimating SNR without windowing

Reply posted 7 years ago (06/17/2017)
Candan's 2013 formula is compared in my three bin article.  One of my new formulas is equivalent and the others are better.Please cite any formulas since then that...

Re: Estimating SNR without windowing

Reply posted 7 years ago (06/17/2017)
These are my articles on frequency estimation for a pure complex tone usng a DFT:A Two Bin Exact Frequency Formula for a Pure Complex Tone in a DFThttps://www.dsprelated.com/showarticle/1039.phpThree...
You're welcome.You may want to add that to your StackExchange post too.Ced
Did you figure it out?Ced
I disagree.  Judging by the second diagram in his StackExchange posting, it seems to me that he has the fundamental frequency and phase stuff pretty well figured...
You're welcome.I think 100 waveforms may be overkill and you will need to do a huge FFT.  The simplest (at least conceptually) way to find a frequency in the time...
Your situation is the kind of application for which the DFT is ideal.  What you want to do is select a frame size that is a whole multiple of your repeating pattern. ...
Thanks for the reference to my article, but it is not appropriate for this situation.  Even if you do separate out all the tones, my article is about finding the...

Re: DFT/FFT

Reply posted 8 years ago (06/05/2017)
What you are doing is equivalent to using a particular window function. I have renamed your timeSeries to S to shorten the lines for display purposes.Here is the...

Re: DFT

Reply posted 8 years ago (05/15/2017)
First off, your definition is incorrect.  You are missing a 2Pi in the exponent.  It is also important to specify whether your signal is real or complex valued.Second,...

Re: FFT Speed, FIR Output

Reply posted 8 years ago (05/13/2017)
Upon reconsideration, I may have been wrong before.  Maybe you do want to keep the squarish waveform and use the harmonics as confirmation.  As I said in my other...

Re: FFT Speed, FIR Output

Reply posted 8 years ago (05/13/2017)
Hi Roger,In light of the presence of the harmonics, you will want to adjust your DFT size so that both your frequencies and their harmonics are whole integer multiples...

Re: DTFT of a signal

Reply posted 8 years ago (05/13/2017)
"something of the form (a+jb)^k is being done but how exp(-j*2*pi*k*n/N) is decomposed into this"exp(-j*2*pi*k*n/N) = e^(-j*2*pi*k*n/N)= [e^(-j*2*pi*n/N)]^k= [cos(2*pi*n/N)-j*sin(2*pi*n/N)]^ka...

Re: FFT Speed, FIR Output

Reply posted 8 years ago (05/13/2017)
Hi Roger,Why are you trying to convert the signal to a square wave and then rounding off the corners with a low pass filter?All you are doing is introducing a bunch...

Re: DTFT of a signal

Reply posted 8 years ago (05/13/2017)
Sharan123,The DFT *is* a matrix multiplication.Z = F * SWhere Z is your DFT bin set, F is a matrix composed of the sinusoidal basis vectors, and S is your signal.b_var...

Re: FFT Speed, FIR Output

Reply posted 8 years ago (05/12/2017)
Hi Roger,As I read it, it is not clear from your post whether you are trying to implement a tone detection solution or just using that as an example to learn how...

Re: sum of sinusoids

Reply posted 8 years ago (04/27/2017)
Adding sinusoids can be a powerful technique. There are two special cases where the addition of sinusoids have nice mathematical properties. The first is what...

Re: Happy Pi Day

Reply posted 8 years ago (03/14/2017)
That's a good hint, but you want to wrap another set of parentheses around it like this:#define PI ( 4 * atan(1) )Otherwise statements like this will not give you...

Re: Happy Pi Day

Reply posted 8 years ago (03/14/2017)
I should have said "a sum day".  Yep, we get one every month for quite a few years yet.  However, today is especially special because it is the only Pi day that...

Happy Pi Day

New thread started 8 years ago
...

Use this form to contact Cedron

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

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