Showing posts with label product engineering. Show all posts
Showing posts with label product engineering. Show all posts

Monday, January 6, 2020

Fun with numbers and geekage for January 6, 2020

Money and Death on Vox, a bad infographic


I saw this on Twitter, apparently it's an infographic (or, in the parlance of those who want information graphical design to be, well, informative, a "chartoon") from a Vox article:


To begin with, these bubble diagrams, when correctly dimensioned (when they represent the data in an accurate graphical form), make comparisons difficult. Can you tell from that chart which cancer, breast or prostate, is more over-funded?

To add to that, this infographic isn't correctly dimensioned; it uses geometry to tell a lie (probably unwittingly), and that lie can be quantified with a lie factor:


The lie factor is the ratio of the perceived relative size of the geometric objects (for circles: areas) to the relative magnitude of the numbers (the money and deaths): you could fit eighteen of the COPD deaths circles inside the heart disease deaths circle, though the number of heart disease deaths are just a bit over four times those of COPD.

I would have thought that decades after Edward Tufte made this point in The Visual Representation of Quantitative Information, we'd no longer see this problem, but I was mistaken.



The infographic is used to make the point that donations are not correlated with deadliness, by showing what's effectively only a comparison of two rank orders. A better way to compare these two numbers would be to compute how much money is donated for each death or how many people die for each donated dollar, or both:


Note how easy the comparisons become and how two clear clusters appear in this format. That's the purpose of information graphical design, to make the insights in the data visible, not to decorate articles as a dash of color.



An anniversary of sorts: my Rotten Tomatoes analysis model is one year old.



On Dec 31, 2018, I watched a Nerdrotics video where Gary made the qualitative case for critics and audiences on Rotten Tomatoes using opposite criteria to evaluate certain TV shows. Out of curiosity, I decided to check that with data. That led to a few entertaining hours doing all sorts of complicated things until I settled on a very simple model, which I quickly coded into a spreadsheet, for extra convenience, and a number of fun tweets ensued, like the latest one:


The model:

Step 1: Treat all ratings as discretized into $\{0,1\}$. Denote the number of critics and audience members respectively by $N_C$ and $N_A$ and their number of likes (1s) by $L_C$ and $L_A$.

Step 2: Operationalize the hypotheses as probabilities. Under 'same criteria,' the probability of critics and audience liking is denoted $\theta_0$; under 'opposite criteria,' probability of critics liking is denoted $\theta_1$, and since the audience has opposite criteria, their probability of liking is $1-\theta_1$.

Step 3: Using the data and the operationalization, get estimates for $\theta_0$ and $\theta_1$. Notation-wise we should call them $\hat \theta_0$ and $\hat \theta_1$ but we're going to keep calling them $\theta_0$ and $\theta_1$.

Step 4: Compute the likelihood ratio of the hypotheses (how much more probable 'opposite' is than 'same'), by computing

$LR = \frac{\theta_1^{L_C} \, (1-\theta_1)^{N_C - L_C}} {\theta_0^{L_C} \, (1-\theta_0)^{N_C - L_C}} \, \frac{(1- \theta_1)^{L_A} \, \theta_1^{N_A - L_A}}{\theta_0^{L_A} \, (1-\theta_0)^{N_A - L_A}} $

(For numerical reasons this is done in log-space.) The reason I use likelihood ratios is to get rid of the large combinatorics (note their absence from that formula), which in many cases are beyond the numerical reach of software without installing special packages:




Going to the Moon... Done, moving on.


☹️ Let's just let the numbers speak for themselves:




Sainsbury's bans veggie bags


In the UK, which is in England, they keep banning things:


To be fair to Sainsbury's, they probably see this as a monetization opportunity under the cover of social responsibility (objections will be socially costly for those objecting), so probably not a bad business decision, irritating though it might be.

