Talk:Normalized frequency (signal processing)

Latest comment: 1 year ago by Bob K in topic Confusing statements

Symbol

edit

Is there a preferred symbol for normalized frequency? Olli Niemitalo (talk) 07:31, 30 July 2019 (UTC)Reply

Good question... there should be, but I think not. FWIW, here is a typical example:

f is the vector of normalized frequency band edges that appear monotonically between 0 and 1, where 1 is the Nyquist frequency.

--Bob K (talk) 14:28, 30 July 2019 (UTC)Reply

Description of units

edit

The following statement seems to be in dispute:

"... use the Nyquist frequency (fs/2) as the normalization constant. The resultant normalized frequency has units of half-cycles/sample or equivalently cycles per 2 samples."

When talking about the unit of a quantity, we need to take care to define the quantity that we are dealing with. In this instance, we appear be defining a normalized quantity fn = f / fNy, where fNy = fs/2. As a check, we should always be able to substitute cycle = 1 and sample = 1 without contradiction. A signal with a frequency of f = fNy can be described as having one cycle every two samples, but that is not what is being defined by the normalization process as given. When we normalize a quantity by some characteristic quantity, we are defining a new quantity, in this instance fn, which clearly has the unit Hz/Hz = 1, so a signal with a frequency of f = fNy defines the normalized quantity fn = 1 ≠ 1 cycle/(2 samples).

If, on the other hand, we simply re-express the normalized frequency f = f / fs using the unit cycle/(2 samples), in our example we get f = fNy / fs = 1/2 = 1 cyc/(2 samp), which is presumably what was intended. Note that the definition of the quantity is not that in the text in this instance: it is the original normalized frequency f, obtained by using the normalization constant fs, just expressed with a different unit. —Quondum 02:02, 8 January 2023 (UTC)Reply

Thank you. So here's my own POV. Throughout most of the last half of the 20th century, I designed a lot of filters using whatever was the tool-du-jour at the time and place. Maybe I've forgotten one, but I don't recall any that simply asked "What are your corner frequencies in Hz?" and "What is your sample-rate (samples/sec)?" So I often had to convert Hz into the units expected by the tool. Using the example from the article, converting 1000 cycles/second into Matlab's units goes like this:
1000 cycles/second × 2 half-cycles/cycle × 1/44100 seconds/sample = 0.04535147392 half-cycles/sample.
Maybe there's a better way to say it in the article, but the idea of half-cycles/sample is a useful one.
--Bob K (talk) 06:05, 8 January 2023 (UTC)Reply
If you look carefully, you are exactly following my "If, on the other hand, ..." description. You are just expressing f in terms of a non-coherent unit. I'll reword the article to describe both quantities, so that it includes the idea of half-cycles per sample. This kind of confusion abounds in WP. For example, the majority of science-literate editors seem to fail to notice that there is anything odd with the equations 1 Hz = 2π rad/s and 0 °C = 32 °F. —Quondum 12:52, 8 January 2023 (UTC)Reply


Of course while you were trying again, so was I, after a night of sleeping on it. I started with your previous version, and mostly just removed the tutorial on sampling, which is covered in other places that can be WikiLinked to. I will copy/paste my result below, FWIW. At this point, I think I will leave it to you and any others who decide to chime in. I appreciate your efforts to address my minor concern, which I probably should not even have expressed that late at night. :-)
--Bob K (talk) 15:42, 8 January 2023 (UTC)Reply


So here is my simplified version (less is more?):

Normalized frequency (signal processing)

In digital signal processing (DSP), a normalized frequency (denoted here by f) is a quantity that is equal to the ratio of a frequency (f ) and a characteristic frequency of a system.

A typical choice of characteristic frequency is the sampling rate (fs) that is used to create the digital signal from a continuous one. The normalized quantity, f = f / fs, typically has the unit cycles per sample

regardless of whether the original signal is a function of time, space, or something else. For example, when f is expressed in Hz (cycles/second), fs is expressed in samples/second.

This allows us to present concepts that are universal to all sample rates in a way that is independent of the sample rate. Such a concept is a digital filter design whose bandwidth is specified not in hertz, but as a percentage of the sample rate of the data passing through it. Formulas expressed in terms of fs (or Ts 1 / fs) are readily converted to normalized frequency by setting those parameters to 1. The inverse operation is usually accomplished by replacing instances of the frequency parameter, f, with f / fs or f Ts.[1]

Alternative normalizations

Some programs (such as MATLAB) that design filters with real-valued coefficients use the Nyquist frequency (fs/2) as the normalization constant.

Angular frequency, denoted by ω and with the unit radian per second, can be similarly normalized. When ω is normalized with reference to the sampling rate, the resulting unit is radian per sample. The normalized Nyquist angular frequency is π radians/sample.

The following table shows examples of normalized frequencies for a 1 kHz signal, a sampling rate fs = 44,100 samples/second (often denoted by 44.1 kHz), and 3 different choices of normalized units. Also shown is the frequency region containing one cycle of the discrete-time Fourier transform, which is always a periodic function.

