John Larkin wrote:> On Tue, 24 Apr 2007 15:17:05 -0700, Tim Wescott <tim@seemywebsite> > wrote: > > >>After six and a half years, I still get email about my article "PID >>Without a PhD" >>(http://www.wescottdesign.com/articles/Sampling/pidwophd.html) from >>people who are asking for clarifications, or are asking questions that >>go beyond what I could say in the 5000 word limit that Embedded Systems >>Programming magazine imposed. >> >>The one I got today made me think. >> >>It didn't make me think because it was hard to figure out the answer, or >>because it was hard to explain the answer so it would be understood. It >>made me think because the writer was asking me about the dimensions of >>the gains in a PID controller, and I was impressed that someone who was >>obviously just approaching the subject was paying enough attention to >>want to do a correct job of dimensional analysis. >> >>It made me think of the innumerable times when I've done some complex >>calculation and ended up proving something absurd such as measures of >>length in units of gallons, and the subsequent discovery of my error. >>It made me think of the Mars Climate Orbiter which crashed because one >>team specified a motor in pound-seconds while another one used >>Newton-seconds (http://mars.jpl.nasa.gov/msp98/news/mco990930.html). It >>made me think of how much I like MathCad, because I can set variable >>values with the correct units, and how inconvenient nearly every other >>programming language is because numbers are just that -- anonymous numbers. >> >>So I thought I'd write a little bit about dimensional analysis, why I >>like it, and why you should use it, even if you think it is tedious and >>trite. >> >>Dimensional analysis is a method used by engineers and scientists that >>extends the notion that "you can't compare apples to oranges" to the nth >>degree. Dimensional analysis says that every variable in any physical >>problem has units, and that you ignore these units at your peril. >> >>The basic rules of dimensional analysis are these: >> >>1. There are very few naked (i.e. dimensionless) numbers. >>2. You can only add (or compare) two numbers of like dimension -- >> you can't compare feet with pounds, and if you're being strict >> you can't even compare pounds (which is strictly a measure of >> force) with kilograms (which is strictly a measure of mass). >>3. You can multiply (or divide) numbers of any dimension you want; >> the result is a new dimension. So if I pour water into a pan, the >> water at the base of the pan exerts a certain force on each bit >> of area, the resulting pressure is measured in pounds/square inch >> (PSI), or in Newtons per square meter (N/m^2, or Pascal). >>3a. You can honor famous people by naming dimensions after them -- >> Pascal is the metric unit of pressure, Ampere of current. Avins, >> Grise, and Wescott have yet to be defined. >> >>So why is dimensional analysis so cool? >> >>If you are doing a long calculation and you track your dimensions, some >>mistakes will show up as incorrect dimensions. >> >>It can give you insight into the operation of a system -- most >>explanations of fluid dynamics that I have seen rely heavily on >>dimensional analysis in their arguments, and when they do so such >>aerodynamically important quantities as Reynold's numbers and Mach >>numbers fall out. >> >>When you do design with physical systems, careful dimensional analysis >>keeps you out of trouble, even when you're getting the math right. >>Remember that Mars Lander? Had someone been carefully checking >>dimensions instead of looking at numbers and making assumptions, it >>would have been a successful mission instead of a famous crash. >> >>How do you use dimensional analysis? >> >>For working forward, such as finding the relationship between an >>aircraft's speed and it's lift, or finding the relationship between >>mass, speed and energy (remember E = mC^2?) you find out the dimensions >>that your answer _must_ have, then you hunt down candidates in that field. >> >>For working backward, you do all of your calculations with dimensions, >>then make sure that, for example, if you're commanding a system in feet >>it's moving in feet, and not apples/minute. If your answer ends up >>being in gallons/inch^2, you know you're close but may have to multiply >>by a constant. >> >>For a more full exposition of dimensional analysis I refer you to the >>Wikipedia article (http://en.wikipedia.org/wiki/Dimensional_analysis), >>or whatever your own web searches turn up. >> >>In the mean time, the next time you're dealing with a knotty problem -- >>make sure to track those dimensions. The Martian lander you save may be >>yours! > > > In a PID controller, we are summing voltages (which is fine) but they > also represent an error, the time integral of an error, and the > derivative of an error. > > The error is in volts. The integral is in volt-seconds. But we sum > them, and nothing explodes! > > John >Hmmm... X double dot = - X
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →
In Praise of Dimensional Analysis
Started by ●April 24, 2007
Reply by ●April 25, 20072007-04-25
Reply by ●April 25, 20072007-04-25
Jerry Avins wrote:> Tim Wescott wrote: > > ... > >> (http://mars.jpl.nasa.gov/msp98/news/mco990930.html). It made me >> think of how much I like MathCad, because I can set variable values >> with the correct units, and how inconvenient nearly every other >> programming language is because numbers are just that -- anonymous >> numbers. >> >> So I thought I'd write a little bit about dimensional analysis, why I >> like it, and why you should use it, even if you think it is tedious >> and trite. > > > Hear! hear! We need more of this. (T as the dimension of gain is absurd.) > >> Dimensional analysis is a method used by engineers and scientists that >> extends the notion that "you can't compare apples to oranges" to the >> nth degree. Dimensional analysis says that every variable in any >> physical problem has units, and that you ignore these units at your >> peril. >> >> The basic rules of dimensional analysis are these: >> >> 1. There are very few naked (i.e. dimensionless) numbers. > > > But those are vitally important. The arguments to transcendental > functions had darn well be dimensionless, even if you need to do extra > work (normalize) to make them so. The sine if two meters is a mistake. > >> 2. You can only add (or compare) two numbers of like dimension -- >> you can't compare feet with pounds, and if you're being strict >> you can't even compare pounds (which is strictly a measure of >> force) with kilograms (which is strictly a measure of mass). > > > Sometimes you can't even compare numbers of like dimension. For example, > the dimensions of torque and work are the same, but they are inherently > incommensurable. The MKS dimensions of volts are obscure, but > electromagnetic dimensions hang together even if they stand apart from > the more common ones. (The unit of flux is a volt-second; the unit of > inductance is volt-second/ampere-turn. "Turn", like radian. is > dimensionless.) > > ... > > Our educators should make more of a big deal of this than they do. > Thanks, Tim. > > JerryActually, my science teacher in High School emphasized units; minimal steps that must be shown in solving a given problem was 1) present the equation in standard form (E = I * R), 2) substitute the knowns WITH UNITS (22 Volts = I Amps * 11 Ohms), 3) solve for the unknown AND GIVE UNITS (I = 2 Amps); draw a box around the answer WITH UNITS so it can be found. Any of these criteria found missing will result in a grade of ZERO for that question (therefore, since there is no box, i get a ZERO). It was acceptable to add any number of intervening steps either for clarity or ease of calculation. Saved my butt in college as i was able to derive an equation from the units involved in the question; with that, i solved the problem and passed the test.
Reply by ●April 25, 20072007-04-25
"Robert Baer" <robertbaer@earthlink.net> wrote in message news:T8EXh.8234$3P3.1493@newsread3.news.pas.earthlink.net...> Actually, my science teacher in High School emphasized units...He deserves kudos. I'm amazed how many IEEE papers you see where units are left off of graphs, equations containing "magic constants" are presented without specifying the units assumes that are required to make the constant correct, etc.!
Reply by ●April 25, 20072007-04-25
Tim Wescott wrote:> After six and a half years, I still get email about my article "PID > Without a PhD"No wonder. The PhDs without the PIDs are much more common, then the PIDs without the PhDs.> It made me think of the innumerable times when I've done some complex > calculation and ended up proving something absurd such as measures of > length in units of gallons, and the subsequent discovery of my error.BTW, in the theoretical physics, they use the dimensionless units to avoid the heavyweight dimension constants: e = c = h = 1 How about that?> It > made me think of the Mars Climate Orbiter which crashed because one team > specified a motor in pound-seconds while another one used Newton-secondsNo. It crashed because it is impossible to be perfect in all but in the very small projects. This problem is mich wider then just the agreement about the dimensions.> It made me think > of how much I like MathCad, because I can set variable values with the > correct units, and how inconvenient nearly every other programming > language is because numbers are just that -- anonymous numbers.The beloved Microsoft style is using the so-called 'hungarian notation' to avoid that sort of mistakes. lpSTR, HANDLE, DWORD and such. Charles Simonai, who is the inventor of this style, just recently made it safely to the space and back :)> So I thought I'd write a little bit about dimensional analysis, why I > like it, and why you should use it, even if you think it is tedious and > trite.C++ allows you defining the explicit types like "VOLTAGE", "CURRENT" and such, so the dumb mistakes are avoided. However, this approach is seen by many as the counter productive and resulting in the inefficient code.> Dimensional analysis is a method used by engineers and scientists that > extends the notion that "you can't compare apples to oranges" to the nth > degree.Dimensional analysis is just a trivial check to avoid a class of a simple mistakes at the low level.> 3a. You can honor famous people by naming dimensions after them -- > Pascal is the metric unit of pressure, Ampere of current. Avins, > Grise, and Wescott have yet to be defined."Wescott" would better be reserved as the name of the not yet discovered radioactive chemical element of the halogen group. "Avins" is a parameter of a Markov source. What could be "Grise" ?> So why is dimensional analysis so cool?Because it is generating so much traffic! It is trivial, so anyone can add his two cents.> It can give you insight into the operation of a system -- most > explanations of fluid dynamics that I have seen rely heavily on > dimensional analysis in their arguments, and when they do so such > aerodynamically important quantities as Reynold's numbers and Mach > numbers fall out.There is a method of thermodynamic potentials, which derives a useful formulae from the dimension considerations by means of differentiation and integration. However if you divide your phone number by your SSN, it is not going to be very usefull.> When you do design with physical systems, careful dimensional analysis > keeps you out of trouble, even when you're getting the math right.This is the basic thing not worth mentioning which every professional should do automatically.> Remember that Mars Lander? Had someone been carefully checking > dimensions instead of looking at numbers and making assumptions, it > would have been a successful mission instead of a famous crash.It would crashed of some other trivial or non-trivial reason. Or at some other time. Somebody else would be sacrificed as a scapegoat. That's the only difference. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●April 25, 20072007-04-25
Tim Wescott wrote: (snip)> So I thought I'd write a little bit about dimensional analysis, why I > like it, and why you should use it, even if you think it is tedious and > trite.This reminds me of something that has occurred to me in the past, and that I would like to see if people here agree. It seems to me that in calculations physicists usually give variables quantities with dimensions, where engineers usually factor out the dimensions. For example, A physicist might say: F = m a, where the variable m might have the value 3kg or 5g. An engineer might say: F(Newtons) = m(kg) * a (m s**-2), such that m has the value 3 or 0.005. That is, the dimensions belong to the equation, but not to variables. It might be because most programming languages don't keep units with variables, so that one must factor them out before assigning a value to a variable. I would be interested to see if others agree or disagree. -- glen
Reply by ●April 25, 20072007-04-25
Joel Kolstad wrote:> My high-school physics book had a cartoon in it where Einstein was standing in > front of a chalkboard, having crossed out E=mc and E=mc^3. The caption was > something along the lines of, "Aha! So the units *do* work out in that one!"The one I remember has E=mc and E=mc**3 written down, and someone straightening up the books on a nearby bookshelf saying. "Well now that's all squared away." -- glen
Reply by ●April 25, 20072007-04-25
Vladimir Vassilevsky wrote: ...> It would crashed of some other trivial or non-trivial reason. Or at some > other time. Somebody else would be sacrificed as a scapegoat. That's the > only difference.Spoilsport! :-) Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by ●April 25, 20072007-04-25
glen herrmannsfeldt wrote:> Tim Wescott wrote: > > (snip) > >> So I thought I'd write a little bit about dimensional analysis, why I >> like it, and why you should use it, even if you think it is tedious >> and trite. > > This reminds me of something that has occurred to me in the past, and > that I would like to see if people here agree. > > It seems to me that in calculations physicists usually give variables > quantities with dimensions, where engineers usually factor out the > dimensions. For example, > > A physicist might say: > > F = m a, where the variable m might have the value 3kg or 5g. > > An engineer might say: > > F(Newtons) = m(kg) * a (m s**-2), such that m has the value 3 or 0.005. > > That is, the dimensions belong to the equation, but not to variables. > > It might be because most programming languages don't keep units with > variables, so that one must factor them out before assigning a value > to a variable. > > I would be interested to see if others agree or disagree. > > -- glen >I think that's true--engineers are typically taught to pull out all those fundamental factors of hbar, 4*pi/c**2, and so on, crunching them all into some anonymous constant to save labour and blunders. When you do that, you have to keep track of the units by hand, whereas in the physicists' method, the units get carried along automatically. In fact, people doing relativistic field theory usually use c=1 style, in which all the calculations are done with just numbers, and the proper conversion factors get figured out at the end, by reverse dimensional analysis--sticking in the right powers of c, hbar, G and so on to make the units come out right. It turns out that this is a well-defined procedure, so it saves labour and you still get the right answer at the end. (I'm not a field theorist, so I've never done this.) Cheers, Phil Hobbs
Reply by ●April 26, 20072007-04-26
In that example, you showed kilograms or grams -- I grew up with thousands prefixes, so I change them on the fly as it suits me. A 1k resistor has always been, and always will be, a 1000 ohm resistor as well, and not a 1 * (1000 / 1k) resistor. :^P Tim -- "Librarians are hiding something." - Steven Colbert Website @ http://webpages.charter.net/dawill/tmoranwms "glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message news:0t2dnTaRRIoZQ7LbnZ2dnUVZ_tSunZ2d@comcast.com...> Tim Wescott wrote: > > (snip) > > > So I thought I'd write a little bit about dimensional analysis, why I > > like it, and why you should use it, even if you think it is tedious and > > trite. > > This reminds me of something that has occurred to me in the past, and > that I would like to see if people here agree. > > It seems to me that in calculations physicists usually give variables > quantities with dimensions, where engineers usually factor out the > dimensions. For example, > > A physicist might say: > > F = m a, where the variable m might have the value 3kg or 5g. > > An engineer might say: > > F(Newtons) = m(kg) * a (m s**-2), such that m has the value 3 or 0.005. > > That is, the dimensions belong to the equation, but not to variables. > > It might be because most programming languages don't keep units with > variables, so that one must factor them out before assigning a value > to a variable. > > I would be interested to see if others agree or disagree. > > -- glen >
Reply by ●April 26, 20072007-04-26
As usual Tim is right. I would like to be more explicit about it's use in control systems. It's what allows you to "close the loop" on the block diagram; for instance the plant is something like degC1/ Volt, the transducer is something like Volts/degC2 and the controller is Volts/Volts. When multiplied this give degC1/degC2 as the gain and the units to measure during verification. Of course a real diagram has a lot more terms and different units; but the loop product must balance. Inserting the open loop process variables in proper units degC1/degC2 into the equations answers many questions. One additional point is that the form is not as specialized as it seems, but carries over to generalized Differential Geometry as vector/ covector spaces. Applying dimensional analysis in this realm has allowed me to make sense of a lot of formulas. The units changes (volts->degC) correspond to mapping from one vector space to another (and back); the reduction to a gain scalar is the contraction of a covector and vector; and so forth. RayRogers Tim Wescott wrote:> After six and a half years, I still get email about my article "PID > Without a PhD" > (http://www.wescottdesign.com/articles/Sampling/pidwophd.html) from > people who are asking for clarifications, or are asking questions that > go beyond what I could say in the 5000 word limit that Embedded Systems > Programming magazine imposed. > > The one I got today made me think. > > It didn't make me think because it was hard to figure out the answer, or > because it was hard to explain the answer so it would be understood. It > made me think because the writer was asking me about the dimensions of > the gains in a PID controller, and I was impressed that someone who was > obviously just approaching the subject was paying enough attention to > want to do a correct job of dimensional analysis. > > It made me think of the innumerable times when I've done some complex > calculation and ended up proving something absurd such as measures of > length in units of gallons, and the subsequent discovery of my error. > It made me think of the Mars Climate Orbiter which crashed because one > team specified a motor in pound-seconds while another one used > Newton-seconds (http://mars.jpl.nasa.gov/msp98/news/mco990930.html). It > made me think of how much I like MathCad, because I can set variable > values with the correct units, and how inconvenient nearly every other > programming language is because numbers are just that -- anonymous numbers. > > So I thought I'd write a little bit about dimensional analysis, why I > like it, and why you should use it, even if you think it is tedious and > trite. > > Dimensional analysis is a method used by engineers and scientists that > extends the notion that "you can't compare apples to oranges" to the nth > degree. Dimensional analysis says that every variable in any physical > problem has units, and that you ignore these units at your peril. > > The basic rules of dimensional analysis are these: > > 1. There are very few naked (i.e. dimensionless) numbers. > 2. You can only add (or compare) two numbers of like dimension -- > you can't compare feet with pounds, and if you're being strict > you can't even compare pounds (which is strictly a measure of > force) with kilograms (which is strictly a measure of mass). > 3. You can multiply (or divide) numbers of any dimension you want; > the result is a new dimension. So if I pour water into a pan, the > water at the base of the pan exerts a certain force on each bit > of area, the resulting pressure is measured in pounds/square inch > (PSI), or in Newtons per square meter (N/m^2, or Pascal). > 3a. You can honor famous people by naming dimensions after them -- > Pascal is the metric unit of pressure, Ampere of current. Avins, > Grise, and Wescott have yet to be defined. > > So why is dimensional analysis so cool? > > If you are doing a long calculation and you track your dimensions, some > mistakes will show up as incorrect dimensions. > > It can give you insight into the operation of a system -- most > explanations of fluid dynamics that I have seen rely heavily on > dimensional analysis in their arguments, and when they do so such > aerodynamically important quantities as Reynold's numbers and Mach > numbers fall out. > > When you do design with physical systems, careful dimensional analysis > keeps you out of trouble, even when you're getting the math right. > Remember that Mars Lander? Had someone been carefully checking > dimensions instead of looking at numbers and making assumptions, it > would have been a successful mission instead of a famous crash. > > How do you use dimensional analysis? > > For working forward, such as finding the relationship between an > aircraft's speed and it's lift, or finding the relationship between > mass, speed and energy (remember E = mC^2?) you find out the dimensions > that your answer _must_ have, then you hunt down candidates in that field. > > For working backward, you do all of your calculations with dimensions, > then make sure that, for example, if you're commanding a system in feet > it's moving in feet, and not apples/minute. If your answer ends up > being in gallons/inch^2, you know you're close but may have to multiply > by a constant. > > For a more full exposition of dimensional analysis I refer you to the > Wikipedia article (http://en.wikipedia.org/wiki/Dimensional_analysis), > or whatever your own web searches turn up. > > In the mean time, the next time you're dealing with a knotty problem -- > make sure to track those dimensions. The Martian lander you save may be > yours! > > -- > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com