(I use a backpack as a shopping bag, and have been doing so for a long time, before there was any talk of bans or charging for bags. Because it's more practical to carry stuff on your back than in your hands. But I agree with Sam Bowman, this is starting to be too much anti-consumer.)


Gas for a 5 mile drive in a 25 MPG car yields about 1.8 kg of CO2. A 4 g polyethylene bag has a 24 g CO2 footprint. So, someone who walks to a local store [me] could use 74 plastic bags and still have lower footprint than someone who drives to a strip mall supermarket.



Engineer watches Rogue One, critique ensues



Typically, switches with overarching functions (say, "master switches") will have some sort of mechanical barrier to accidental movement, for example you have to lift them or press a button to unlock them before moving; sometimes they have locking affordances so that only authorized people (with the key or the code) can move them. There were none of these basic precautions here.

Apparently this switch controlling the entire facility's communications was located on the side of the taxiway for one of the landing pads, for... reasons? (Well, there's a reason: to get the drama of the pilot linking the cable and then the sacrifice of the two other fighters.)

And as for the final fight on top of the tower…


Consider that even if there was some reason the antenna was in some way dependent on actuators located on these pontoons, the controls for those actuators need not be near the actuators. It would make more sense for them to be near the central column anyway, just like the controls for a ship's engine are in the engine control room and act electrically on the actuators in the engine room (where there are backup electric controls and also mechanical access to the actuators themselves).



Big box gyms playing their usual pricing games of this season



(It's not hard to identify 24HourFitne…, ahem, the Big Box franchise from the name of the plans, but this is not a franchise-specific problem, it's a "all big box gyms and many smaller gyms that copy their policies" problem.)

And of course gyms want resolutioners to sign up for a year, as they know most of them will drop out soon:




Book buying, a personal history



So many books, so little time. But at least the wait is much shorter now.



Linkage


Unlike all the CYA statements people add to their various social media accounts to emphasize that which should be obvious — that retweeting and commenting is not an endorsement, much less a blanket endorsement of the entire sub-topology of what is being retweeted or commented on — these links are my endorsement of the content linked:

Plants can improve your work life — Phys.org

This may be a transcendent year for SpaceX — Ars Technica.

The World's Largest Science Experiment — Physics Girl on YouTube (video)

Metal Mayhem - with Andrew Szydlo — Royal Institution on YouTube (video)

The Hacksmith is taking a social media break. (Instagram.)

And showing that sports are much better when you replace them with engineering, here's Destin 'Smarter Every Day' Sandlin:






Live long and prosper.

Friday, November 1, 2019

Fun with numbers for November 1, 2019

Fast-charging batteries


From the web site that hangs off of the brand equity of the very prestigious journal Science: "New charging technique could power an electric car battery in 10 minutes" 

Congratulations to the team improving battery technology. But:

I. According to the news, this is a technology demonstration, though that might be inaccurate (the original report makes it a testing rig, which is one step farther back from a final product). There's a lot of work to do (and many avenues for failure) before this becomes a deployable product, much less at scale.


II. Charging a 75 kWh battery (AFAIK, the smallest battery in a Tesla car) in 10 minutes requires a charging power of 450 kW. Even using 480 V as the charging voltage, that's still a 937.5 A current; those cables will need some serious heft, and any impurities in the contacts will be a serious fire hazard.

III. A typical gas pump moves about 3 l of gasoline per second. Gasoline has around 34 MJ/l energy density, so that pump has a power rating of 102 MW, 227 times higher energy throughput than the new battery. Even if the distance/energy efficiency of internal combustion engines is lower than electric motors, that's a big difference. Also, you can buy Reese's peanut butter cups at gas stations.



More fun with Rotten Tomatoes



Watchmen (HBO series) shows that sometimes when data changes, the conclusions change.


Despite the caterwauling of many in the comic-book nerd community (not that I would know, as I don't belong… okay, I occasionally might take a look, but I'm not a comic book nerd… not since the early 70s…), data show that it's much more likely that the critics and the audience are using similar criteria for their evaluation of Joker than opposite criteria.

How much more likely? Glad you asked:

210,565,169,600,721,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 times more likely.

