Active Stabilization Rocket System - Page 1
Forum section: electronics / projects

author: coldreactor
author_rank: Contributor
timestamp: September 12, 2016, 01:58:15 am
content: Hey, I am Jeremy Hall. I am a 17Yo student and for the past few years I have been studying and working on a project that I thought you may enjoy. I am close to finishing my Rocket Stabilization System, in other words is a system that I am using to keep a small rocket flying in a straight line by use of moving parts of the fins. I have learned a lot about embedded design and programming throughout and would like to see your comments on my work. All my updates are posted onhttps://hackaday.io/project/9540-active-stabilized-rocket-systemas well as Githubhttps://github.com/coldreactor64/Rocket-Stabilization(FYI: The current abort code is very,verybuggy and is in no way finished. I spent most of my day today debugging that and updated code should be out tomorrow or the day after)I would like to know what you think and ways I could improve it.I would be glad to answer any questions you have.

author: Tomorokoshi
author_rank: Super Contributor
timestamp: September 12, 2016, 02:06:39 am
content: This may be interesting reading:https://ntrs.nasa.gov/search.jsp?Ntx=mode%20matchall&Ntk=All&N=0&Ntt=19660019462https://ntrs.nasa.gov/search.jsp?Ntx=mode%20matchall&Ntk=All&N=0&Ntt=19660019469

author: coldreactor
author_rank: Contributor
timestamp: September 12, 2016, 02:09:48 am
content: Quote from: Tomorokoshi on September 12, 2016, 02:06:39 amYup, I will be definitely reading them. Thanks for the links

author: ataradov
author_rank: Super Contributor
timestamp: September 12, 2016, 02:29:43 am
content: You may also want to study the legal part of this. If I'm not mistaken, FAA has some problems with active control systems on model rockets.EDIT: This may only apply to ground controlled systems, I'm not sure. And I can't find the place I read about this right now, it was a long time ago.

author: coldreactor
author_rank: Contributor
timestamp: September 12, 2016, 02:39:00 am
content: Quote from: ataradov on September 12, 2016, 02:29:43 amOh I have studied the legality of this type of system. It is completely dead reckoned, meaning no targeting or positioning system which makes it near perfectly legal to fly. I just will have to get FAA clearance for it anyways since I live near an small airport. I also plan on releasing documents for safety of ths systems, and have implemented an abort system which will make sure that the rocket can not go past 50 degrees in any direction so bystanders will be safe. (Plus I will be doing remote ignition and we will be standing further back than necessary) I take safety and legality as a number one.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: September 12, 2016, 02:53:42 am
content: In a quick read through of your code I didn't see any reference to some key items in rocket stabilization. Rockets have a pitch natural frequency, which is basically the rate it oscillates about the pitch (or yaw since most rockets are symetric in roll) axis when disturbed. It is determined by the mass distribution of the rocket along the length (which changes as the rocket motor burns) and by the aerodynamic restoring forces, which are a function of rocket speed and fin size and placement. You want your controls to be faster than this frequency. Small servos of the type you reference are not very fast with small signal frequency response typically well under 10 Hz. Your Arduino software loop should be much faster, but may or may not be fast enough to stabilize your rocket.If you haven't already gone through this it would be well worth your time. You may have to put some constraints on the design of the rocket stabilized.

author: coldreactor
author_rank: Contributor
timestamp: September 12, 2016, 02:59:04 am
content: Quote from: CatalinaWOW on September 12, 2016, 02:53:42 amHuh, gives me something to research. I don't know about this, but I will look into it and see if my designs need any changes.

author: DaJMasta
author_rank: Super Contributor
timestamp: September 12, 2016, 03:45:55 am
content: I'm certainly no expert in rocket control systems, but if you need faster reaction times, there are some options before you go to entirely new actuators. Digital servos typically support faster command rates (though they have to be driven a little differently, depending on the servo) and running them at higher voltage will speed up mechanical response times (often listed in the spec sheets they'll have a time to 60 degrees and usually if they list 4.5V and 6V, the 6V drive will be notably faster).You'll also want your control software to be refreshing those commands as fast as the servo can take them, so running some tests to see lag time to different stimulus or logging main loop times in test operation can give you an idea of performance. It shouldn't be too hard to get good loop performance on average, but remember if even one cycle hits a snag and has to wait for a timeout or something - that's a dead area in terms of control, which you most certainly will run into problems from with enough tests.I don't know what your plans are for a test vehicle once you're confident in the design and implementation, but if I were you, I'd try to find a rocket that was already well stabilized (and that would stay stable on its own in a launch with everything in place but not actively controlled), and turn it on and see if the rocket can still fly straight. Starting with a design that's not terribly stable would make the debugging work early on much more of a pain - and it's usually motivating to see some success, even if in a very controlled way. It's probably even worth limiting the movement of your control surfaces (or even their size) in early implementations so that if it starts doing something strange, it's less likely to be catastrophic.Anyways, it's a neat project, good luck!

