Landing on the moon with a Propeller and Fuzzy Logic
Hanno
Posts: 1,130
Hi!
Landing gently on the moon is a good application of a fuzzy logic controller. ViewPort, the premier debugging environment for the Propeller, includes an object that implements a fuzzy logic engine which is controlled graphically from within ViewPort. Watch the video to learn about the physics simulation and fuzzy logic controller included in ViewPort's lunar lander tutorial.
4 Minute Video
The code used in this video is tutorial #6 in your ViewPort installation, so go ahead and try it out!
Hanno
ps- More videos are on my website: mydancebot.com/viewport/videos
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
Landing gently on the moon is a good application of a fuzzy logic controller. ViewPort, the premier debugging environment for the Propeller, includes an object that implements a fuzzy logic engine which is controlled graphically from within ViewPort. Watch the video to learn about the physics simulation and fuzzy logic controller included in ViewPort's lunar lander tutorial.
4 Minute Video
The code used in this video is tutorial #6 in your ViewPort installation, so go ahead and try it out!
Hanno
ps- More videos are on my website: mydancebot.com/viewport/videos
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
Comments
I think the computer they used on those old moon missions was really limited.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
The highest i have lonched a rocket so far is about 0.7km so I am no where near breaking orbit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
As they say, it's always the last bit that takes the time to finish LOL
Anyway, back to topic.
Hanno was pointing out his fuzzy logic and it's possible application in a soft moon landing. Certainly the prop would have more power than the computers on the moon lander which would have been designed in the mid 60's. The video is a very interesting application of Viewport - Well done Hanno and sorry for hijacking your thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Post Edited (Cluso99) : 6/7/2009 1:04:00 PM GMT
http://www.doneyles.com/LM/Tales.html
where we read
Assuming one can get a lander in the air with a balloon or other means, a "rocket powered lander" could safely arrive on the ground and "propeller" itself up again to some target. This would be in earth context of course.
Any takers ?· ... Just how crazy are we anyway? [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
- Howard
~~~~~~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No matter how much you push the envelope, it'll still be stationery.
Yes, impressive what people did with computers decades ago. We have it easy now- community, tools, and powerful hardware.
While my video and the demo talk about landing on the moon, the real purpose is to show how simple it is to apply fuzzy logic to some problems.
I'm a big fan of PID's for relatively simple control problems, but getting the constants right for more complex control systems (like the cascading pid controller in the DanceBot) was very difficult and frustrating. With fuzzy logic, I came up with a good solution in less than an hour.
The details can provide information overload, but the basics aren't too bad. Mainly you have to grasp the concept that you're doing calculations in "fuzzy logic space", where a variable has some degree of membership in a small number of classes- 5 in ViewPort. These classes correspond to human terms: very negative, medium negative, 0, medium positive, very positive. You can use this for pretty much anything: temperature (very cold..nice..very hot), speed (fast reverse..stop..fast forward), direction (far left..straight..far right) and so on.
Then, you just map each of the 5 terms to a real world number, and since ViewPort's implementation is symmetric around 0, you just need 2 setpoints, for example, 10 degrees could be a normal right turn, while 60 degrees is a hard right turn- with the negative for left turns.
Do the same for speed, and then you could do something like:
if you're turning hard, set speed to stopped
if you're turning medium, set speed to medium forward
if you're going straight, set speed to fast forward
Fuzzy logic will then handle the details- resulting in a smooth, continuous curve that nicely handles the endpoints. And code is just 4 lines- no if's to test boundaries, no complicated math equations...
Feel free to correct me- I'm not a fuzzy logic expert, but this has worked nicely for me!
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
From there its easy, RIGHT?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
I found the video a little hard to follow, but your explanation here made it so simple to understand.
Now, forget the moon. How about a Voyager III. Voyagers 1 & 2 are at the outer edge of the solar system and still sending data back. The pictures of Saturn, etc were spectacular. The computer is like an Apple I with a tape drive and the camera is Smile. What could we do with a few props, flash and ram, SD and a nice camera, and of course the movable x/y/z axis arm for the camera???
I see 2 problems:
1. Launch (as mctrivia stated)
2. Power source (I believe it is nuclear powered)
Launch - could probably hit a rid on a Nasa spacecraft (the shuttle days are nearly over)
Power - forget nuclear, what with terrorists, we'd never get the stuff :-(
But is sure would be fun to do with a prop and Hannos software.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
There are several people on this forum with high altitude air balloon experience. If we could launch a high powered rocket from high altitudes like 60-80km we could probably get up much cheaper then going with NASA but achieving mach 32 for stable orbit is probably out of the question. escaping all together and heading for the moon very slowly may be more likely but we would have to be very accurate in our calculations as we take a decade to travel to the moon.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Post Edited (mctrivia) : 6/8/2009 3:19:39 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
One of the guys I flew balloons with last weekend is working on a "rockoon" project under NASA funding, and will probably have a launch under his belt in the next year or so. But he's going to launch at about 35 Km, and probably only fly to about 40-45 Km, and maybe 500 mph tops. That's with a high power rocket. That's where you get with really good private funding and several years' worth of experience with high altitude balloons. Here's where you get with ten+ years of serious work:
http://www.jpaerospace.com/
Here's a much more realistic challenge: you can float a balloon at a chosen altitude by controlled release of helium. You can carry a GPS on a balloon, so your balloon knows where it is and what direction it's moving. How about a Prop-based controller that slowly brings a balloon back down to a certain area on the ground? When we flew a week ago, we had jetstream winds carrying us about 40-50 knots towards the east as we moved from about 6500 feet up to about 55,000 feet. Then we drifted slowly to the west/northwest at about 0-10 knots until we reached 94,000 feet. Of course all of that was reversed on the way back down under parachute, and under a still-inflated balloon you might have some control of how long you spent in each wind layer. You wouldn't have anything remotely like precise control, but you might be able to reliably make the recovery trip much shorter, as long as you're willing to have the flight last for (say)·10 hours instead of 2-1/2 hours.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
@all, RE launching:
a friend, who's a member of the planetary society, mentioned a few years ago an idea they proposed to NASA for doing cheap liftoffs. Build a very long - as in miles long - gradually sloping ramp. Put a supercooled, magnetic ' levitation ' track on it. Like the mag-lev trains, only more efficient and powerful - with a one-way ticket. I don't know how well this would really work. He said the calculations showed that it could " throw a VW Bus " into orbit for %5 - %10 of what a shuttle launch costs. (Could the shuttle carry a VW anyway ? [noparse]:)[/noparse]
He then began bemoaning that NASA had rejected the idea in favor of much more expensive and less reusable methods.
Here's my idea, that would be far cheaper than mag-lev's ... just build one of these ... only MUCH bigger:
- Howard in Florida
(A few miles from Cape Canaveral )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No matter how much you push the envelope, it'll still be stationery.
Gravitational force of the earth is equal to:
9.802N/kg at ground level
9.501N/kg at 100km
9.215N/kg at 200km
8.679N/kg at 400km
7.739N/kg at 800km
6.264N/kg at 1,600km
4.346N/kg at 3,200km
2.442N/kg at 6,400km
1.084N/kg at 12,800km
0.390N/kg at 25,600km
0.120N/kg at 51,200km
0.034N/kg at 102,400km
0.009N/kg at 204,800km
0.002N/kg at 409,600km(past the moon)
Lot more then I thought but makes sense since the earth is 6378km thick.
Assumptions:
F=Gmr-2
G=6.6742E-11 m3kg-1s-2
m=5.9742E25 kg
r=6.3781E6 m
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Post Edited (mctrivia) : 6/9/2009 2:44:33 AM GMT
that actually does seem like the hardest part to do...at least when you have some kind of budget...
i'm sure nobody is doing it for the money, but is $30 million realistically even enough to do this?
and there have to be laws about launching a space ship from your back yard...I know they didn't like that Astronaut Farmer guy [noparse]:)[/noparse]
"Solar would just not do that far away from the sun."
I worked on a project where our device had no built in pwr source. It swiped tiny amounts of current
from something else and dumped the electrons into one of those 1farad capacitors and a 2nd smaller capacitor.
The controller was in pico-power sleep mode most of the time but would wake once in a while and use the power in
the large capacitor to send a short but powerful burst of rf data. The source of power was an electrical field
but I have no idea how the power managed to be slowly captured.
The same thing could be done with a very small solar panel and some capacitors? You would be in sleep mode most of the time
but could wake, take a picture, and send it using short data bursts. So maybe you could send out a spacecraft for little $
and still get data back? The deep space network has stations with as much as 90db gain so your rf data burst would not need
to be very powerful. If it was in Earth orbit a milliwatt or so would do and from Mars a watt would be more than enough.
Usually they use the frequencies just above 2.45GHz, that's just above wifi and microwave ovens. The Mars orbiter sent a really
nice image of the Earth from Mars orbit using the high resolution camera, it was sent back at 8GHz with a power of 2 watts if I remember correctly.
Here is that image.
http://i41.tinypic.com/rk7y4i.jpg
E=xr-2
where x is the value to give the aount of power we get at earth when r=1 AU but without that we can still compute percentages.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Post Edited (mctrivia) : 6/9/2009 4:25:36 AM GMT
Holly, I like your concept of "stealing" power from other systems' waste heat.
Freeman Dyson with his STARWISP project used that type of dymaxion thinking.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
Post Edited (James Michael Huselton) : 6/9/2009 4:33:16 AM GMT
"Holly, I like your concept of "stealing" power from other systems' waste heat."
Was not my idea at all. It was the first time I ever heard of making something that
had no power except what it could manage to steal from something else and without
any wire to carry the power....that gizmo could run pretty much forever. It's amazing
how much you can do with such minuscule power when you keep the controller
asleep most of the time and run it at a very low clock rate except when absolutely needed.
it's almost like magic.
Not sure how you would charge a cap without also discharging it though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are now in stock. Only $30. PCB available for $5
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
Post Edited (mctrivia) : 6/9/2009 5:15:47 AM GMT