Real-time air pollution map - <AUTHOR> https://www.purpleair.com/map#1/25/-30 <comment><USER2> I'm saddened by the balkanization of air monitoring space. This map shows few PurpleAir sensors in Poland, but there are in fact many more sensors like this in existence - some under a FOSS project Luftdaten[0], others operated by a particular local startup. I recently built a Luftdaten sensor myself (though I'm yet to connect it to the project map). I expect the situation in other countries to be similar.

I wish all those air monitoring organizations and companies cooperated on a single map. This data really needs to be aggregated together.

\--

[0] - [https://luftdaten.info/](https://luftdaten.info/)

<comment><USER3> Could US users easily buy and deploy these sensors (EDIT: from Luftdaten, since my comment wasn't clear)? Or must one build them?

<comment><USER4> they sell them here [https://www.purpleair.com/sensors](https://www.purpleair.com/sensors)

</comment></comment></comment><comment><USER5> Huge project by the german open data community: [http://maps.luftdaten.info/#4/44.54/7.52](http://maps.luftdaten.info/#4/44.54/7.52)

<comment><USER6> Available in range of locales.

[https://luftdata.se/](https://luftdata.se/) for us swedes!

</comment></comment><comment><USER7> Isn't [http://aqicn.org](http://aqicn.org) better? It seems quite real time and uses more stations at least above The Czech Republic.

<comment><USER8> I used to use that when I lived in Beijing, but when it comes to visualisation, nothing beats this site: [https://www.airvisual.com/earth](https://www.airvisual.com/earth)

You don't really get a feel for how the clouds of pollution move around in the other maps.

<comment><USER9> "I used to use that when I lived in Beijing, but when it comes to visualisation, nothing beats this site: [https://www.airvisual.com/earth"](https://www.airvisual.com/earth")

Which sensor network does that site get data from ?

Also, as I look at this map today, what is going on just northeast of Mexico city ?

</comment></comment></comment><comment><USER10> PurpleAir received a lot of notoriety during the California fires last month after the official AIRNow site ([https://airnow.gov/index.cfm?action=airnow.local_city&cityid...](https://airnow.gov/index.cfm?action=airnow.local_city&cityid=317)) crashed from the traffic.

The AQIs given by default are higher than what's reported on the AIRNow; you'll have to apply a conversion in the bottom-left to get something closer.

<comment><USER11> The AQIs reported by purple air are US EPA PM NowCast[0] AQIs for PM 2.5. NowCast, uses weighted averages over the past 12 hours of observations, rather than a simple arithmetic mean over the past 24 hour like the regular EPA AQI standard. NowCast was developed to be more sensitive to current conditions in order to help people make better immediate descisions about their health. The normal AQI standard was developed for long term air quality monitoring.

The other thing that can effect the numbers is that AQIs are defined across a range of pollutants (usually PM 2.5, PM 10, CO, NO2, O3, and SO2) PurpleAir sensors only measure PM 2.5 and PM 10, but I think the numbers they show are only PM 2.5.

[0] [https://en.wikipedia.org/wiki/NowCast_(air_quality_index)](https://en.wikipedia.org/wiki/NowCast_\(air_quality_index\))

</comment></comment><comment><USER12> Since 2015 Google Street View cars have been driving around with Aclima air pollution sensors. The interesting thing, is that pollution varied greatly block to block with no obvious explanation. I think to get a good result, you need a sensor very close to you.

<comment><USER13> Could it depend if the car was following a truck at the time?

On my bicycle on London, I really notice the difference between busses with the tailpipe on the left or right side of the vehicle even.

<comment><USER14> Absolutely. I always hold my breath and hit the brakes if a bus gets in front of me. Trucks aren't so bad as they have the exhaust pipe pointing right up in the air. Just the amount of traffic at the time makes a huge difference as well. At peak hour times I have breathing issues but other times its acceptable.

</comment></comment></comment><comment><USER15> One of these sensors is right outside my balcony (specifically one in West Los Angeles / Santa Monica). I set it up as part of a RAND Corporation study, and I've really enjoyed being able to get hyperlocal data.

<comment><USER16> They still giving out sensors? Not sure I live far enough away from you to merit another for the study, but worth an ask.

</comment></comment><comment><USER17> It's sad how bad bay area air is at night. Fireplaces seem fun, but really don't work in California valleys.

<comment><USER14> I heard that industrial buildings crank up their pollution at night because people don't see it to complain about.

<comment><USER12> In the city here, I always see those trucks modified to vacuum debris from parking lots. They begin their "cleaning" thing around 12AM. They seem to just shoot the stuff right up into the air and make a huge mess. Not sure if they are supposed to work that way, or the machinery isn't being maintained, etc.

</comment></comment></comment><comment><USER18> The real time is a nice toy but all together to me it looks like a stripped down version of [https://earth.nullschool.net](https://earth.nullschool.net)

E.g.: [https://earth.nullschool.net/#current/particulates/surface/l...](https://earth.nullschool.net/#current/particulates/surface/level/overlay=pm2.5/orthographic=-343.80,43.25,1182)

<comment><USER19> that's wind data, not air pollution

<comment><USER20> False.

Nullschool's visualiser gives wind, yes, but also temperatures, ocean currents, wave heights, and numerous pollutants: CO, CO2, SO4, and particulate matter.

It's useful in tracking bushfire evolution, carbon emissions, and even sea lanes visible by the sulfer emissions due to high-sulfer bunker oil burnt by ships:

[https://earth.nullschool.net/#current/chem/surface/level/ove...](https://earth.nullschool.net/#current/chem/surface/level/overlay=so2smass/orthographic=-14.41,-9.10,1345/loc=-18.561,-0.671)

[https://earth.nullschool.net/#current/chem/surface/level/ove...](https://earth.nullschool.net/#current/chem/surface/level/overlay=so2smass/orthographic=76.13,-1.70,1345/loc=-18.561,-0.671)

Also of volcanos:

[https://earth.nullschool.net/#current/chem/surface/level/ove...](https://earth.nullschool.net/#current/chem/surface/level/overlay=so2smass/orthographic=203.11,16.62,2689/loc=-155.353,18.644)

There's history as well. Here's CO emissions during the Camp fire, 10 November 2018:

[https://earth.nullschool.net/#2018/11/10/0900Z/chem/surface/...](https://earth.nullschool.net/#2018/11/10/0900Z/chem/surface/level/overlay=cosc/orthographic=244.46,34.92,3000/loc=-120.915,36.821)

And PM2.5:

[https://earth.nullschool.net/#2018/11/10/0900Z/particulates/...](https://earth.nullschool.net/#2018/11/10/0900Z/particulates/surface/level/overlay=pm2.5/orthographic=244.46,34.92,3000/loc=-120.915,36.821)

</comment></comment></comment><comment><USER21> There are a lot of community initiatives to measure and map air pollution data. They operate independently of each other because of known data quality issues that is characteristic of the low-cost sensors they use. However, would be great if there was an initiative to bring all these measurements in one platform.

There is OpenAQ ([https://openaq.org/](https://openaq.org/)) that aggregates all publicly available air quality data from government and research-grade sources. They don't have the funds to aggregate low-cost sensor data, and one big reason is the poor data quality.

You will see from the OpenAQ map that much of the world is without government monitoring of air quality.

I live in one such country, and I run the Pakistan Air Quality Initiative ([http://twitter.com/pakairquality](http://twitter.com/pakairquality)) where we work with concerned citizens to monitor air quality in a number of major cities using the IQair AirVisual air quality monitors. Our data currently shows on the (www.airvisual.com) website, but would be great to have the data available through an aggregation platform similar to OpenAQ

</comment><comment><USER13> It uses a vector draggable openstreeetmap map... Never knew that was a thing!

</comment><comment><USER11> I have a weather station and use WeeWx[0] to monitor my Vantage2 Pro, and PurpleAir sensor using an extension[1].

I've been working on an my own extension[2] to calculate AQI values for various standards. Right now it supports six.

\- Canada's Air Quality Health Index

\- India's National Air Quality Index

\- Mexico's Índice Metropolitano de la Calidad del Aire

\- United Kingdom's Daily Air Quality Index

\- United States's Air Quality Index

\- United States's NowCast Air Quality Index

I'm always looking to add more (The EU's standard is high on my list.), and would welcome more people to use it.

[0] [http://weewx.com/](http://weewx.com/)

[1] [https://github.com/bakerkj/weewx- purpleair](https://github.com/bakerkj/weewx-purpleair)

[2] [https://github.com/jonathankoren/weewx- aqi](https://github.com/jonathankoren/weewx-aqi)

</comment><comment><USER22> This is great. I've sworn since I've moved to Pasadena that the air has been much fresher than my last neighborhood.

133 down to 53!

I'll have to take my lungs out for a drink to celebrate.

</comment><comment><USER23> This is really really cool, but seems a little buggy in Firefox on my mac. Took quite a while for the clusters to show up, and then they went away after clicking on one and zooming back out. Would be great to see some more informative UI controls as well. Without existing knowledge, I'm not too sure what the drop box on the right hand side is for example.

<comment><USER11> That's just the PurpleAir site. It's like that for all browsers for years. By how crappy it is, I think they're naïvely trying to render ever sensor in the view window.

</comment></comment><comment><USER24> There's also a satellite measuring pollution:

[https://www.esa.int/Our_Activities/Observing_the_Earth/Coper...](https://www.esa.int/Our_Activities/Observing_the_Earth/Copernicus/Sentinel-5P/Sentinel-5P_brings_air_pollution_into_focus)

</comment><comment><USER25> I used PurpleAir maps during the Camp Fire; small particulates in east Chico were off the charts.

</comment><comment><USER26> Realtime PM2.5 monitoring in India can be seen here: [http://atmos.urbansciences.in/dashboard](http://atmos.urbansciences.in/dashboard)

Many of these sensors are colocated with FEM/FRM grade BAM monitors.

</comment><comment><USER27> This is pretty cool. As a runner, I try to stay indoors when the weather is bad, but I also wonder if there are highly local pollution patterns related to traffic. Ideally, you could identify something like that with a tool like this.

</comment><comment><USER11> Does anyone know of an inexpensive sensor that measures other things than particulate matter?

Once I got a PurpleAir, I started to want to measure ozone and other pollutants, but I haven't found a sensor (or even sensor component) that measures that.

</comment><comment><USER28> What map is this using? No RTL support for right to left languages

</comment><comment><USER29> 197 in New Haven, CT. Next to a factory or something?

</comment><comment> black-tea I'm surprised that the UK is all green even in London. I'd like to set one of these up near a busy road that connects our biggest port, but they're prohibitively expensive. This surely biases the results towards areas where rich people who have money to burn live.

<comment><USER30> I'm also surprised to see there are no sensors near the major London airports.

Northern Italy is all red, what's going on there?!</comment></comment>


Ask HN: What is the potential of human technology? - <AUTHOR>

What is the ultimate goal of human technology as we understand it at this stage?
Where will technology be in 1, 5, 10, 100, 10^3, 10^4 years?
Areas to consider:
* Locomotion
* Communication
* Agriculture/energy
* Infrastructure and social arrangements
As technologists, what are your thoughts on this? <comment><USER2> The ultimate goal of technology is to make human lives better; more comfortable, easier, safer, securer, etc.

I think Maslow's hierarchy of needs might help define the priority of invention (<http://en.wikipedia.org/wiki/Maslows_hierarchy_of_needs>).

The ultimate step in this hierarchy is "self-actualization", whatever that is. Once we satisfy our social, biological needs, (easy cheap food, plentiful resources) we can work on technology to "self-actualize". This technology and process could fundamentally change the meaning of being human.

<comment><USER3> > I think Maslow's hierarchy of needs might help define the priority of > invention

Where's entertainment in that hierarchy of needs?

Maybe entertainment isn't a need, but it's a pretty strong want, a want that has resulted in considerable invention already.

</comment></comment><comment><USER4> People forget that technological development isn't linear but an exponential curve. Once we get to a point where machines can design themselves the sky is the limit. Right now all human knowledge doubles every 2 years. Look back at the technology 50 years, or just 20 years ago and see how far we have come. It's impossible to predict where we will be even just 20 years from now.

In the 20-30 year time frame everything from immortality to artificial sentience could be possible.

<comment><USER5> I hate image dropping in comments, but this picture of Apple's flagship products 10 years ago and today seems relevant: <http://i.imgur.com/KhDWo.jpg>

</comment></comment><comment><USER6> There is no ultimate goal, though the idea of harnessing zero point energy if it is possible is certainly intriguing, it might allow us to stop the universe from ending in heat death, that would be quite an accomplishment.</comment>


FCC imposes ISP privacy rules - <AUTHOR> http://arstechnica.com/information-technology/2016/10/isps-will-soon-have-to-ask-you-before-sharing-private-data-with-advertisers/ <comment><USER2> From the article:

 _" The new privacy rules require ISPs to get opt-in consent from consumers before sharing Web browsing data and other private information with advertisers and other third parties. The rules apply both to home Internet service providers like Comcast and mobile data carriers like Verizon Wireless. The commission's Democratic majority ensured the rules' passage in a 3-2 vote, with Republicans dissenting."_

I don't consider myself a privacy nut, but I have a hard time imagining why this is so controversial, that it splits so strongly along party lines.

Here's the crux of it, it seems:

 _" Internet providers shouldn't face stricter rules than websites like Google and Facebook, which are regulated separately by the Federal Trade Commission, they said."

"Wheeler argues that ISPs are uniquely capable of collecting consumers' Internet traffic because they can monitor everything that goes over the connection and because it is difficult for customers to switch ISPs."_

I'd prefer to see stronger consumer protection for companies gathering consumer data, rather than relatively weaken them for ISPs.

</comment><comment><USER3> Up next; FCC Censorship rules.</comment>


Brain Restoration System Explores Hazy Territory Between Being Dead or Alive - <AUTHOR> https://www.scientificamerican.com/article/brain-restoration-system-explores-hazy-territory-between-being-dead-or-alive/ <comment><USER2> The worst fear I have isn't about being dead, but about the process: how long does it takes and what someone feels during all that time?

Reading that it's possible to keep some cells in that intermediate stage gives me shivers. I know that hair and nails can keep growing for some while (hey, I'm just a bunch of cells that keep living while others have gone), but when we come to the point that brain cells can be kept alive in a petri dish... Will this make me kind of conciously still alive?

<comment><AUTHOR> Hair and nails don't continue growing after death, it's an illusion caused by the shrinkage/retraction of skin.</comment></comment>


Web 2.0 companies face a problem: too many users in the wrong countries - <AUTHOR> http://www.mercurynews.com/breakingnews/ci_5388068 <comment><USER2> bgold, here's the updated link to the article - http://www.siliconvalley.com/mld/siliconvalley/16866987.htm

</comment><comment><USER3> I actually know a Dutch social network that killed of their Spanish audience by targeting more on national events. It all depends on strategy I guess.

</comment><comment><USER4> As I recall reddit has over 50% of their traffic from outside the United States.

</comment><comment><USER5> the article's no longer available</comment>


How much does DrupalCon cost? A line by line examination of the numbers. - <AUTHOR> http://dc2009.drupalcon.org/news/drupalcon-dc-numbers-community-profit-and-sustainability

<comment><USER2> I knew coffee at conferences was expensive, but $60/Gallon? That's $10 for a 20 oz coffee, and they don't even pour it for you!

</comment><comment><USER3> Blows my mind costs associated with AV and wireless. Someone is making a tidy profit.</comment>


NASA's Parker Solar Probe Is Unlocking the Sun's Mysteries - <AUTHOR> https://www.nytimes.com/2019/12/04/science/nasa-parker-solar-probe-pictures.html <comment><AUTHOR> Another article regarging the scientist (for whom the probe is named) who first theorized, against universal skepticism, about the solar wind: [https://www.nytimes.com/2018/08/10/science/eugene-parker- sol...](https://www.nytimes.com/2018/08/10/science/eugene-parker-solar-wind- nasa-probe.html?action=click&module=RelatedLinks&pgtype=Article)

</comment><comment><USER2> National Geographic did a documentary called "Mission to The Sun" on the launching of this mission that was really interesting. I stumbled across it on Disney+ of all places, not sure where else it's available. I would definitely recommend watching it.</comment>


Web Start-Ups Offer Bargains for Users' Data - <AUTHOR> http://www.nytimes.com/2010/05/31/business/media/31privacy.html?hp

<comment><USER2> And 70% of users would reveal their password for a bar of chocolate: <http://news.bbc.co.uk/1/hi/technology/3639679.stm>

It doesn't make it ethical or right, or ultimately good for the industry.

</comment><comment><USER3> I thought this was going to be about the great (read: profitable) datasets that even small / unsuccessful startups have. As far as ethics, I'm all for as much openness as we can stand. As long as everything is transparent, what's the harm in it?</comment>


Obama: "If You've got a Business – You Didn't Build That." - <AUTHOR> http://www.ijreview.com/2012/07/10623-obama-if-youve-got-a-business-you-didnt-build-that/

<comment><USER2> How about the other side of the coin: the successful people who insist that they absolutely did it by themselves, with no government-funded infrastructure, no societal acceptance, and no community support of any kind?

<comment><USER3> You didn't build that wood deck, Craftsman tools and dead trees did. Silicon Valley should be horrified at what this man said.</comment></comment>


J-core Open Processor - <AUTHOR> http://j-core.org/?HN_20160716 <comment><USER3> Interesting that's still and nommu system. Maybe as soon as the patents expire we can get the mmu system.

"Numato provides a GPL-licensed python3 tool to flash bitstreams onto their board. [TODO: port to python 2]"

No, please. Don't even bother

<comment><USER4> What patents? All kinds of CPU's have MMU's. Implementations go back decades. Cant imagine a patent risk for MMU's.

<comment><USER3> Patents for SH4 as described in the article (this is an SH2)

</comment></comment></comment><comment><USER5> >> " Open source hardware can be manufactured cheaply (about 3 cents per processor) audited for NSA backdoors or vendor backdoors or decade-old exploitable firmware bugs, and built without hidden extra processors in things like storage devices and USB controllers easily repurposed into spyware."

Anyone familiar with J-Core able to expand on the how an audit would be done end-to-end?

Seems like it would be much harder to do in practice than in theory.

<comment><USER6> You can audit the code, compile, synthesise, place and route the design, tape out masks, send it to a fab, decap a few of the chips you get back and look at it under a microscope. You should be able to compare that to the masks to verify the design hasn't been tampered with.

It's harder to audit ASICs that other people have had fabricated without having the exact same standard cell libraries, tooling versions (optimisations change over time), knowing what optimisation settings they used, etc. to be able to prove the masks came from the same code.

<comment><USER7> Is spot checking good enough? Wouldnt you need to follow every trace?

<comment><USER8> In hardware, implementing a backdoor that provides a reasonable level of functionality is _probably_ going to cause a visible change to the layout/routing, kind of like a software backdoor is going to change the hash.

I say probably because it's possible that advanced actors like the USA and China have developed tools that add features (backdoors) while making the visual layout look very similar. Then you would probably only find the backdoors by "fuzzing" the chip like you would a piece of software.

<comment><USER9> There are hardware backdoors that require only dopant-level changes, see the second comment here:

[https://lwn.net/Articles/688751/](https://lwn.net/Articles/688751/)

<comment><USER10> It feels like trying to fend of anything but automated drive-by attacks online will be a fools errand.

</comment></comment></comment></comment></comment></comment><comment><USER11> Tremendous work as always from Rich Felker, Rob Landley, & co.

</comment><comment><USER12> I'm interested, but mostly in the part where we get to silicon - <USER2> yet another CPU in VHDL isn't all that uncommon.

What about the "to silicon" part of this equation is out there now?

<comment><USER13> In this talk [https://news.ycombinator.com/item?id=12101908](https://news.ycombinator.com/item?id=12101908) they said their toolchain can output layouts for the CPU on silicon, and it would cost about $25,000 to have photomasks made, and I think about $0.50 per chip.

<comment><USER12> I haven't seen that part of their toolchain; that's where I'm interested. Also, seeing a successful test of this toolchain in working silicon, with a known vendor and a good process, would be extremely helpful for the community (if other people are going to get aboard, which I hope they are).

<comment><USER4> Look up Qflow open-source flow. It's the likely toolchain OSS projects will use. Combines Yosys front-end, ABC backend, and custom tool (Qrouter) for routing. Worth evaluating.

<comment><USER12> Yosys is a Verilog front-end; this is being designed in VHDL.

It looks like there is a translator, but I'm unsure about its license, source availability, and capability.

</comment></comment></comment></comment></comment><comment><AUTHOR> In the interests of full disclosure, this was submitted earlier here:

[https://news.ycombinator.com/item?id=12103471](https://news.ycombinator.com/item?id=12103471)

However, that submission was incorrectly marked as a duplicate of this submission:

[https://news.ycombinator.com/item?id=12101908](https://news.ycombinator.com/item?id=12101908) (video)

But it's not a duplicate - they have different information. This submission is the web site of the project and has links to files and "how to" documentation. The second submission is to an hour-long about the project, and while it contains information, it's fundamentally different.

I don't know why the original submission of this link got marked as a duplicate - I believe it to have been a mistake.

<comment><USER14> We've unmarked the previous thread as a dupe.

<comment><AUTHOR> While I appreciate the action, it's too late. That item has sunk now without trace, and while karma isn't actually worth anything, it would have been nice for that original submitter to get the associated karma for finding this, and not me.

</comment></comment></comment><comment><USER15> This is really getting annoying. I submitted this same link 14 hours earlier ([https://news.ycombinator.com/item?id=12103471](https://news.ycombinator.com/item?id=12103471)). It was flagged as a dupe (even thought it wasn't at the time) and killed. (It has since been unflagged, but of course it's too late to save it now.)

<comment><AUTHOR> I agree with you entirely, which is why I resubmitted it and made the extensive comment[0] about why it is not a duplicate, and deserves to be here in its own right. If I could gift you the karma I would, not that it's really worth much, to be honest.

The current method of handling duplicates is quite simply not working. Consider the multiple large discussions about Google deleting a blog without warning[1][2][3].

HN needs a way to merge items, not simply mark some as duplicates, which kills the item, and any discussion on it then sinks without trace. There must be a better way.

[0] [https://news.ycombinator.com/item?id=12105922](https://news.ycombinator.com/item?id=12105922)

[1] [https://news.ycombinator.com/item?id=12097063](https://news.ycombinator.com/item?id=12097063)

[2] [https://news.ycombinator.com/item?id=12099757](https://news.ycombinator.com/item?id=12099757)

[3] [https://news.ycombinator.com/item?id=12100843](https://news.ycombinator.com/item?id=12100843)

<comment><USER15> Ah, I missed that. Thanks for the shout out!

I've given some thought to how a more fair submission system would work, and I came up with the following idea:

1\. Dup submissions are treated as upvotes

2\. If an article has N upvotes, the original submitter gets N points (as it is now), the second submitter (or upvoter -- same thing) gets N/2 points, the third gets N/3 points, etc. until either the article makes it onto the front page or some arbitrary point threshold (like 10) is reached.

3\. Every upvote or submission costs one karma point. So you have to have at least one karma point to submit or upvote. You have to get your bootstrap points by submitting a comment that gets an upvote. This is to prevent spamming.</comment></comment></comment>


Urban Engines launches transit app with x-ray and offline maps/search/routing - <AUTHOR> http://techcrunch.com/2015/02/10/urban-engines/

<comment><USER2> Really like the xray view for direction and to find the bus stops. How do you make the overlay tracks the orientation well? Do you use both compass and accelerometer? I can see myself using this a lot during baseball season.

<comment><AUTHOR> we use all the sensors on the device, including compass and accelerometer. This is only possible because we built our own end-to-end mapstack for mobile.

</comment></comment><comment><USER3> I just downloaded this app. It's great! I love this app.

</comment><comment><USER4> Diggin it :)</comment>


New Zealand Is 'the Future,' Peter Thiel Said in His Push for Citizenship - <AUTHOR> https://www.nytimes.com/2017/02/01/business/peter-thiel-new-zealand-citizenship.html <comment><USER2> Is having a place to live in NZ part of some 'prepper' survival plan?

From The New Yorker's profile of sama:

        "My problem is that when my friends get drunk they talk about the ways the
        world will end. After a Dutch lab modified the H5N1 bird-flu virus, five
        years ago, making it super contagious, the chance of a lethal synthetic
        virus being released in the next twenty years became, well, nonzero."

        ...

        If the pandemic does come, Altman's backup plan is to fly with his friend
        Peter Thiel, the billionaire venture capitalist, to Thiel's house in New
        Zealand.

[http://www.newyorker.com/magazine/2016/10/10/sam-altmans- man...](http://www.newyorker.com/magazine/2016/10/10/sam-altmans-manifest- destiny)

<comment><USER3> (Mobile friendly)

From The New Yorker's profile of sama:

"My problem is that when my friends get drunk they talk about the ways the world will end. After a Dutch lab modified the H5N1 bird-flu virus, five years ago, making it super contagious, the chance of a lethal synthetic virus being released in the next twenty years became, well, nonzero.

[...]

If the pandemic does come, Altman's backup plan is to fly with his friend Peter Thiel, the billionaire venture capitalist, to Thiel's house in New Zealand."

SOURCE: [http://www.newyorker.com/magazine/2016/10/10/sam-altmans- man...](http://www.newyorker.com/magazine/2016/10/10/sam-altmans-manifest- destiny)

</comment></comment><comment><USER4> Why can't Thiel like New Zealand and support Trump? Isn't this a big ad hominem response to Thiel's politics?

Obligatory (because I don't care to defend things that people like to assume): I don't like Trump and didn't vote for him partly because of the stuff that's in the news now.

<comment><USER5> In certain circles, New Zealand citizenship is seen as a rich survivalist's hedge against the collapse of American society [1]. Especially given that he's gotten this citizenship and is not intending to live there (and doesn't even travel there often enough to go through his naturalization ceremony in- country), that is the most likely motivation. And given that this is just after Thiel so enthusiastically helped Trump get elected, it's easy to see this as voter's remorse, even though Thiel started this process long before Trump was running (in fact, even before _Obama_ was running in 2008).

[1] [http://www.newyorker.com/magazine/2017/01/30/doomsday- prep-f...](http://www.newyorker.com/magazine/2017/01/30/doomsday-prep-for-the- super-rich)

<comment><USER4> So Thiel supported Trump and isn't a jingoist, at least not a traditional one. I guess that's interesting but not front page material for a thoughtful community.

It's clearly a response to his thoughts on the recent immigration order. But it's a long-form logical fallacy.

<comment><USER6> Thiel made the mistake of taking Trump seriously when he should have been taking him literally.

<comment><USER7> Mmmm... I think thiel knew exactly what he was getting with trump. Let's not make excuses for the guy

<comment><USER6> I meant it as a half-joking inverse of Thiel's claim pre-election that the media takes Trump literally but not seriously [1]. It's very clear now that much of what Trump said was literal.

[1] [https://www.washingtonpost.com/blogs/erik- wemple/wp/2016/10/...](https://www.washingtonpost.com/blogs/erik- wemple/wp/2016/10/31/peter-thiels-media-critique-reporters-take-trumps- statements-literally-but-not-seriously/)

</comment></comment></comment></comment></comment></comment><comment><USER8> Even after reading the attached letter from Peter, it's not clear to me as to 'why New Zealand'.

Sure... friendly people, environment, business friendly gov, familiar culture, opportunity to contribute to startup community etc. Makes sense. But other Commonwealth countries could check those boxes too -- especially Canada -- that one would expect to be far more convenient and accessible.

Even the obvious not-spoken reason -- the isolation of New Zealand and its ability to act as a haven in case of global calamity -- could find analogues in Canada's vast wilderness for a man of his means. Actually, he might already have a landing strip and bunker somewhere next to a freshwater spring in the Canadian shield (Canada has 1/5th of the world's freshwater).

That said, Canada is locked in orbit with the US; so perhaps part of his rationale is ability to escape the US sphere of influence if needed too. Canada is also less ethnically homogenous than NZ, which some people may think will matter in a doomsday scenario. New Zealand also has much higher population density... one could imagine that mix of density and isolation being important when trying to rebuild civilization.

<comment><USER9> NZ is ethnically homogeneous? Maybe in the South Island. Wikipedia claims 69℅ European overall which doesn't sound that high to me.

<comment><USER8> Good point. Canada is <60% European descent - but still not as big of a gap as I thought. Canada's big cities tend to be very multicultural -- Toronto, Vancouver, Montreal -- which maybe skews my perception a bit.

</comment></comment></comment><comment><USER10> This guy is like the villain of a Silicon Valley TV show in real life.

<comment><USER11> IIRC they've basically admitted Peter Gregory's hatred of college and general zen weirdness is based on Thiel.

<comment><USER12> Likewise, Gavin's comments on persecution of billionaires were based on real billionaire comments:

[http://www.telegraph.co.uk/news/worldnews/northamerica/usa/1...](http://www.telegraph.co.uk/news/worldnews/northamerica/usa/10598265/Silicon- Valley-billionaire-compares-treatment-of-Americas-rich-to-Nazi-persecution-of- Jews.html)

</comment></comment></comment><comment><USER13> Multiple citizenships are a hedge against local instability. Having one is putting all your eggs in one basket. If all you have is US citizenship and an lets say hypothetically an orange totalitarian takes over, you're kinda stuck. You've got no legal right to live anywhere else. Another citizenship(s) affords that to you.

New Zealand is a good bet because they're (1) remote, (2) English speaking, (3) very well developed and (4) has an extremely well functioning government with among the lowest perception of corruption (5) and widely-accepted travel documents.

Particularly as a notable or wealthy individual, another citizenship can make a lot of sense.

<comment><USER14> And people say techies are disconnected from reality. I mean, where did that come from amiright.

<comment><USER13> I mean, feel free to explain why. It's more interesting to have a conversation.

</comment></comment></comment><comment><USER15> Not sure what the point is in getting angry about what billionaires do. It's hardly like they will change their decision-making based on what HN/Reddit et al. think about them. Focus on improving yourself.

<comment><USER16> They might not change their decision-making, but since they're quite influential — including having influence on governments — it's useful to know what they're up to and whether their public pronouncements match their private behavior.

</comment></comment><comment><USER17> New Zealand is the future, and Peter Thiel will make sure of that by giving us Trump. It all makes sense, now.

</comment><comment><USER18> New Zealand is a beautiful place, but it's also rather boring and small, remote and inaccessible unless you own a car for local transit and can afford plenty of plane tickets for your larger travels.

I would disagree and say that the future of the worlds environment probably looks like the opposite of New Zealand, but I'll hand it to him, the New Zealand economy does look a lot like the future of the USA in my opinion if Trump continues down his path hurting innovating industries by favouring traditional factory work: irrelevant.

As a VC Thiel is used to people saying what it takes to get what they want. I am pretty sure he's just going through the motions, much like most people who come to him asking for money in exchange for an idea that will "change the world" are doing.

<comment><USER19> Mountains, glaciers, hot springs, huge forests, beaches, wineries, rugby, meat pies.

Yeah, it's a real snooze-fest.

<comment><USER18> Like i said, beautiful, but if you like city life (large variety of places to eat, touring shows/bands to see, things other than bars being open past 6pm etc) it's certainly going to get real boring real quick.

</comment></comment></comment><comment><USER20> Can't you just picture this guy getting pulled off his chopper by zombies as he tries to flee to New Zealand? :)

</comment><comment><USER21> With the way things are going with Trump he might be right. Ironic that he's helping Trump.

</comment><comment><USER22> Seems very consistent. Thinks US isn't great, gets backup citizenship, finds another/more direct way to make USA great again. Also consistent with his involvement in sea steading. Would make sense for him to renounce NZ now.

I don't quite get why the snarky "make NZ great again" remark was needed in the article (isn't the NYT supposed to be a reliable news source?) however I like that it was reported because I didn't know about this. I think multi- citizenship is a strange concept but I'm all for competition among countries for citizens.

</comment><comment><USER23> So he's not actually going to be living in New Zealand ... I'd have to wonder, aside from the generous donations noted in the article what's in it for them? Will he be paying tax? Presumably he'll still have to pay tax wherever he's domiciled (California) but is there some rub here he (and NZ) could be taking advantage of?

</comment><comment><USER24> Tldr: New Zealand is corrupt and Peter Thiel bought citizenship without ever living there.

There is no mention of his helping revive the Trump campaign and how you should think "Peter Thiel" and his investments every time an executive action oppresses someone during this administration...so let's not go there.

<comment><USER25> They gave him citizenship after he invested $7m and gave $1m to charity there. That's not really corrupt - in most countries you can move there through investing. Corrupt is when you give an envelope of cash to an official. NZ actually ranks joint #1 least corrupt country in the world with Denmark. USA is #18. [http://www.transparency.org/news/feature/corruption_percepti...](http://www.transparency.org/news/feature/corruption_perceptions_index_2016)

<comment><USER13> Generally you stop at permanent residency (US EB-5, for instance) and can't really buy citizenship. Notable exception of course being Malta as a path to EU citizenship (pretty cheap, actually, some 650,000EUR [1]

[1] [http://csbgroup.com/relocation/citizenship/malta- individual-...](http://csbgroup.com/relocation/citizenship/malta-individual- investor-programme-iip/)

</comment></comment></comment><comment><USER26> To understand Thiel, I think you have to look at how he is a dark inversion of his philosophical mentor, Rene Girard.

Girard's primary thesis is that human desires are imitative, but we refuse to acknowledge this through a repeated, romantic lie about how our desires for an "object" are authentic vs. being rooted in imitation of another. This dissonance leads to periodic eruptions of violence that are themselves too imitative and escalatory, and which are only resolved through redirecting the violence onto a scapegoat:

"If two individuals desire the same thing, there will soon be a third, then a fourth. This process quickly snowballs. Since from the beginning desire is aroused by the other (and not by the object) the object is soon forgotten and the mimetic conflict transforms into a general antagonism. At this stage of the crisis the antagonists will no longer imitate each other's desires for an object, but each other's antagonism. They wanted to share the same object, but now they want to destroy the same enemy. So, a paroxysm of violence would tend to focus on an arbitrary victim and a unanimous antipathy would, mimetically, grow against him. The brutal elimination of the victim would reduce the appetite for violence that possessed everyone a moment before, and leaves the group suddenly appeased and calm. The victim lies before the group, appearing simultaneously as the origin of the crisis and as the one responsible for this miracle of renewed peace. He becomes sacred, that is to say the bearer of the prodigious power of defusing the crisis and bringing peace back."

Girard's solution to this problem is a kind of atheistic Christianity. It's essentially incumbent on each person acknowledge the truth of these structures in human society, The innocence and subsequent false deification of scapegoats (relative to the origin of mimetic violence), and walk away from them by modeling themselves after the example of Jesus' disciples.

What I think Thiel instead calculated using this philosophy is that scapegoats are the true origin of political and economic power in all forms. Since humans want to believe the romantic lie about the sincerity of their desires, they'll willingly accept false idols and their promise of transcendence through human sacrifice. Allying yourself with a political movement based on these principles is a path to wealth and power.

By the way, this is Girard's definition of Satanism.

[https://en.wikipedia.org/wiki/Ren%C3%A9_Girard](https://en.wikipedia.org/wiki/Ren%C3%A9_Girard)

</comment><comment><USER27> "We have to treat our country's citizenship like an asset"

Meanwhile:

"How dare the US have different immigration laws than us"

</comment><comment><USER28> In a WW3 scenario China might conquer Aus & NZ. Why not Patagonia?

</comment><comment> andy-x All billionaires are filthy scum and must be deported to wherever their other citizenship is and never allowed to return to US

</comment><comment><USER29> I know that HN comments are supposed to be informative and meaningful, but honestly "LOL" is all I can think of at the moment.

</comment><comment><USER30> Disappointing the hackernews comments are turning into the exact same thing I've been avoiding at arstechnica, engadget, and gizmodo. A lot of rage, very little substance.

<comment><USER31> I hear you, yet I believe the substance is still there. The technical details are still very strong around here. My SO tries to read this site to understand me and is flummoxed by 98% of the content :)

Part of the questions in a hacker/entrepreneur's life or at least expert developers, are concepts like, "how to interface with civic society." As "wizards," we have a lot of power, and using it wisely and responsibly is an important way to sustain our power and create the harmonious world we all want.

In hacker form, we're seeing a number of approaches, such as aiding the ACLU (YC), isolating oneself (Thiel), try experiments (UBI). This isn't going to be the place with clear, obvious, simplistic answers. We're independent hackers and we are _experimental_ and it helps us and the world to discuss results and tactics in gentleperson fashion.

THAT SAID :) I acknowledge your plaint about how quickly many stir to rage. Emotions need to be leveraged carefully. Allowing (and inducing) emotional states to cloud unnecessarily can be highly counterproductive to progress. I see this on nearly all sides of the discussions. I hesitate to say circumstances have warranted it, because I agree we all need to keep our heads on tight and dig deep into the facts, listen to one another and find that common ground.

In the W era, there was lots of talk about bipartisanship, crossing the aisles and also technocratic methods to achieve unity and comprehension of civic process. I know technocracy is not primary, but I would love to focus some attention toward that as a stepping stone for national harmony. Even those websites that turn your zip code into your representatives communication are a great step in the right direction. Let's keep it up.

</comment></comment><comment><USER32> And the witch-hunt continues.

<comment><USER33> Yeah, poor Peter Thiel. It's a real shame that people have opinions on his actions.

</comment></comment><comment><USER34> According to the article, he was granted citizenship there in 2011, long before Trump was serious about becoming president. There's enough fucked up shit going on right now; it delegitimizes all that stuff by saying he's using New Zealand to escape Trump.</comment>


Kinect vs. PlayStation Move vs. Wii: Motion-Control Showdown - <AUTHOR> http://www.pcmag.com/article2/0,2817,2372244,00.asp <comment><USER2> I worked as an actual games reviewer a few years ago, before leaving to focus my spare time on becoming a novelist. Game reviewing was rather thankless work (but that is rather off topic for now).

Wii: The Wii Controller allows us great control whilst allowing us the full control of still having access to all our regular keys and analog sticks, giving us the familiarity and allowing a wide range of actions to be controlled.

Move: I'm a mature adult male and I would feel more comfortable waving an oversized dildo about in a downtown high street than playing a game with a luminescent ball on a stick. Beyond that, the Move limits the user immensely by requiring them to set aside their actual controller. The advantage is that you can use two controllers, which doesn't give any advantage over the Wii in motion control but allows both to be tracked by the Eye. The disadvantage is that a game requiring 2 controllers means only 2 players.

Kinect: This is the most technologically advanced of the three and also one- ups the other two by using voice recognition software. The processing is only partially on the 360. Furthermore it allows for the motion-control and voice recognition to be used in combination with a controller. Simply the voice recognition could be very useful in lots of games, especially in RPG's like Mass Effect or Dragon Age to allow switching of weapon sets without requiring menu access, and I'm sure developers will come up with my ingenious ideas than just that.

In 3rd place is Move mostly for the crappy design but also cause of the restricted playability; 2nd place is Wii, mostly because the potential has still yet to be tapped by developers, but the controller is rather cumbersome when games inevitably end up being your standard analog stick and trigger affair. 1st place is Kinect, because at worst you still have a usable controller whilst playing. At best you have motion tracking, voice recognition and a controller. Providing either the motion tracking or the voice recognition get well used, it's still going to be kicking the other two's asses in terms of changing the market.

However, as always time will tell. Kinect may not live up to any of its potential, but right now it stands to go much further than the other two in revolutionizing gameplay. Move right now shows me nothing new, but is far worse design and implementation than the Wii or Kinect.

<comment><USER3> tl;dr: most accurate system is last because it looks silly. least accurate system is the best because it uses the "most advanced technology".

<comment><USER2> Actually the Move has poor accuracy over distance. This is similar to when the Wii complains "move closer to the screen" when you're only 20ft away and the cursor starts jumping around.

I fail to see how the Kinect is the 'least accurate' when it can actively track peoples fingers. All other systems are tracking one object, whilst the Kinect can track each individual finger on two people's hands - meaning 20 distinct objects.

The advantage of the Kinect is that I'll actually be able to use it in my living room without having to stand in the middle of the room because it's allegedly accurate over 50ft not the pathetic upper limit of ~20ft with the Wii (I've heard similar distance limits for the Move).

</comment></comment></comment><comment><USER4> I am quite surprised to see the final Kinect depth-sensing technology utilized two camera. The company Microsoft acquired (if I remembered correctly) is known as maker of cheap 3D depth-sensing camera which itself is a very interesting piece of technology (from what I understand, the technology uses an active camera which emit infra-red and detect it at the same time, thus, you can construct depth information from the structured infra-red reflection). I am interested to know what obstacle they have encountered with that technology.

<comment><USER5> I think the Kinect depth-sensing just uses one camera. But I think they use the RGB camera for facial recognition, to get textures (to texture map your image over your 3D body), and to do some additional disambiguation.

But for the depth-sensing, I _think_ they just use the one sensor.

<comment><USER4> Yes, you are right, after a closer look at the image: <http://guide- images.ifixit.net/igi/eORRRALtniStOpl3.huge>

I think that it confused me because the camera we use in lab have IR projector embedded in the camera already.</comment></comment></comment>


Scientists Find Gut Bacteria in the Human Brain - <AUTHOR> http://nautil.us/issue/66/clockwork/are-there-bacteria-in-your-brain <comment><USER2> _I've studied schizophrenia for virtually my whole professional career. I do that by looking at synaptic differences and pathology that might be present in schizophrenic post-mortem brains. Over the years I would see these unknown objects, and disregard them. Then I had an undergraduate student who was part of an honors program here at the University of Alabama, Courtney Walker. She was studying the substantia nigra, which is a region of the brain that contains dopamine neurons. She kept seeing these objects—we called them "those things"—and kept poking at the problem. It started to become a lab obsession._

Many aspiring scientists view their lack of experience as a problem to be solved.

But as this case shows, inexperience can be an asset. Not being entirely convinced of what's impossible is a critical component of making discoveries. The longer you're in a field, the harder it is to maintain skepticism about the impossible.

<comment><USER3> Feynman summed this up as "Disregard" [https://stepsandleaps.wordpress.com/2017/10/17/feynmans- brea...](https://stepsandleaps.wordpress.com/2017/10/17/feynmans-breakthrough- disregard-others/)

</comment></comment><comment><USER4> Different article in different publication about the same topic, discussed here 22 days ago:

[https://news.ycombinator.com/item?id=18431850](https://news.ycombinator.com/item?id=18431850)

</comment><comment><USER5> Found article at this URL. [http://nautil.us/issue/66/clockworknbsp/are-there- bacteria-i...](http://nautil.us/issue/66/clockworknbsp/are-there-bacteria-in- your-brain)

Her mention of the lack of a mechanism for how microbiome influences the brain is, I think, sufficient reason to keep this germinal fact in mind.

</comment><comment><USER6> My bet is on this being contamination still...</comment>


PID Without a PhD (2016) [pdf] - <AUTHOR> http://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pdf <comment><USER2> Fortunately, basic PID analysis, including linear state-space representation and practical tuning methods (e.g. Ziegler-Nichols[1]), is taught in pretty much any first EE control theory course at the undergraduate level.

[1] [https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method](https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method)

<comment><USER3> Not only that... Classic controls (including PID, Routh-Hurwitz, root-locus, etc) are NOT taught in many graduate PhD controls programs!

<comment><USER4> Are those topics no longer relevant to today's state of the art research?

<comment><USER5> It's possible that you're just expected to know them at that point.

<comment><USER6> Agreed. Many state of the art control strategies nowadays are based on optimization techniques (e.g. Model Predictive Control, MPC, optimizes a convex cost function of the state, setpoint and input to your system over a certain time horizon). This has become a viable control strategy for fast (>1kHz) processes only in the past 15 years, since the optimization can be computationally intensive.

</comment></comment></comment></comment></comment><comment><USER7> There was an "aha" moment for me when I realized that PID loop only works well for linear systems (and sometimes it's not obvious if a system is linear or not).

Real world example: imagine you have a single-axis motion stage driven by electric motor and you want to control position of a carriage. Usually your control output is motor voltage. Motor voltage approximately translates to current through motor windings, which in turn approximately translates to torque exerted by motor. Torque exerts a force (T = F * r) on carriage. Applying force to the carriage makes it accelerate (F = m * a). Acceleration linearly increases the carriage velocity (v = v0 + a * t). Carriage having some velocity finally causes the position change (s = v0 * t + a * t^2).

In the essence, the system turns out to be non-linear with the respect to parameter you are controlling.

To improve this system, one solution is to add velocity sensor (or differentiate the position sensor, if it's resolution is high enough) and introduce a cascading PID loop topology- the outer loop takes position error and outputs velocity error, which is fed to inner loop (input = velocity error, output = acceleration). The coefficients for the loops have to be tuned starting from innermost loop.

Another solution is to use different control algorithm which is suited for non-linear systems (e.g. LQR).

<comment><AUTHOR> We actually ended up using this when writing a controller for a quadcopter[1]. Essentially, we have one PID controller operate on the absolute angle (error = desired angle - actual angle). The output of this controller is fed into the second controller as the desired rate of rotation (RoR) (error = desired RoR - actual RoR). The output of the second controller is finally fed to the motors.

Apart from being easier to tune, I just found a good article[2] for why this approach works better for problems such as this. For quadcopters, of course, this allows one to easily switch between rate/acro mode and angle mode.

[1] [https://github.com/ThePinkScareCrow/TheScareCrow/blob/master...](https://github.com/ThePinkScareCrow/TheScareCrow/blob/master/controls.cpp#L284-L285) [2] [https://www.controleng.com/single-article/fundamentals-of- ca...](https://www.controleng.com/single-article/fundamentals-of-cascade- control/bcedad6518aec409f583ba6bc9b72854.html)

<comment><USER7> This is also the approach PX4/Ardupilot folks use. It's actually even more elaborate in their case: position loop -> velocity loop -> acceleration/angle loop -> angular rate loop -> motor outputs.

</comment></comment></comment><comment><USER8> Just going to throw my 2-cents in - I should note that my knowledge of PID is very limited.

The first time I encountered an explanation of how PID worked that made sense to me, was via the Udacity CS373 course that I took in 2012 (Thrun also had a great explanation on how a Kalman filter worked as well). This explanation of PID was repeated when I took the Udacity Self-Driving Car Engineer Nanodegree (starting in 2016).

In the CS373 course, Thrun detailed a few different ways to tune a PID controller - but one way he covered was rather curious in how it worked. It wasn't perfect, but it got you "close enough". I'm not sure if it would work well for a "real system" but for the purpose of learning it seemed to work well enough.

He called it "twiddle" \- I don't know if he was the original author of it, or what - but here's a video that describes how it is implemented and how it works:

[https://www.youtube.com/watch?v=2uQ2BSzDvXs](https://www.youtube.com/watch?v=2uQ2BSzDvXs)

It's actually pretty neat - and the concept can be applied to virtually any algorithm in which you are trying to minimize an error amount.

<comment><USER9> Twiddle, AKA coordinate ascent, definitely works in practice. It's basically the same process a human uses to tune PID parameters, cyclically tune one parameter at a time until you're performance is good enough. It's closely related to gradient ascent and suffers from the same problems, namely that it can get trapped in a local minimum, but it's easy to implement and does a good job if you start with an ok guess at the parameters.

</comment></comment><comment><USER10> I am a little suprised that the author does not use a low-pass filter for the D part, for example 1/(1+s Tf) and instead tells you to modify the hardware.

Sure, you need cut off the noise with hardware in respect to your Nyquist frequence but you can still have a lot of high frequency noise. And it is not always possible to use hardware filters to get rid of the noise, for example if your are tracking an object with a camera and the x,y is your input to the pid. Ofcourse you can skip the D part.

What am I missing here?

I also find it more easy to use a reset based integrator anti-windup, where you specify your limits on your control signal instead of limiting the integrator.

Here is an diagram of what I usally do:

              +</comment><comment>--+           +</comment><comment>+
       -y     |    1   |           |      |
     </comment><comment>-->+ </comment><comment> +</comment><comment>---->+ Kd*s +----+
              | 1+s*Tf |           |      |    |
              |        |           +</comment><comment>+    v
              +</comment><comment>--+   +----+            +-+-+       +</comment><comment>-+
       e=r-y               |    |            |   |       |    __ |      u
     </comment><comment>--+</comment><comment></comment><comment>>+ Kp +</comment><comment>----->+ ∑ +---+-->+ __/   +---+--->
             |             |    |            |   |   |   |       |   |
             |             +----+            +-+-+   |   +</comment><comment>-+   |
             |                                 ^     |               |
             |   +----+   +---+    +-----+     |     |     +---+     |
             |   |    |   |   |    |  1  |     |     |   - |   | +   |
             +-->+ Ki +-->+ ∑ +--->+  -  +-----+     +---->+ ∑ +<----+
                 |    |   |   |    |  s  |                 |   |
                 +----+   +-+-+    +-----+                 +-+-+
                            ^                                |
                            |                                |
                            |      +----+                    |
                            |      |    |                    |
                            +</comment><comment>+ kt +<</comment><comment></comment><comment></comment><comment>-+
                                   |    |
                                   +----+

The kt gain will reduce the integrator when we have saturated output.

Does some one knows the pros and coins with the different anti-windup solutions?

<comment><USER11> I always do integrator wind-up similar to how you do it -- apply limits to the overall controller output (which are typically necessary for the system anyway), and use that to limit the integrator. Just putting limits on the integrator is too crude, and it's not like it's any easier to program. Maybe the author introduced that because it's easier for a beginner to understand.

However, I typically do not change the state of the integrator the way you are doing here. I just hold the integrator state (i.e. don't update it) if the controller is limited. That way, noise on the P or D signals doesn't cause my integrator state to hop around. I may do it your way if the controller limits are changing over time for some reason.

I also always low-pass filter the D term, as you mentioned. Otherwise, the D term is just too noisy.

I often find that my P and D terms are limited by how much sensor noise I'm willing to let thru to my controller output.

</comment></comment><comment><USER12> 'Feedback systems: an introduction for scientists and engineers' is another nice reference [1]. I used it and another Wescott text to put together effectively a somewhat extended version of the OP's code [2].

[1] [http://www.cds.caltech.edu/~murray/amwiki/index.php/Main_Pag...](http://www.cds.caltech.edu/~murray/amwiki/index.php/Main_Page)

[2] [https://github.com/RhysU/helm](https://github.com/RhysU/helm)

</comment><comment><USER13> Or you can use my PID simulator, where you can play with the constants in a simulated car to reach different speeds, it updates the output graph instantly

[http://codinglab.blogspot.be/2016/04/online-pdi- trainer.html](http://codinglab.blogspot.be/2016/04/online-pdi-trainer.html)

<comment><USER14> Great, thanks!

</comment></comment><comment><USER15> My SW eng program did not even hint at these. Is there a good edX or coursera course that goes through more extensive material than the pdf? I'm also curious what tools are used by professionals? Matlab, simulink???

<comment><USER16> Not sure if this is allowed but I created a Udemy course on PID control where I go through the theory and then in the assignments you write Python code to create a PID controller for an elevator (with the goal of moving the elevator to the desired height). A PID controller can be written in less than 10 lines of code but understanding the different components is very important for tuning it and getting it to work. If your interested just go to Udemy and search PID Control, you'll find it.

If you'd like a discount code (not worth the full price if your a SW eng) DM me on Twitter as I'm not sure I'm allowed to post it here.

When I did my MSc I did all my PID controllers in MATLAB/Simulink but since the actual code for a PID controller is very simple, it's easy to implement in Python or C++.

<comment><USER15> Looks interesting .. as a SW Eng, I find Udemy very useful for these hw courses. Thanks for the pointer!

</comment></comment></comment><comment><USER17> So here's an awfully uninformed question that will probably get me laughed at by actual engineers (as in, not 'software engineers' like myself - and yes Canadians please bite your tongues, I've heard your shpiel by now): when you have a more powerful computer to work with, isn't it much easier to just derive some regression parameters and call it a day?

My use case: I have this home-build growhouse that I use to start my seedlings in at the end of winter (and as a fermentation chamber for wine). It's controlled by a Raspberry Pi and as inputs I have 4 groups of LED grow lights, a 30w heating element, a fan that draws warm air out of the box and thus brings the temperature within the box towards ambient temperature, and DHT22 sensors that measure temperature and humidity inside and outside the box. The goal is to keep temperature as close to a certain target temperature as possible, keeping in mind that I want the lights to be on for a certain nr of hours per day and the lights give off so much heat that they will pretty much always make the temperature go over the target (so the fan then needs to bring it down again). It's easy to get this working the naive way with an hysteresis of say +/\- 2 degrees (which is fine for my purposes), but the nerd inside me sees it as a game to make that band smaller. So I've been reading up on PID controllers and dear baby jesus I can't even work out how I'd get started. So the pragmatic part of my brain goes 'just run it for a few weeks with incremental inputs between 15 and 35 degrees (C, of course), measure the responses, toss all measurements into R and derive some regression parameters'.

Does anyone do this in industry? Probably not because everywhere I've asked, everybody's who's ever done real work on this uses PID controllers - but is that because they're easier to build on microprocessors (i.e., need less number crunching)?

<comment><USER14> There will almost always be external influences that change the behaviour over time. If you have a vehicle, going up the hill will require more energy to keep the speed constant. For your growhouse, if it's hot outside of the box it may requires less heating, etc. Or the LEDs that you use get less efficient over time. You really want to have a dynamic algorithm such as PID that can deal with these changes in a near optimal fashion.

</comment></comment><comment><AUTHOR> There's also this[1] series of blog posts by Brett Beauregard that speaks of a few improvements for real-world implementations.

[1]: [http://brettbeauregard.com/blog/2011/04/improving-the- beginn...](http://brettbeauregard.com/blog/2011/04/improving-the-beginners- pid-introduction/)

<comment><USER18> That gets you through 90% of real world control problems. Filtering the derivative input gives you another 5% for some noisy processes. The other 5% require somebody who knows a bit more.

</comment></comment><comment><USER4> what I have been searching for years is not theories or tutorials about PID, but a detailed explanation on how to tune a digital controller(instead of a continuous one) in a easy-to-setup environment, whether it be simulation or a cheap hardware. I know examples can include inverted pendulum(IP), double IP, mountain cart, heater with thermometer feedback, line-follower, etc, but where can I easily play around with these examples?

<comment><USER19> I found this video useful: [https://youtu.be/uXnDwojRb1g](https://youtu.be/uXnDwojRb1g)

</comment></comment><comment><USER20> Wish my highschool FRC robotics team had this when we naively attempted to control elevator levels with a PID.

<comment><USER21> I also remember tuning PID values on the old Jaguar motor controllers. It was not a pleasant or particularly fruitful experience.

</comment></comment><comment><USER22> The matlab system identification toolbox is nice to get a casual feel for the systems. Note that pid controllers are mostly used due to their computational rather than control performance. They are math equivalent for linear systems, but thats like saying x=inv(A)b is just as good...

The powerful idea is the linear system model or the stochastic linear system model. Understand them and the properties of recursive filters and pid will come naturally.

</comment><comment><USER23> It's so sad. I studies this stuff in depth for almost 1 year in college... And now after 2 years of working as a software dev I forgot almost everything.

<comment><USER24> I wouldn't worry about it. In your career, you're going to forget a ton of stuff (if you're not repeating the same project over and over again). That's just how it works.

The win is that someday you will end up needing either the stuff you learned or the math that you used, and you'll find out it's way easier (and more illuminating) learning it the second time around.

</comment></comment><comment><USER25> 509'd. Does anyone have the PDF for it? Google cache seems to just render the document, not give me the PDF (I like to download and read offline, from time to time).

</comment><comment><USER26> He stresses regularly spaced sampling. I don't see why high-precision timestamps wouldn't work just as well, though that would complicate the computation of the I and D signals.

Actually, throughout he doesn't seem to acknowledge the different units between the P, the I, and the D, instead implicitly treating the whole system as discrete time for many purposes, in e.g. the recommendations for 100:1 ratios between P, and I; and D and P.

<comment><USER27> Regarding equal spacing: the sample rate determines a part of the system latency, and therefore performance and stability limitations. Eliminatating the stability of sample rate eliminates the decades of work basic controls analysis relies on. Or said another way, slow your sample rate and pay with your phase margin. Not to say it's impossible to deal with (small) changes in sample rate, but in a text where he is already wildly simplifying things, this sounds like the wrong place to innovate.

</comment></comment><comment><USER28> Does anyone here have experience with Fliess iPID controllers?[0] The papers indicate they are superior, Fliess is a generally respected academic, but the math seems the same with slightly different terminology....

[0] [https://hal-polytechnique.archives- ouvertes.fr/inria-0037232...](https://hal-polytechnique.archives- ouvertes.fr/inria-00372325/document)

</comment><comment><USER29> This is a great short overview, and timely for the First Robotics Competition season.

I took a course on this in college, and while that course mentioned the notion of sampling the D signal directly from feedback instead of from error, it never laid out why. This guide's practical explanation of why one might want to do that is great.

</comment><comment><USER30> Mirror: [https://web.archive.org/web/20170721121215/http://www.wescot...](https://web.archive.org/web/20170721121215/http://www.wescottdesign.com:80/articles/pid/pidWithoutAPhd.pdf)

</comment><comment><USER13> My sousvide controller uses a PID to regulate the temperature super precisely.

[https://github.com/aguaviva/SousVide](https://github.com/aguaviva/SousVide)

</comment><comment> the-dude I have been doing a (integer) PID without a PhD over the last years as well : meCoffee ( [https://mecoffee.nl](https://mecoffee.nl) ) for espresso machines.

<comment><USER31> I just bought an espresso machine, and it's crazy that something as simple as a PID controller justifies a several hundred dollar markup on some models. The processing power needed is miniscule...!

<comment> the-dude True. And if your machine does not have a pressostat, it makes a _huge_ difference.

<comment><USER31> Does the optional dimming of the boiler make a difference in your design? Mine just fully turns on and off all the time, and I reckon dimming would probably be easier on the power grid. 2000W on/off vs ~80W average (I measured) is quite the difference.

<comment><USER32> I am using SSR with zero crossing and it makes much difference.

First, I am dithering the boiler power (the power is applied to the boiler on only some AC cycles), I am basically deciding per cycle whether I want my boiler turned on for the next 1/100th or 1/120th of the second. I am already running my model about 50 times per second (not using PID) so that's ok.

Being able to apply fractional power to the boiler means it is quiet and much less scale deposits.

Also due to the zero-crossing control I have much less electrical noise. Turning the boiler fully-on blindly causes electrical noise which is not nice for other devices (my Baratza Sette grinder turns on spontaneusly when this happens).

</comment></comment></comment></comment></comment><comment><USER14> Is a machine learning algorithm capable of getting better results than a PID? Is the extra effort worth it?

<comment><USER10> How do you mean with "better result"?

For a non-linear system, machine learning can perform much better and solve more complex tasks. Like walking for a humanoid robot. A linearzied PID solution can not beat that.

For linear systems:

Depends of what you mean with better I guess. My understanding is that you can place some of the poles of a system with a PID pretty much where you want. So for a simple linear system: no.

There exist also other controllers where a LQR can be used in linear systems to get a perfect theoritical controller based upon to minimize the cost of control outputs. (yes, several outputs).

However maybe a ML can be used to choose and tune the controllers better than humans?

EDIT: Also, the discretication is not always perfect (backward or forward euler is common estimates). So maybe ML can help in that too?

<comment><USER33> > For a non-linear system, machine learning can perform much better and solve > more complex tasks. Like walking for a humanoid robot. A linearzied PID > solution can not beat that.

Right but you are comparing a nonlinear regression model with a linear control scheme, which isn't really fair. Plenty of nonlinear control strategies exist and are used in practice for things like humanoid walking. Moreover, many people prefer these controllers due to the theoretical guarantees they provide over a learned control policy.

That said, ML does have a place in control theory, and you can find papers going back to at last the 90s (I never looked earlier but they probably exist) that combine the two, and not just in a reinforcement learning context.

> However maybe a ML can be used to choose and tune the controllers better > than humans?

Probably not, assuming you are discussing linear systems. You would need to come up with some cost function for your ML algorithm to determine the performance of a particular control policy, but then why not just use that as the objective function for your optimal control algorithm?

</comment></comment></comment><comment><USER34> What's the reason he insists on using double precision math? (If not using fixed point)

<comment><USER35> Keeping things simple, if the input data SNR is, say, 16 bits, and the PID coefficients are 16 bits, then there is 32 bits of significand at the output of the control gain multipliers. For single precision float, this is truncated to 23 bits. So, the system may settle when the transducer input is near zero (and the exponent can scale down to maintain sufficient precision), but then fail to settle well at the ends of the transducer range (where the transducer input is near +/-2^15 and the exponent in the single needs to stay high to avoid saturation). Also, consider the numerical integrator is running an infinite series of adds, so therein lies a trap for error growth, as well.

I have made this mistake before, and the sometimes strange control behavior can be frustrating. Considering the small performance penalty for using doubles on modern hardware, it is excellent advice.

<comment><USER34> Thanks for the explanation! I have only hardware with no FPU (teensy 3.2) or single precision FPU(teensy 3.5)... I suppose in that case it would be better to write a fixed point implementation?

<comment><USER27> Fixed point often works better, as it has better resolution because it doesn't need the exponent. The flip side is that the range of a fixed point is very limited (because it doesn't have the exponent). Practically, that means you need to do some analysis to make sure don't overflow or saturate, and use the bulk of your fixed point range to get the resolution benefits. If you do that, fixed point is great.

If you don't have time or knowledge to do that, floating point works better because you can be more ham-fisted with your scaling and still not overflow or saturate.

<comment><USER34> I have the choice between using a slower processor (96 MHz) without an FPU or a faster one(120MHz) with a 32 bit FPU. I might use the slower one but with a fixed-point implementation. Thanks for your tips!

</comment></comment></comment></comment></comment><comment><USER36> This reminds me of my Achilles heel during undergrad. Kalman filters.

No matter how much I read about the topic, I just could not grok it. The whole "state update" algorithm and sheer amount of different variables threw me off. Does anyone else feel the same way?

<comment><USER37> The book "Probabilistic Robotics" explains the Kalman filter really well by putting it in the larger context as a Bayesian filter. I understood it only after reading that book

<comment><USER18> I haven't read that book, but seeing it as a Bayesian filter made it click for me. All the control theory guys who just handwaved with "it's basically a stochastic Luenberger observer" didn't capture the essence of the filter for me. With a strong statistics background it was much better to go from Bayesian first principles to the Kalman filter.</comment></comment></comment>


No, The iPad 2 Will Not Revolutionize Education - <AUTHOR> http://www.hackeducation.com/2011/03/05/no-the-ipad-2-will-not-revolutionize-education/ <comment><USER2> The only things the iPad2 will be revolutionizing are things safely inside Steve Job's Reality Distortion Field.</comment>


Enterprise customers Versus Startup customers - <AUTHOR> http://blog.cloudagent.in/2013/01/enterprise-customers-vs-startup.html

<comment><AUTHOR> Just some of our observations in our journey so far. It would be great if we get more pointers in the comments here.</comment>


Bill Gates: 'We Need an Energy Miracle' - <AUTHOR> http://www.theatlantic.com/magazine/archive/2015/11/we-need-an-energy-miracle/407881/?single_page=true <comment><USER2> Excellent excerpt:

 _They have this statement that the cost of solar photovoltaic is the same as hydrocarbon's. And that's one of those misleadingly meaningless statements.

What they mean is that at noon in Arizona, the cost of that kilowatt-hour is the same as a hydrocarbon kilowatt-hour. But it doesn't come at night, it doesn't come after the sun hasn't shone, so the fact that in that one moment you reach parity, so what?

The reading public, when they see things like that, they underestimate how hard this thing is. So false solutions like divestment or "Oh, it's easy to do" hurt our ability to fix the problems. Distinguishing a real solution from a false solution is actually very complicated._

I really wish there was more nuance in the discussion about energy at this level. Folks rarely consider the entire system when evaluating energy sources, costs, consumption-side infrastructure, etc. The only way to move forward is to consider all these problems at once.

Unfortunately, this is hard, and difficult to put in a headline. Witness: this great interview is called "We Need an Energy Miracle".

Might I propose another: "Energy Infrastructure is Hard."

<comment><USER3> I though Gates made a few bloopers, and the one you quote is one of them.

Solar power filling in the daytime energy peaks in places like Arizona is the low hanging fruit, something we can achieve with today's technology and even today's politics (mostly). It marks the point where, even without externalities priced correctly and fossil fuel subsidies not yet removed, where clean energy can get a foothold in the market and be installed even by people who do not care about climate change, just saving money. And it therefore supercharges the positive feedback loop where more solar deployed makes the next panel cheaper.

Gates describes a world where people are complacent about this being an easy problem to solve, I see a world where powerful vested interests push the line of "fuck it, its too late to do anything anyway, and solar is a communist scam that doesn't work anyway".

He makes the same mistake about EV cars, undermining people's enthusiasm because in many US states the power comes from coal. I assume anyone that brings that up and doesn't immediately say "of course the solution is to shut the coal stations, even just shifting to natural gas, never mind a mix of solar/wind/hydro/nuclear/gas, is a big improvement" is part of the problem, not the solution. I'll have to hope Gates was poorly quoted here as its such a poi tless gotcha.

He also mangles the negative pricing thing, which he should be celebrating as a valid price signal to encourage more flexible fossil fuel plants, storage and demand management.

All in all, I'm pretty disappointed, it feels like he's been reading some biased sources and not seen through their spin. Which, considering he clearly understands there's a problem here that needs solved, is a great shame.

<comment><USER2> Lots of stuff here, and thanks for the engagement! I'm going to take these paragraph-by-paragraph for clarity:

1) I think Gates' point was that what works for Arizona midday doesn't necessarily work for Pennsylvania or Washington. While the math might pencil out in the ideal case, he's concerned that the focus will leave R&D in more efficient solar before we get a universally cost-efficient solution for photovoltaic. I think he'd agree with you that the goal is to have people motivated to go solar for selfish reasons (to save money). I think he'd disagree with you that you can price based on removing existing subsidies and market bias towards fossil fuels, since those subsidies are in place and the externalities aren't yet priced.

3) Problem is, we can't just shut down the coal stations without eating an enormous cost in terms of lost power production. For most energy planners, the goal is to let existing (massively expensive) infrastructure age-out and transition to renewable/carbon-neutral infrastructure on the new installation side. Otherwise the costs are untenable.

4) While negative pricing should incentivize investments in storage, I think Gates is looking at the imbalance in the incentives that led Germany to that point. A negative price indicates that there was over investment in infrastructure, and they're still stuck with the coal plants for base load. Similar to my comment on #3, you can't just shut off existing coal/oil/natural gas without hitting someone with the bill. Making that the taxpayer's problem is not going to go over well, and the companies are going to lose tons of money if their investments in those plants can't pay off over their 30-60 year projected lifespan.

</comment></comment></comment><comment><USER4> It's not necessary to exclude the possibility of a Carbon tax, but it's certainly not the only, or most likely to be tenable, solution. Gates' own Creative Capitalism probably offers a better path towards zero emissions.

<comment><USER3> Gates, and basically all economists, argument is that without correctly pricing externalities, capitalism (creative or otherwise) not only doesn't help, it actively makes things worse, as people can make fortunes by digging up and burning the fossil fuels that will wreck the global climate.

Those incentives need to be realigned, and almost certainly will at some point, though probably much later than someone who believes in the power of market forces would like. The initial work will mostly be done via central planning and government regulation.

It's even possible, like the VW scandal has reverberations in consumer confidence in their brand, that global warming has the potential to discredit capitalism in the eyes of the public, if a carbon tax doesn't get introduced soon enough to see capitalism as part of the solution and not just the problem.

<comment><USER4> I think you're right; market forces, left alone, are unlikely to realign incentives within a desirable time-frame. This seems to explain Gates' stance.

However, the creative capitalist would argue that rather than penalizing fossil fuel companies (via Carbon tax), governments would do better to reward innovators via more 'green tax credits' and like financial incentives. You get the same* overall impact, just with less political push-back and more R&D, driven BY capitalism.

And by the way, Gates invented "Creative Capitalism" ([https://www.fpsct.org/uploaded/faculty/johnsonc/U_S_History/...](https://www.fpsct.org/uploaded/faculty/johnsonc/U_S_History/Unit_5/Gospel_and_Gates.pdf)).

</comment></comment></comment><comment><USER5> He should just talk with Tony stark, after all he did build it in a cave with a bunch of scraps.</comment>


Most Interesting [Scientific] News of 2015 - <AUTHOR> http://edge.org/contributors/what-do-you-consider-the-most-interesting-recent-scientific-news-what-makes-it <comment><USER2> [https://news.ycombinator.com/item?id=10822268](https://news.ycombinator.com/item?id=10822268)</comment>