author: jh15
author_rank: Frequent Contributor
timestamp: September 12, 2016, 03:55:37 am
content: Be cool to put some self destruct charges on it for a Range Safety Officer hobbyist.

author: ataradov
author_rank: Super Contributor
timestamp: September 12, 2016, 03:59:36 am
content: Quote from: jh15 on September 12, 2016, 03:55:37 amThat is most definitely illegal.But you are typically required to put safe recovery system (parachute) on big rockets anyway.

author: ez24
author_rank: Super Contributor
timestamp: September 12, 2016, 05:13:20 am
content: Quote from: ataradov on September 12, 2016, 03:59:36 amYou are no fun

author: coldreactor
author_rank: Contributor
timestamp: September 12, 2016, 09:09:41 am
content: Quote from: DaJMasta on September 12, 2016, 03:45:55 amThanks! When I run more tests I will be sure to put in some code to tell me the response time in ms of the system. I will take all of your suggestions into consideration. Thanks for the advice. I appreciate it.

author: MagicSmoker
author_rank: Super Contributor
timestamp: September 12, 2016, 11:31:57 am
content: Quote from: ez24 on September 12, 2016, 05:13:20 amLOL... I was thinking the same thing.Cool project, OP - this should be quite the learning experience in control systems theory and practice.

author: BradC
author_rank: Super Contributor
timestamp: September 12, 2016, 11:52:17 am
content: Quote from: MagicSmoker on September 12, 2016, 11:31:57 amIt's not often you can honestly say "it really is rocket science". Great project.

author: KerryW
author_rank: Regular Contributor
timestamp: September 12, 2016, 02:39:53 pm
content: Guided missiles typically have a small hole in the nose to sense "Ram orifice pressure" and use that measurement to adjust the control parameters. The theory being that the higher the speed and the higher the barometric pressure, the less the control surfaces need to turn to alter the course of the missile. This may or may not be something you want to bother with.

author: jh15
author_rank: Frequent Contributor
timestamp: September 13, 2016, 02:56:02 am
content: Don't give clues to the N. Koreans.

author: Skimask
author_rank: Super Contributor
timestamp: September 13, 2016, 03:12:15 am
content: Quote from: KerryW on September 12, 2016, 02:39:53 pmA.K.A.https://en.m.wikipedia.org/wiki/Pitot_tube

author: jh15
author_rank: Frequent Contributor
timestamp: September 13, 2016, 03:28:58 am
content: you are no fun either.

author: dmills
author_rank: Super Contributor
timestamp: September 13, 2016, 03:31:43 am
content: Didn't the US actually publish a 6 or so DOF code some years back, cannot remember which agency did it.Attitude control should be fair game I would have thought, and there have been several vehicles flown with (Typically) gimballed solid motors but I have seen the fin thing done too (Doesn't really work until flow across the fins comes up unlike gimballing the motor).Regards, Dan.

author: DaJMasta
author_rank: Super Contributor
timestamp: September 13, 2016, 03:35:54 am
content: I swear, detective, that was an ejection charge not a bomb!People remember that stupid show and tell clock "bomb scare" right? It's certainly worth erring on the side of caution unless you have at least a few dozen acres of land and few neighbors

author: jh15
author_rank: Frequent Contributor
timestamp: September 13, 2016, 03:53:10 am
content: I have a gimbaled 400hz gyroscope missile I think (disavow all knowledge) junk box gyro. If I power it up with my Phase Linear (brand) amp, I can drive blocks away to a friends house and have it precess on their table for minutes.Oh! OH! Just thought of something, since it contains rotating rocket science parts, send your turntable to me, and I will make a spec sheet or your unit vs a real bearing. Give me the latest decked out tesla s, and I will compare your AR model 78 turntable rumble, flow and wutter, on up to my (undisclosed, need to know) missile gyro. I think my missle gyro instrutions, has anti-skating, but it is in North Korean.

author: Srbel
author_rank: Frequent Contributor
timestamp: September 13, 2016, 05:52:44 am
content: If it can be modified into a guidance system, my Korean partners would be interested.

