Live data from Hacker News

Unit Definitions

futureboy.us

21–26 of 26 posts

Re: Unit Definitions

#21
post #11
post #7

> This means that, if you follow the rules of the SI, 1 Hz = 1/s = 1 radian/s I fail to see how this follows from the SI definition of either the hertz or the radian.

I always frowned upon the unit "radian". Radian is defined in terms of the ratio of two quantities both having length dimensions. So by this definition angle should be dimensionless. I really don't get radian.

Angle is technically dimensionless.

Not sure how to explain the "zen" of radians; it's kind of the angular equivalent of "e" in natural logarithms. People who first learn logarithms say WTF, what is this "e" thing? why not just log10 everywhere? But when you get into calculus you find that "e" is the only log base that doesn't introduce extra baggage; if you take the derivative of a^x the result is ln a * a^x, and if you take the derivative of log_a x = ln x / ln a, you get 1/(x ln a). In both cases the "ln a" term is 1 only when a = e.

For radians, the functions sin wt and cos wt (w = "omega") have derivatives of w * cos wt and -w * sin wt when wt is measured in radians. Otherwise there is an additional constant of proportionality that depends on the angular "unit". (the term "unit" in quotes because it's still dimensionless but just related to radians by a dimensionless scaling factor, like 180/pi for radians degrees or 1/(2*pi) for radians revolutions.

Re: Unit Definitions

#22
post #19
post #11

Earlier quoted context omitted.

I always frowned upon the unit "radian". Radian is defined in terms of the ratio of two quantities both having length dimensions. So by this definition angle should be dimensionless. I really don't get radian.

I've always ribbed against my physics professors using the notation of rad/s. To be fair, they'd make it clear that the reason they used it was to remind the students that the quantities were angular (ie \omega not velocity).

If you work in the field of motor control, you need this. (Not only that, but you need to distinguish electrical rad/s and mechanical rad/s; motors with N pairs of magnetic poles undergo N electrical cycles for each mechanical cycle.)

Re: Unit Definitions

#23

Just in case anyone is confused by this: (maybe it's just me?) // Alan's notes: // I'd like to put a mu in here for micro. // Should we adopt the questionable Electrical Engineer policy of using // "u" to indicate micro? I've added "uF" for microfarad later on to // tackle the most common case. This is referring to using the practice of using the character "u" instead of "µ" as the SI prefix for micro-, presumably be…

Other EE annoyances: capacitors are often marked with their capacitance as, say, "100 MFD". No, it's not megafarad, it's not millifarad; it actually means microfarad! That's annoying in several ways, including really abusing the SI prefixes (milli is "m" and mega is "M") and because the symbol for farad is simply "F", not "FD".

Re: Unit Definitions

#24
post #20
post #15

Earlier quoted context omitted.

> > This means that, if you follow the rules of the SI, 1 Hz = 1/s = 1 radian/s > I fail to see how this follows from the SI definition of either the hertz or the radian. The definition of 'Hertz' is 1/s. 'Radian' is not a unit, but a dimensionless number (the number 1, in fact, representing the ratio of arclength to radius where the arclength and radius happen to be the same), so that 1/s = radian/s.

yeah, the guy writing that rant in the units.txt file is messed up in the head.

Hehe. This is probably why the author of the document summarized the discussion of the Hz to say:

'Use of "Hz" will cause communication problems, errors, and make one party or another look insane in the eyes of the other.' LOL.

* Every physicist or electrical engineer or high school physics student has "known" for the past 100 years that a Hz is 2 pi radians/s. And it was defined that way for a long time, as the document referenced shows, and almost everyone follows this convention.

* Everyone who follows the current rules of the SI exactly (as per JadeNB's analysis above) "knows" that a Hz is 1 radian/s. His analysis is not hard to follow. It's utterly unambiguous and machine-parseable. There is no possible other answer.

So, you can see there's a problem there. The document correctly traces the changes in the definition of the Hz and radian at different times that led to this situation. (e.g. the Hz used to be defined as "cycles/s")

The funny part is seeing what different units-aware software packages do to try and make themselves seem reasonable. :)

* Frink (the package from which this data file emanates.): Follow the currently-written rules of the SI (that is, 1 Hz = 1 radian/s) but rant about it in the data file. Also, if you read the data file closely, it allows you to switch between radians having their own dimensions or being dimensionless (but warns against the former.)

* GNU Units: Follow the currently-written rules of the SI (that is, 1 Hz = 1 radian/s) Not sure if there's a rant.

* Wolfram Alpha: This was an interesting one. At launch, they followed the currently-written rules of the SI but this evidently led to lots of bug reports and a current inconsistent state. They used to report that "1 Hz = 1 radian/s" but soon they hacked and patched around these in some inconsistent ways. For example, it would work differently if you put in "1 Hz in radians/s" and "1.0 Hz in radians/s".

Nowadays, if you do "1 Hz in radians/s" in Wolfram Alpha, it gives you the answer "6.283 rad/s" which is more acceptable (but wrong according to strict interpretation of the SI) but has a little disclaimer where it says below (in gray) "(using 1 Hz = 1 rps (revolution per second))"

A revolution meaning a rotation of 2 pi radians, I hope.

But it's a single-case kludgey workaround. You can see that their system is hacked and self-inconsistent, because if you divide both sides of that calculation by something else, say, seconds:

    "1 Hz/s in radians/s/s"
which of course should give the exact same numerical value as above, 6.283, but this time it gives 1!

* Wolfram Language / Mathematica: Follow the currently-written rules of the SI (that is, "Convert[Hertz, Radian/Second]" gives "Radian/Second") Note that seems to be a different result than Wolfram|Alpha.

* Google calculator: At the start, Google Calculator would follow the currently-written rules of the SI (that is, "1 Hz in radians/s") would return 1. But this caused lots of consternation and bug reports: http://productforums.google.com/forum/#!topic/websearch/kudd...

The funniest part about that nowadays is that Google Calculator utterly refuses to do anything with the Hz, even if you force it with a preceding equals sign. The interactive interface only lets you turn Hz into kHz, MHz, etc, and other multiples. LOL. I'm sure that other self-consistent environments wish they had this latitude. Like a politician, any question they don't like, they just pretend not to hear, and give you somebody else's search results instead. :)

This problem with the definition of the Hz is nothing new, and is well known in the literature. For example, see: M.P. Foster, Quantities, units and computing, Computer Standards & Interfaces (2013), http://dx.doi.org/10.1016/j.csi.2013.02.001

In short, the author of the rant might be messed up in the head from having to 1.) deal with these inconsistencies and 2.) try to look non-insane to two groups of people who are simultaneously both right and both wrong.

Re: Unit Definitions

#25
post #24
post #20

Earlier quoted context omitted.

yeah, the guy writing that rant in the units.txt file is messed up in the head.

Hehe. This is probably why the author of the document summarized the discussion of the Hz to say: 'Use of "Hz" will cause communication problems, errors, and make one party or another look insane in the eyes of the other.' LOL. * Every physicist or electrical engineer or high school physics student has "known" for the past 100 years that a Hz is 2 pi radians/s. And it was defined that way for a long time, as the docu…

> * Everyone who follows the current rules of the SI blindly (as per JadeNB's analysis above) "knows" that a Hz is 1 radian/s.

FTFY

In any non-brain-dead system, angular frequency (rad/s, degrees/s, rev/s, RPM) has to be accounted for differently than 1/time. This unfortunately won't prevent automated systems from accepting "sin ft" where f is in Hz (incorrect) rather than "sin wt" where w is in rad/s (correct), but there's really no way to handle this automatically.

Post reply on HN