
Makani source code released - johmathe
https://github.com/google/makani
======
jlgaddis
From [https://x.company/projects/makani/](https://x.company/projects/makani/):

> _In 2020 Makani’s journey as a company came to an end [0]. To share the
> lessons and insights the Makani team gained from their 13 year journey
> developing an entirely new kind of wind energy technology, the team created
> The Energy Kite Collection, a portfolio of resources including a technical
> report, Makani’s entire avionics, flight controls and simulation code
> repositories [1], flight logs [2] for every crosswind flight of the M600
> prototype, technical videos [3], a new simulation tool called KiteFAST [4]
> created with the National Renewable Energy Laboratory, and a non-assertion
> pledge [5] for the free use of Makani’s worldwide patent portfolio._

I just wanna say that this -- all of it, the entire paragraph! -- is
absolutely amazing (well, except for the end of the company, of course).

\---

[0]: [https://blog.x.company/a-long-and-windy-
road-f8e09d02c9e1](https://blog.x.company/a-long-and-windy-road-f8e09d02c9e1)

[1]: [https://github.com/google/makani](https://github.com/google/makani)

[2]:
[https://console.cloud.google.com/marketplace/product/bigquer...](https://console.cloud.google.com/marketplace/product/bigquery-
public-datasets/makani-logs)

[3]:
[https://www.youtube.com/playlist?list=PL7og_3Jqea4VRCZmMNK4L...](https://www.youtube.com/playlist?list=PL7og_3Jqea4VRCZmMNK4LDH64sYgkLZzv)

[4]:
[https://github.com/rafmudaf/openfast/tree/kitefast](https://github.com/rafmudaf/openfast/tree/kitefast)

[5]:
[https://storage.googleapis.com/x-prod.appspot.com/files/Maka...](https://storage.googleapis.com/x-prod.appspot.com/files/Makani%20Non-
Assertion%20Pledge.pdf)

~~~
cloudwalking
X is what Google used to be.

~~~
nikitaga
X is still X and Google is still Google.

Outside of X, Google was never known for crazy moonshots. Google was always an
ad platform with a search engine.

~~~
bayindirh
X was Google X, now it's Alphabet X. Google was Google, now it's Alphabet
Google.

Google was the name of the search engine and the company. Now the company name
has changed, everything is restructured and Google is an ad platform with a
search engine.

"X Development LLC. is an American semi-secret research and development
facility and organization founded by Google in January 2010, which now
operates as a subsidiary of Alphabet Inc. X has its headquarters about a mile
and a half from Alphabet's corporate headquarters, the Googleplex, in Mountain
View, California."[0]

[0]:
[https://en.wikipedia.org/wiki/X_(company)](https://en.wikipedia.org/wiki/X_\(company\))

~~~
nikitaga
"X is what Google used to be." didn't strike me as a comment about the
paperwork of corporate restructuring, but rather a comment on how Google isn't
doing interesting things anymore. And I don't think anything changed in that
regard. They just pulled non-core businesses such as X into Alphabet Inc. That
doesn't mean that what X is doing used to be more important to Google than it
is to Alphabet now, it's just paperwork.

~~~
bayindirh
> Google isn't doing interesting things anymore.

I think they've founded X because Google's interesting ideas got too big for a
single department, so they spun it off.

We don't know how many smaller X inventions get into Google ecosystem. I'm
sure that some of that research got integrated back into their data centers or
networking hardware, etc.

------
bruckie
There's also (quite surprisingly!) a feature-length film that talks about
Makani's work over the last 13 years:
[https://www.youtube.com/watch?v=qd_hEja6bzE](https://www.youtube.com/watch?v=qd_hEja6bzE)

~~~
DetroitThrow
Beautiful documentary, thanks for sharing.

~~~
nikodunk
Amazing stuff. Just made my Saturday night.

------
someonehere
All of their assets were liquidated in their Alameda location. I bought some
power tools from the auction went to pick it up and saw this really long wing
span in a hangar. I asked the people with the liquidators what it was and they
told me it was used for power. Then I remembered reading about this company in
Wired many years ago and felt it would be something cool. Well I own some
power tools they used to use so that’s as close to having their history with
me.

~~~
ComputerGuru
How do you find out about these auctions, generally speaking?

~~~
karlding
There's websites for disposition of company assets when they go under. The
Makani auction was advertised on the Silicon Valley Disposition website [0]
for a while.

[0] [https://svdisposition.com/](https://svdisposition.com/)

~~~
gundmc
This site is fascinating, thanks!

------
purpleidea
I guess this means that this project is dead or not viable for some reason,
and they're being nice and releasing their work. Good job Google!

As an aside, it should be law to release any firmware, code, and backend
services code for any device that is no longer fully supported by the
manufacturer.

Let other people play with your dead things and reduce the barrier for new
innovation on top of them.

~~~
UncleOxidant
Google stopped funding Makani several months back.

I'm not sure how applicable most of this code will be for other kite power
companies. The Makani "kite" turbine was 2000 lbs. It definitely required
Google-level funding to develop which is now gone. None of the remaining kite
power companies that I'm aware of have the kind of significant funding
required to develop this - ours ran out of money late last year.

~~~
tobinfricke
> The Makani "kite" turbine was 2000 lbs.

Essentially the same code could run Makani's smaller machine, the 20 kilowatt
"Wing 7", with a 7.8 meter wingspan and a mass of 60 kg. Many of the existing
kite power companies are working on machines of this scale.

But we did have the luxury to design and build the system from the ground up,
whereas scrappier startups might have to cobble together existing components.
Hopefully they will be able to utilize some of the materials we've just
released.

~~~
londons_explore
So what's to stop me cobbling together something like the Wing 7 and just
leaving it unattended in a field to launch and generate whenever the wind
conditions are suitable?

If I did, and I got typical government subsidies for wind power, I might earn
$10k/year. That ought to pay for all the machines parts if I buy everything
hobby grade from AliExpress. The 2nd year is pure profit assuming the craft
lasts that long.

So that leads me to suspect the key issue is the various control algorithms
can't be made reliable enough to run for years and years without crashing
under any combination of gusts and wind conditions. Am I along the right lines
of the issues?

~~~
krisoft
The FAA (or your local alternative) might want to check your paperwork and
licensing too.

~~~
londons_explore
While it stays tethered to the ground, I don't believe the FAA would be
interested? Am I mistaken?

~~~
tobinfricke
Makani engaged early with FAA and we had a great working relationship. This
enabled us to move out of China Lake (where we were using the military's
restricted airspace, which didn't require FAA approval) and out into the
public airspace in Hawaii. We did several test flights in close collaboration
with FAA observers, developing a color scheme for the tether and a lighting
system for the kite and ground station that were deemed adequately
conspicuous. We also held a round-table with local pilots to get their input.
Ultimately we operated under a "determination of no hazard" that classified
the Makani system as an obstruction, something like a large radio tower.

Our COO gave a talk on the FAA approval process at the Airborne Wind Energy
Conference (AWEC) a few years ago:
[https://repository.tudelft.nl/islandora/object/uuid:ea8256a2...](https://repository.tudelft.nl/islandora/object/uuid:ea8256a2-2c52-402e-a72f-fd60b0794c6b/datastream/OBJ/download)

------
meekrohprocess
Neat! If I'm reading the repository right, it looks like the avionics firmware
ran on a TMS570 Cortex-R microcontroller made by TI:

[https://processors.wiki.ti.com/index.php/Category:TMS570](https://processors.wiki.ti.com/index.php/Category:TMS570)

I'm pleasantly surprised to see that instead of a big Cortex-A or x86/64 chip.
It's cool to read well-funded code for a small realtime SoC.

you don't see them too often outside of things like memory controllers and
safety-critical products, but Cortex-R chips can have some cool features like
ECC memories and mirrored CPUs:

[https://developer.arm.com/ip-
products/processors/cortex-r/co...](https://developer.arm.com/ip-
products/processors/cortex-r/cortex-r5)

Apparently the next generation Cortex-R82s will also have 64-bit options with
an MMU, which should make it easy to run a "real" OS.

Too bad that the company didn't work out, but it was nice of them to publish
this stuff.

~~~
elromulous
Not entirely true. The actual autopilot (the controller + estimator) runs on
an imx6. The tms570 are the sensor / actuator nodes.

Edit: just to add some detail. The autopilot and aio (avionics io, i.e. the
tmd570s) communicate over a ring ethernet topology.

~~~
meekrohprocess
Oh, that makes sense. It did seem like a lot for such a small processor to
handle.

Still, that sounds even cooler; a reference for how to set up a local network
of MCUs controlled by a big processor? Awesome.

~~~
sjburt
This topology is very common. Hard real-time sensor nodes feeding softer real-
time big iron that does the estimation and control.

------
elromulous
Former Makanite, and current abc employee here. Happy to answer questions.

~~~
sleavey
What sort of control methodologies were you using for the autopilot? Classic
linear negative feedback or more modern techniques? How much of the autopilot
problem was novel? Could you use existing designs from other aircraft or do
these tend to be kept secret?

~~~
tobinfricke
The top-level autopilot used a nonlinear path controller, which produced
position, attitude, and rate commands for an inner-loop controller that used
linear feedback and gains computed using LQR and a linearized model of the
system.

Because the maneuver the kite must fly is very dynamic (always turning, but
not at constant rates), control with feedback alone would lead to pretty
sloppy flight, since feedback requires an error to develop before the system
can respond to it. Good feed-forward was crucial to flying well; from the
desired flight path, wind speed/direction, and desired aerodynamic quantities
(airspeed, angle of attack, and angle of sideslip), we could compute the
required rates and feed-forward actuator displacements needed to execute the
trajectory.

For more details, check out my paper titled "The Makani Autopilot: A Critical
Retrospective", available here:
[https://storage.googleapis.com/x-prod.appspot.com/files/Maka...](https://storage.googleapis.com/x-prod.appspot.com/files/Makani_TheEnergyKiteReport_Part1.pdf)

------
TaylorAlexander
I ran the code and took some screenshots of the really nice web UI. Simple and
inspiring since I've been working on a robot web UI recently. Here's some
screenshots of the Makani interface:
[https://imgur.com/gallery/NMjBJSY](https://imgur.com/gallery/NMjBJSY)

~~~
tobinfricke
Awesome! You might be the first outside of Makani to run the code. :-) I'm
glad you were able to get it up and running. Please let us know if you have
any questions or run into any trouble.

~~~
TaylorAlexander
Hah cool! Yeah I was hoping the simulator was a 3D sim environment I could use
with my off road robot, but it was actually still really helpful even though
it wasn’t that. I have been making a robot web UI and all your graphs and
debug data give me ideas on more data I want to pipe up to the UI, and some
improvements I can make to allow automatic UI elements from certain data
structures. :)

Here’s one of my robots: [https://reboot.love/t/new-cameras-on-
rover/](https://reboot.love/t/new-cameras-on-rover/)

~~~
tobinfricke
That rover is super cool - good work!

We were just beginning to experiment with computer vision to augment/replace
GPS at the time we were shut down.

~~~
TaylorAlexander
Thank you! You can certainly get a lot done with RTK, but computer vision is a
big fun technical whale.

------
UncleOxidant
It's cool that they open sourced this, but as someone who worked at a kite
power company (a much smaller company with a much smaller kite) I'm not sure
much here will be transferable to other companies. Makani was making a huge
2000 lb "kite" turbine. That requires the kind of money that Google could back
them with - and since Google isn't funding this anymore I just don't see where
this can go as none of the remaining kite power companies have much funding
(ours ran out of money late last year).

~~~
tobinfricke
While our code might be too specialized to help out other crosswind kite power
companies in particular, I think the technical document might be quite
impactful:

[https://storage.googleapis.com/x-prod.appspot.com/files/Maka...](https://storage.googleapis.com/x-prod.appspot.com/files/Makani_TheEnergyKiteReport_Part1.pdf)

The chapter "Airborne Wind Turbine Performance" contains some sobering lessons
for the field and deserves a close read.

~~~
tinco
Thank you so much for that document it's so interesting. Interesting lesson
from the exec summary: The real world kite underperformed the model by nearly
half, and from the numericals it seems like the main reasons we're that the
turning radius was about double that what you were trying to get, and that the
tether drag was a significant loss that was not accounted for. The next gen
model would be the same span but with a larger area and with a shorter tether,
the turning radius would be a lot smaller and it would effectively halve the
drag and increase performance by 30% but it would still underperform the
initial model by about 20%.

The general big conclusion as I get it is that because of these losses even
though the kites are capable of getting more wind per kite, when area is
constrained a conventional turbine seems to have better density.

The idea that the kites have lower installation cost offshore does seem
interesting to me, but I only skimmed it so maybe that's offset by something
else.

~~~
yourapostasy
_> ...tether drag was a significant loss that was not accounted for..._

I wonder if some of the losses to tether drag could be made up for by re-
purposing some of the wave energy tech to capture energy from the base of the
tether as the kite pulls and slackens on the base, or if the tether could be
made rigid on demand with some tech in the future.

~~~
ntucker86
There isn't a large amount of energy stored in the tether catenary or
elasticity. Any hardware to recoup it probably wouldn't pay for itself.

Offshore, there can be a lot of energy stored in buoy motion, and utilizing
this can help, but probably in a resonant way that doesn't require additional
hardware.

"Rigid" is a relative term. The tether already utilized a carbon fiber core.
It doesn't get much stiffer, short of going to exotic fibers or more of them,
both of which degrade performance in other ways.

The optimum is going to be closer to a strength limited tether than an overly
stiff one.

------
jefftk
Blog post from February when Alphabet withdrew funding:
[https://blog.x.company/a-long-and-windy-
road-f8e09d02c9e1](https://blog.x.company/a-long-and-windy-road-f8e09d02c9e1)

(Disclosure: I work for Google)

~~~
jlam
To be accurate, partner Shell choose not to re-up its investment after exactly
one year, from 2019 Feb 12 to 2020 Feb 18 as indicated in the blog post you
linked (actually
[https://link.medium.com/KBxNNZGcK9](https://link.medium.com/KBxNNZGcK9) since
your link didn’t work for me). It seems unfair to blame Alphabet solely, or
even Larry, as one comment below did.

------
msoad
Why this failed? I would love to learn more if anyone has more insider
knowledge

~~~
brandmeyer
The tether replaces one set of problems with a different set of problems. Some
of the new problems had promising solutions, but others were more marginal.

1) Land use. The small props are loud, and the setbacks relative to populated
areas are pretty high for tether and crash safety. Solution: offshore. Now you
have two problems :)

2) The tether's weight is a factor. Its _hard_ to build in much margin on this
component before it gets too heavy to fly. What happens if a gust temporarily
reduces tension on the tether? Can it handle a shock load from the kite hits
the end again if it comes off its sphere? How many conductors can you run down
the tether? IIRC, they were running DC+ and DC-... with no ground. Now, what
exactly happens during lightning strike? At the time they believed that they
were just barely on the "feasible" side for this component on a feasible-
infeasible axis, but it was pretty darned close.

3) The power system was complex. Tether weight biases you strongly towards a
medium voltage power system (a few kV pole-to-pole) to cut down on the weight
of the conductors. However, the size of the turbine was smaller than any
medium voltage application I had ever heard of. Maybe the ground side could be
COTS, but the flight side almost certainly couldn't. So now you are also in
the business of building bespoke medium-voltage switching power converters and
motor/generators. There's nothing fundamentally infeasable about this, its
just a bunch of hard work that detracts somewhat from the main mission. A
startup would much rather buy this tech, but they were forced to build it
instead.

I mention the power system explicitly because that's particularly in my
bailiwick, but I think it was really a microcosm of the project as a whole.
They were building an airplane for the purpose of energy production. So they
had to solve all of the problems that an airplane company has to solve. Also,
since electricity is so cheap, you can't afford to pay human operators for all
of the generators, so you also must solve many of the problems that an
_autonomous_ airplane company has to solve. In salty air to boot.

Overall, there's just a staggering amount of NRE that must be spent chasing a
market that is already commoditized. 50 USD/MW-hr is a typical benchmark for
wholesale electricity. Meanwhile, solar panels are iterating and getting
cheaper and traditional wind turbines are iterating and getting cheaper.
Eventually, the bean-counters start to notice.

There's an alternative explanation: Makani (and Wing, and Titan, and the
robotics initiative, and other things) were initiated when Larry was still
young and excited about the technology itself. We used to morbidly joke that
Ruth Porat (hired CFO) was going around the company asking questions like,
"Airplanes, Larry? Really?" (taps clipboard, raises eyebrow). Eventually the
long years of almost-but-not-quite-success wore them down past the point of
endurance, and the projects started dying off when the leadership got bored of
them.

IMO, both explanations are likely to be true.

~~~
UncleOxidant
Having worked in the industry a bit, yes, likely both are true. There are very
complex engineering problems to solve and Makani was taking one of the more
complicated approaches to the problem. Some other kite power companies
(including the one I worked at) have the generator on the ground and use an
ascending figure 8 pattern of flight to pull the tether thus generating power
(at the top of the cycle the kite goes into a sort of controlled stall to lose
altitude, the tether is rewound and the cycle continues) - that approach
certainly has issues as well.

I often think that maybe most of us were taking a much more complicated
approach than is actually needed. Perhaps (thinking out loud) something much
simpler like a soft kite with a sort of trap-door which closes as it ascends
and opens to let it fall to a lower altitude would be a much simpler approach
- essentially a bag kite with an end that can be opened and closed - obviously
it would be smaller scale, but most of the kite power companies are working at
a much smaller scale than Makani was.

------
rubicon33
Incredibly ambitious project. I watched the whole documentary.

I'm surprised they were 'unable to secure additional funding'.

Considering how many crackpot app-of-the-month companies have gotten cash
thrown at them over the last decade, you would think a company doing real
engineering would be drowning in money. It's a bummer to hear that they
folded.

Speculation abounds, I suppose, as to why investors started (or kept) saying
"no."

~~~
arbitel
When investors look to invest, they want a fast ROI. Engineering company likes
this typically takes many years to fruition or maybe not. It's much easier to
justify dumping money on these "tech" companies like WeWork, AirBnb hoping to
get another facebook unicorn than putting money into real engineering company
like Makani.

~~~
ubertoop
Personally I find that troubling for the progress of humanity. We need big
money (resources) to solve real challenging engineering problems.

Unfortunately it seems like a lot of the big money is going towards less
critical 'problems' if problems at all, like social media companies.

------
hlandau
Any chance on board schematics, or even just some basic block diagram of the
avionics hardware? It's hard to understand this firmware without having any
idea what it ran on.

~~~
tobinfricke
Ask away and I'll tell you what I can. :-)

You'll find some description here (but no schematics):
[https://storage.googleapis.com/x-prod.appspot.com/files/Maka...](https://storage.googleapis.com/x-prod.appspot.com/files/Makani_TheEnergyKiteReport_Part2.pdf)

~~~
ntucker86
the system overview slides in... part II?

pretty sure there is a top level avionics layout in there.

------
person_of_color
What happened to the Makani refugees at G?

~~~
tobinfricke
Many found new positions in Alphabet/X, and others found new positions at
outside companies. Yet others still are either taking a break or still
looking.

~~~
person_of_color
And you?

~~~
tobinfricke
I had the privilege of being part of the documentation team preparing some of
the materials that were released yesterday (in particular: the code and the
chapter on the autopilot/control system). Now I'm taking a little break but I
hope to start something new around January. Definitely open to ideas. :-)

~~~
person_of_color
[https://observer.com/2019/12/apple-new-satellite-project-
wir...](https://observer.com/2019/12/apple-new-satellite-project-wireless-
service-spacex-starlink/)

------
winrid
Some of the code for the tools is fun to read
[https://github.com/google/makani/blob/c421e4497dd09c86b01725...](https://github.com/google/makani/blob/c421e4497dd09c86b0172521b54b9a7c81cc31c9/analysis/cfd-
tools/cfd_aero_runner/AeroCFDRunner/WindTunnelAnalysis.java)

This is not proper Java, at all. But it's what a lot of Java code looks like
because it's a good choice for inexperienced devs or rushed projects.

~~~
greesil
According to GitHub this project is less than 3% Java. It's mostly C++, C, and
Python

~~~
tobinfricke
That's right; the real-time autopilot is written in C, and the flight
simulator is written in C++. We have a really slick configuration system
written in Python that compiles down to a Python dict and then a C struct at
build time.

Example production C code (the crosswind flight controller):
[https://github.com/google/makani/tree/master/control/crosswi...](https://github.com/google/makani/tree/master/control/crosswind)

Example production C++ code (the "wing" model in the simulator):
[https://github.com/google/makani/blob/master/sim/models/rigi...](https://github.com/google/makani/blob/master/sim/models/rigid_bodies/wing.cc)

------
keizo
I wonder if this could be repurposed to kite sail large cargo ships.

~~~
tobinfricke
That was indeed an application investigated by Makani! I think some companies
are still pursuing this.

~~~
keizo
I wonder why it didn’t go anywhere. But maybe a difficult industry to
interrupt. Google or an org with that kind of money should buy an cargo ship
and just make it happen.

------
fluffy87
What was the back of the envelope calculation that suggested this would work?

~~~
tobinfricke
To be clear: crosswind kite power does work. The question is whether it is
economical or competitive.

The paper that started it all is this one by Miles Loyd from 1980. It's short
enough it could fit on the back of a large envelope. :-)

[http://edge.rit.edu/edge/P15462/public/CAD/crosswind_kite.pd...](http://edge.rit.edu/edge/P15462/public/CAD/crosswind_kite.pdf)

------
dependenttypes
I am waiting for them to release the google earth source.

------
rootsudo
Self Flying Energy Kite Self Flying Energy Drone

Interesting stuff.

------
codecamper
Larry cancelled Makani meanwhile he lands his helicopter on his yacht?