author: jh15
author_rank: Frequent Contributor
timestamp: September 14, 2016, 05:14:45 am
content: Srbel, PM me, code word: ZOTS. Burn this letter

author: ConKbot
author_rank: Super Contributor
timestamp: September 14, 2016, 01:04:46 pm
content: Quote from: DaJMasta on September 13, 2016, 03:35:54 amforget the clock.https://en.m.wikipedia.org/wiki/2007_Boston_Mooninite_panic

author: rstofer
author_rank: Super Contributor
timestamp: September 14, 2016, 03:41:41 pm
content: A couple of completely off-topic thoughts:When I do a #define, I want the expression within parenthesis:#define GyroMeasError PI * (40.0f / 180.0f) // gyroscope measurement error in rads/s (shown as 3 deg/s)I would change this to:#define GyroMeasError ( PI * (40.0f / 180.0f) )There are conditions under which this will become important! Not exactly on point but here's a discussion of what happens when the macro has parameters:http://stackoverflow.com/questions/25511056/why-do-i-need-to-parenthesize-x-and-y-in-this-defineSecond, those floating point expressions, like the one for yaw, are going to take a very long time on an Arduino. I would toggle an LED at the top of the loop() function and see how long each iteration takes using a scope. There will be variations, of course, but I'm thinking that the loop time will be pretty grim.Then I would dump the Arduino and use a high speed ARM chip that has a floating point unit like one of the STM32F4xx devices. I would do a little research to prove to myself that the compiler/linker are actually using the FPU. Yes, this will move you out of the Arduino IDE and the huge code base. But canned library functions aren't your biggest problem, it's the math!This book is a work-in-progress (literally) but it is very thorough:https://leanpub.com/mastering-stm32As I said, completely off-topic...

author: CatalinaWOW
author_rank: Super Contributor
timestamp: September 14, 2016, 05:43:25 pm
content: Quote from: rstofer on September 14, 2016, 03:41:41 pmNot really off topic. Speed of the control loop will be important in a generalized rocket stabilizer. Strangely, more important for off the shelf model rocket designs since higher natural stability usually means higher aerodynamic restoring forces which in turn tends to increase pitch natural frequency.

author: rstofer
author_rank: Super Contributor
timestamp: September 14, 2016, 07:36:51 pm
content: Try to balance an upright pencil in the palm of your hand. I don't believe it is possible.Then make the system more unstable by putting a mass of clay at the tip of the pencil and all of a sudden, it's trivial!More than I wanted to know about guidance systems:http://cnqzu.com/library/Anarchy%20Folder/Rocketry/Missiles%20and%20Warheads/Missile%20Guidance%20&%20Control%20Systems.pdfIf I thought I could derive the differential equations for the small rocket, I would tend toward an analog computer. Among other things, every calculation happens in real time. There is no loop delay waiting on floating point! This would probably require real servos, not RC types unless there could be a fast voltage to PWM converter. I wonder if that could be done with an Op Amp?

author: CatalinaWOW
author_rank: Super Contributor
timestamp: September 14, 2016, 10:40:09 pm
content: Quote from: rstofer on September 14, 2016, 07:36:51 pmPerfect example. Your hand has a bandwidth (on the order of a couple of Hz). Adding the clay reduces the pitch frequency of the pencil (slows the system) until it is lower than your control bandwidth.For the OP, part of what you need to do is to define what you mean by active stabilization, what your goals are. As mentioned earlier, doing guidance will get you lots of attention you don't need. But there are things that are OK, and some that at least are arguably OK. Do you want to control roll angle or roll rate? Those should be OK, and there are good reasons you might want to do one or both of these (controlling roll angle can let you point an on board camera in a desired direction. Controlling roll rate can compensate for misalignment of the rocket motor, rocket body or fins. Limiting peak roll rate can prevent centripetal acceleration problems with on board sensors and parachute recovery systems). Do you want to control pitch damping? Also should be OK. (Active control here might allow smaller tail area and thus less drag.) Do you want to fly rockets that aren't aerodynamically stable? Might be OK, but there are safety questions here. What happens if your control system fails? (Again could reduce drag for higher altitude). Maybe you want to correct for wind drift, keeping the rocket inside a safety zone. This might be OK, but is certainly in a gray area.Each of these options places different demands on the control system. Success requires that you understand these requirements and design the system accordingly. Factors will include the servos, the fins, the mass distribution of the airframe, the sensors, the velocity profile, the launch and flight altitudes and a few other things. Plenty to keep you interested for a long time.MIL-HDBK-1211 will tell you a lot about control of missile airframes, and a lot of other things that you won't be allowed to play with legally.