Ah, the power of parameterized models: you set them once, you can nerd out on them till the end of time. (I haven't watched either the show or the movie. Maybe when they get to Netflix or Amazon Prime.)


Added Nov 3: Haven't watched it yet, but Rotten Tomatoes data shows that critics are 1,361,188 times more likely to be using the same criteria as the audience than opposite criteria to evaluate "For All Mankind."



Some progress in nuclear fusion?



Some simple physics:
1 kg mass = 9E16 J of energy ($E = mc^2$)
Coal has 30 MJ/kg specific energy
10E6 kg coal have 3E14 J (assuming Bloomberg meant using combustion)
Fusion is to have 1/300 efficiency relative to pure mass-energy conversion?

Kudos. Now, get to it!



Shredded Sports Science eats an apple


Shredded Sports Science has a video making fun of people who know even less about fitness and nutrition than the "experts" in those "sciences," where he takes a bite of an apple and says "one rep," another bite, "two reps," the joke being on Chris Heria of Thenx.


Huh, the quant says, I wonder how the numbers will go…

Let's say a warm-up set of 100 kg squats and the total vertical path is 1 m. How much energy does one rep use, just for the mechanical work?

Naïve physics neophyte: huh, zero, the rep starts and ends at the same point.

No. The mechanics of the rep are different on the way down and on the way up: assuming that the weight moves at constant speed most of the time, the down movement requires the body provide work to counteract acceleration, so we can approximate the total work by 2 * 100 * 9.8 * 1 = 1960 J.

Note that this is just the mechanical part. Muscles have less than 100% efficiency and that efficiency changes as fatigue increases, hence the heat (heat, and to a smaller degree, changes to the mix of waste products of muscle contraction, represent losses in efficiency).

The other side of the coin is the chemical energy in that apple, which is measured by the magic ['delusion' or 'deception' also work here] of mistaking the simple process of combustion for the very complex processes of digestion and respiration. But let's pretend…

Apples are basically 1/3 sugar and 2/3 water, with some esters and ester aldehydes for taste and aroma, so for a small bite let's say 15g of apple we get 5 g of sugar; that's 20 kCal or ~ 84,000 J.

Shredded Sport Science's little joke would point to a combined digestion, respiration, and muscle contraction efficiency of 2.33%.

Evolution would have selected this biochemical parameterization right out of the gene pool.



Fun with energy



Talk about counting calories in a way that matters. (From the BP energy stats 2019; and yes, their tables are in MtOE, not calories, but unit changes are trivial, except maybe for gymbros.)



Bay Area versus Europe


With the return of Silicon Valley on HBO, there's a lot of hating on the Bay Area going around, so here's a thought in numbers…



Saturday, July 30, 2016

Product ≠ Prototype ≠ Technology ≠ Idea

Production note: Some credit to Thunderf00t, for had he not made such a complete pig's breakfast of his analysis of Hyperloop, this "why scientists are bad at engineering" post wouldn't have been written. *


Product ≠ Prototype ≠ Technology ≠ Idea


There are significant differences between an idea ("it would be great to fly from London to New York in four hours, let's use fighter jet technologies to make an airliner") and a marketable product (the Concorde). That's just on the engineering side, without the additional complexity of the business side.


Ideas to technology

An idea is just an organization of thoughts, for example: "if we got a train riding on magnets instead of wheels, we could get rid of friction, wear, and fatigue; then if we put the train in a low pressure tube we could go really fast."

This idea becomes a technology when you get something actually working; this something is called, for obvious reasons, a technology demonstrator. It's used to show that the technology has some potential, and it used to be a minimum requirement for getting funding. (More on that below.)

Linear motor Maglev technology is already available, though maybe not quite up-to-spec, but there are some technological barriers to overcome regarding the tubes and the pods.

Here it's worth noting a common error of reasoning, which is to assume that just because something hasn't been done, it can't be done.
For example, TF's use of a video excerpt showing Brian Cox inside "the largest vacuum chamber in existence." It's the largest because there was never a need for a larger one. It doesn't represent a technology limit. It's not that difficult to make a long tube that can take a big pressure differential (= pipeline), though we currently design this kind of tube for over-pressure because that's what its current use requires.
Many of the "the largest X in existence" limits are determined by economic necessity, not laws of physics. Think about the largest pizza ever made; was its size determined by some limit of the laws of physics?
Sometimes the technology is based on existing science, or co-developed with it, like some of the current work in biotech. Sometimes the technology precedes the science needed to explain it (or at least the attention of the scientists whose expertise is necessary to build the explanation), as was the case of most of the mechanical innovations in the first industrial revolution.

Part of the funding of Hyperloop is an investment in technology development that will have applications beyond the Hyperloop itself ("spillovers"). There's this thingamabob called a "laser" that was imagined as a pew-pew death-ray in sciFi, became reality as a pure Physics experiment, and mostly is used to checkout groceries, read data off of polycarbonate discs, pump bits down fiberoptics, and annoy cats. Oh, some pew-pew, too.

Sometimes licensing or developing the technology in directions other than the originally intended ends up being the most important part of the business.

It's probably worth noting two things at this point:
  • Hyperloop projects haven't finished the technology development phase; that would be indicated by a technology demonstration. Assertions about the final product at this stage are futile.
  • Getting funded by professional investment organizations (with their due diligence and fiduciary obligations) requires passing much stricter scrutiny than that given to crowdsourced projects (like Solar Roadways, the Fontus water bottle, or Triton artificial gills).

Technology to prototype

Once the technologies necessary for implementing the idea exist, they have to be put together and made to work under laboratory conditions or at test-scale, in the form of prototypes.

Here's where the "scientists are bad at engineering" point becomes most pointy.

Prototypes will obey the laws of Physics (and other sciences), since they operate in reality. It may be the case that the laws aren't known yet (as with the first industrial revolution) or that they are being simultaneously developed, but no prototype can violate the laws of Physics.

The problem is that there's a lot of specialized knowledge that goes into engineering. Each small piece of knowledge obeys the laws of Physics, but deriving them from first principles isn't practical. (And real scientists don't dirty their hands with engineering.)
For example, a physicist friend of mine didn't know why the suspenders of a suspension bridge (the vertical cables from the big catenary cable to the bridge deck) sometimes have a thin metal helix around them. When pressed on it he said "it's probably a reinforcement of some kind." I knew that the helix is there to limit aerodynamic flutter, and told him. He said, "oh, of course" and mentioned some interesting facts of turbulent flow.
That's what I mean by "science is the foundation of engineering, but scientists don't learn the body of knowledge of engineering." Most scientists are humble enough to understand that there are things they don't know. My physicist friend didn't assert that the helix was for reinforcement; he actually said, "I don't know," a sentence more people would be wise to use.
For illustration, here's a series of videos about metal shop work (the presenter is a professor, I believe, since he keeps talking about research prototypes, but he's seriously shop-savvy):


Instructive and entertaining videos. A big hat tip to Star Simpson for the link, via Casey Handmer. Such is the serendipitous nature of internet knowledge discovery.

A prototype is a one-off, possibly scaled-down, version of the product reduced to its core elements. It's designed to be operated by specialists under controlled circumstances. It requires constant attention during performance and, conversely, is usually over-instrumented for its final purpose (as a product, that is), since part of its purpose as a prototype is to see which parts of the engineering body of knowledge need to be applied to the technology itself.

Sometimes that extensive instrumenting of prototypes helps discover hitherto unknown issues or phenomena and leads to rethinking of extant technologies and redesign or retrofit of existing products. Historically a good part of the body of knowledge of engineering has evolved by this process.
For example, vortex shedding in aircraft wings was not identified for the first several decades of aviation, even though the physics necessary for it was developed in the late 19th Century. Once the engineering idea of vortex shedding wingtips (or, for older airframes being retrofitted, winglets) entered the body of knowledge, it became universal for new airframe design.
The gulf between a prototype, typically a one-off object made to laboratory-grade specifications that requires an expert to operate, and a final product is almost as big as that between idea and prototype, and a lot of other specialized skills are necessary to bridge that gulf.

Prototype to product

Any engineering product development textbook will identify a lot of things that separate a prototype from a product, but here are a few off the top of my head (and the figure above):
  • Products have to be mass-produced by production facilities, not prototyping shops or laboratories. Figuring out how to mass-produce a product and organizing that production is what's called production engineering. Sometimes that involves the development of specialized production technology, and its prototyping and production, which might involve production engineering of its own, which might require... etc.
  • Products are to be operated by normal people, not expert operators (the drunk Russian truck drivers in the figure were motivated by the Only In Russia twitter account, a terrible sink of productivity). Though it's not entirely accurate, many people believe that Apple's success stems from its ability to deploy technology into final products by making it accessible to average users. That is the field of user experience design.
  • Products also need to be much more resilient, safe, repairable, and maintainable than prototypes. Though, sadly for the practice of engineering  ---and the environment --- the "discard don't repair" mentality has taken hold, so maintainability and repairability aren't priorities in much product design. It being a railway, Hyperloop would have to be designed for both, of course.
There are a lot more. Engineering textbooks exist for a reason, they're not just collections of photos of pretty machines. A lot of knowlege goes into actually making things.

In the case of Hyperloop the product is passenger rail transportation, so there's yet another body of knowledge involved, that of managing railroad operations.

Yes, it sounds exciting, doesn't it?

The whole "how hyperloop will kill you" schtick is nonsensical, since there's no final design to evaluate; but it becomes hilarious when almost all the ways to "kill" the passengers have well-established railroad solutions, namely sectioning (you can isolate sections of a line, and you can have isolation joints in the tube), shunt lines and spurs (to remove a pod from the main tube and access the outside world), instrumentation and control system with appropriate redundancies, and a wealth of other factors that any railroad engineer would be aware of.

I'm not a railroad engineer; these are basic Industrial Management observations.

And then there's deployment…

Anyone with a passing knowledge of operations management or project management could find some possible issues with the infrastructure of Hyperloop, even without knowing the details of the technology. Not impossibilities, issues that might cost money and time.
For example, a number of logistics complications come to mind regarding the construction of the Hyperloop along Route 5, namely: the movement of large-sized tube elements; the use of the Route 5 lanes as part of the construction area (even if most of the staging is done off of the road itself) while it's in use as a public roadway; and let's not forget that California municipalities are among the most anti-change in the world: NIMBY was invented here. Unless you know someone who knows someone who knows…
To have an idea of the scale of the problem created by moving the many elements of the tube, consider what happens when just one large assembly has to move on public roadways:

Building the Hyperloop infrastructure is essentially a large-scale project management problem, and specialists would be involved; I added the example above to show that there are more obvious difficulties than the risk of depressurization; in fact, depressurization isn't much of an issue under good operations management and a well thought-out track.

But pointing out commonsensical logistical difficulties doesn't help with the whole "I am a great scientist, hear me snark" persona.



- - - - - - - - - - Footnote - - - - - - - - - -

* My current view of transportation is that trains and ships are better for freight and cars and airplanes are better for people. By cars I mean autonomous individual vehicles, not necessarily individually owned, chaining for inter-city travel at 200-300 km/h (individual pods self-organizing into convoys), and swarming for autonomous intra-city travel. Most of the current problems with air travel are economic, regulatory, cultural, and managerial, not technological, though I'd like to see supersonic aircraft further along the product development process.

Maybe the Acela corridor would make sense for Hyperloop, though. Particularly since weather in the frozen Winter wasteland and broiling Summer Inferno of the Northeast is more volatile than in California, and the Hyperloop tube would be more resilient than the air shuttles, particularly the small planes. (Boston to NYC late December in a small plane… the horror, the horror.)

But as mentioned above, I believe there are some potential high-value spillovers from the technological developments necessary for Hyperloop, including advances in materials science and production engineering, even if it isn't ever actually built.


A couple of acquaintances asked me why I don't address TF's video (or its follow-up and comments on both YouTube and Reddit) directly. Giving it minimal thought,


But the main reason not to get into online arguments with strangers is basically the same as for not wrestling with a pig: you both get dirty but the pig enjoys it.