Unit Domain Computation Value
cycle/sample  [−1/2, 1/2]  or  [0, 1]  1000 / 44100 0.02268
half-cycle/sample  [−1, 1]  or  [0, 2]  1000 / 22050 0.04535
radian/sample  [−π, π]  or  [0, 2π 2π 1000 / 44100 0.1425

References

  1. ^ Carlson, Gordon E. (1992). Signal and Linear System Analysis. Boston,MA: ©Houghton Mifflin Co. pp. 469, 490. ISBN 8170232384.


I've synchronized in most of your version just above. I prefer the cleaner, less pedagogical approach. It will serve as a better basis for any changes or discussion. —Quondum 16:01, 8 January 2023 (UTC)Reply

I see that the table still needs some fixing: it still confuses the quantities f and f / 2 – which I failed to catch before in my own edits. We also presently have the quantity ω without it having been defined via an expression. Under the 'Normalization' column it might help to put the full expression, e.g. f / fs. I'll get to this in a while. —Quondum 15:38, 11 January 2023 (UTC)Reply
At the moment what is in the article has an algebraic problem. We can put in both (an extra line in the table) if desired, as follows. The top two lines are the same quantity, with the second line just rewritten with a different unit. The second line is the number of half-cycles per sample, which seems to be what you are thinking of, but if you work it out, this is just f/fs. The two middle lines here are different quantities: the same numerically, but with their units being unequal. The third line is a ratio with the Nyquist frequency, so the unit Hz/Hz makes sense.
Quantity Numeric range Computation Value
f = f / fs   [0, 1/2]  1000 cyc/s / 44100 sa/s 0.02268 cyc/sa
f = (f × 1) / fs   [0, 1]  (1000 cyc/s × 2 half-cyc/cyc) / 44100 sa/s 0.04535 half-cyc/sa
ν′ = f / (fs / 2 sa/cyc)   [0, 1]  1000 cyc/s / 22050 cyc/s 0.04535 Hz/Hz
ω = ω / fs   [0, π (1000 cyc/s × 2π rad/cyc) / 44100 sa/s 0.14250 rad/sa
Does this make sense to you? —Quondum 01:51, 12 January 2023 (UTC)Reply


Thank you. I like the article in its current form much better. The ν is a nice touch. And I know the problem you are anticipating above: People will question the magical assignment of the unit half-cycles/cycle to the seemingly unitless "2". It doesn't become obvious until one confronts the equation: 0.02268 (cycles/sample) = 0.04535 (?) → (?) = 0.5 cycles/sample = 1 half-cycle/sample. The (f × 1) attempt might be too subtle for too many readers/editors in lieu of a wordier explanation in the text. I also know that some people like the 22050 cycles/sec (instead of sam/sec), relying on the statement (at Hertz) "One hertz simply means one event per second". But in the expression 0.04535 Hz/Hz, the numerator "events" and the denominator "events" are completely different things. That, I think, would take a lot more explanation, if there is even a good one.
--Bob K (talk) 13:25, 12 January 2023 (UTC)Reply

"But in the expression 0.04535 Hz/Hz, the numerator "events" and the denominator "events" are completely different things."
I disagree. What has been elided in the the expression (fs/2) for the Nyquist frequency is that the denominator is 2 sa/cyc (which I have now adjusted above). So, the result is the ratio of two frequencies of the same type, hence Hz/Hz. I'm deferring discussing the subtlety issue to a later post; I'm not sure it is too subtle. —Quondum 13:39, 12 January 2023 (UTC)Reply


As you've probably noticed, I've already implemented the wordier approach via a non-disruptive footnote explanation. I also agree that those who accept "the denominator is 2 sa/cyc" will have no problem... until they notice that the result disagrees with row 2... same numerical answer with different units. And clearly row 2 is actually obvious from row 1.
--Bob K (talk) 17:42, 12 January 2023 (UTC)Reply

I am a little puzzled: you don't seem to understand the algebraic contradiction in your approach. You appear to be confusing (f and ν. You cannot just attach a unit (half-cycle/sample) to a number. The units are forced by the defining equations; the only freedom we have is (a) defining quantities, and (b) unit conversions, e.g. replacing 1 cycle/sample → 2 half-cycles/sample. You are not staying within these logical confines. —Quondum 17:58, 12 January 2023 (UTC)Reply


"You cannot just attach a unit (half-cycle/sample) to a number."

But that's not what I did. I attached half-cycle/cycle to the cardinal number 2. I could also attach pints/quart or quarts/half-gallon. That's the very essence of a cardinal number.
--Bob K (talk) 18:11, 12 January 2023 (UTC)Reply

The current table looks like this:
Quantity Numeric range Computation Value
f = f / fs   [0, 1/2]  1000 cycles/second / 44100 samples/second 0.02268 cycle/sample
ν′ = f / (fs/2) = 2f / fs   [0, 1]  (1000 cycles/second × 2 half-cycles/cycle) / 44100 samples/second 0.04535 half-cycle/sample
ω = ω / fs   [0, π (1000 cycles/second × 2π radians/cycle) / 44100 samples/second 0.14250 radian/sample
The quantity defined in the left-most column of the second-last row does not correspond to that calculated in the third and fourth columns. —Quondum 18:22, 12 January 2023 (UTC)Reply


And I thought we were doing so well. For the 2nd consecutive time, you are again mistaken. I've got other things to attend to, so I'm going to let you sleep on it.

--Bob K (talk) 19:03, 12 January 2023 (UTC)Reply


I was not objecting to how those are related. More explicitly, the first column contains:
ν′ = f / (fs/2) = 2f / fs
If we substitute:
ν′ = 2f / fs = 2 × 1000 cyc/s / 44100 sa/s = 0.04535 cyc/sa. This is not the same thing as 0.04535 half-cyc/sa, which is what we have in the columns on the right, since half-cyc ≠ cyc. —Quondum 20:35, 12 January 2023 (UTC)Reply


In the article you write: "When ω is normalized with reference to the sampling rate as ω′ = ω / fs, the resulting unit is radian per sample." But you have assigned the unit radian to the mathematical constant π. In another context, someone could assign the unit inches. So why can't I assign the unit half-cycle per cycle to the constant 2?

At risk of stating the obvious, another line of reasoning is to convert the value 0.14250 radian/sample to the other two units, and see that you get 0.02268 and 0.04535:

0.14250 radian/sample × 1 cycle/2π radians = 0.02268 cycle/sample
0.14250 radian/sample × 1 cycle/2π radians × 2 half-cycles/cycle = 0.04535 half-cycles/sample

--Bob K (talk) 04:03, 13 January 2023 (UTC)Reply


Here's a compromise:

Quantity Numeric range Computation Value
f = f / fs   [0, 1/2]  1000 cycles/second / 44100 samples/second 0.02268 cycle/sample
ν′ = f / (fs/2) = 2f / fs   [0, 1]  2000 cycles/second / 44100 samples/second 0.04535 half-cycle/sample
ω = ω / fs   [0, π (1000 cycles/second × 2π radians/cycle) / 44100 samples/second 0.14250 radian/sample

--Bob K (talk) 12:49, 13 January 2023 (UTC)Reply

Look, I'm not even going to point out the non-sequiturs that I see in what you have said here. Do as you wish. —Quondum 13:03, 13 January 2023 (UTC)Reply

Sorry about the typo in column 4 (now fixed), if that's what you are referring to. I was rushing out the door for a 10-hour drive. --Bob K (talk) 12:06, 14 January 2023 (UTC)Reply


The math doesn't work so, temporarily at least, I am back to this, which I assume is your preference:

Quantity Numeric range Computation Value
f = f / fs   [0, 1/2]  1000 cycles/second / 44100 samples/second 0.02268 cycle/sample
ν′ = f / (fs/2) = 2f / fs   [0, 1]  2000 cycles/second / 44100 samples/second 0.04535 cycle/sample
ω = ω / fs   [0, π (1000 cycles/second × 2π radians/cycle) / 44100 samples/second 0.14250 radian/sample

But now we've gone full circle. The problem I have is that column 4 of rows 2 and 4 are equal when converted to the same units. But row 3 does not equate to either one. How do you explain that? It's because the word cycles means two different things. That can be avoided by converting 2000 cycles/sec into 2 half-cycles/cycle × 1000 cycles/sec.
--Bob K (talk) 15:27, 14 January 2023 (UTC)Reply

At the outset, I said "When talking about the unit of a quantity, we need to take care to define the quantity that we are dealing with." More generally, any discussion about units must take place within an understood system of quantities, just as the SI is defined within the ISQ. So far I have been unable to judge how much shared thinking we have in this regard; alternatively, we have some other disconnect. Seeking clarity on this does not seem worth the potential effort, given the time we have spent without seemingly finding common ground. When I said "Do as you wish", I meant that I do not intend to interfere with or contribute further to this. —Quondum 23:34, 14 January 2023 (UTC)Reply


Confusing statements

edit

Regarding these statements:

Formulas expressed in terms of fs (or Ts ≡ 1 / fs) are readily converted to normalized frequency by setting those parameters to 1. The inverse operation is usually accomplished by replacing instances of the frequency parameter, f, with f / fs or f Ts


Doing what the first sentence says does not produce any of the normalizations in the table. I.e. it does not produce any of the values needed by the corresponding normalized filter design tools. And in the second sentence, the weasel word usually means it is not reliable, with no indication when it can be trusted. It does not work, for instance in this example from Discrete-time Fourier transform:

 

Setting   followed by   results in a change of amplitude and an entirely different set of time-samples.
Bob K (talk) 11:52, 19 January 2023 (UTC)Reply