The Missile construction and tuning guide.
Oct 8, 2018 20:46:20 GMT
apophys, bigbombr, and 9 more like this
Post by smithblack on Oct 8, 2018 20:46:20 GMT
The purpose of this guide is to teach the CoaDE community a few tricks on how to design components for, construct, and tune CoaDE missiles. Missiles are an important part of CoaDE, and arguably one of the most frustrating things to design in the entire game.The task, however, becomes significantly easier when you understand what the various parts of the missile and guidance system do, as well as a major bug to avoid. The purpose of this guide is to provide this information
This guide is current as of CoaDE version 1.2.1
For the impatient, a quick summary of the contents are listed below:
• The engine shut off bug:
• Control tuning: The percentage of delta v expended in the boost stage should depend on what you are targeting.
• Control tuning: damping coefficients
◦
------------------------- The engine shut off bug: why your designs are running out of delta v -----------
Perhaps you have previously tried to design missiles, only to eventually give it up. The problem, you found, was that your missiles would launch, and shortly after launch run out of delta v, no matter what you did to the guidance system. If this has happened to you, you have probably encountered a bug: the engine shut off bug.
If an engine is subject to sufficient jerk or acceleration (it is not clear which), it will refuse to shut off, even when the control module is attempting to force the missile into a phase which lacks an acceleration command. The most common example being a missile continuing to fire despite entering mid course phase. With an engine stuck on, the missile runs out of delta v. To verify this bug is affecting you, you can try forcing midcourse on a missile, and then manual shutting off then turning on the engines; if they stay dark, this bug is the problem.
The bug can be handled a variety of ways. All of them boil down to reducing how much the engine is getting thrown around, and typically increase the turnaround time. The first suggestion I would offer is reduce the gimbal angle. Large gimbal angles in particular seem to greatly amplify the issue, allowing room for the engine bell to be thrown around and preventing it from extinguishing. If you see the engine bell vibrating like crazy, you may consider reducing the gimbal angle; I have had to reduce the gimbal angle to 0.5 degrees to get designs to shut off before. An alternative to reducing gimbal angle, depending on the design, may be to reduce engine thrust. With less thrust, the engine gets jarred less when the gimbal switches sides during course corrections, which seems to allow the engine to shut off.
For particularly turnaround sensitive applications, you may want to consider eliminating gimbals all together. Using small RCS thrusters without gimbals, and removing any gimbals on your main engine, can enable you to produce faster turning missiles that nonetheless will not get stuck on. Do note there is a limit to this; if your RCS thrusters have too much thrust, they will end up forcing each other on when firing, locking the missile into an oscillation guaranteed to waste all your delta V. Finally, you could also try differential throttles; many engines in back, which can be turned on and off by the control module.
Ultimately, you will have to fiddle to find what works for your application.
-------------------------------- A quick review of the control module ----------------
The control module contains so many options, it can be hard to know where to start. An overview of how the control module works, and how it integrates into missile guidance, is thus useful in understanding how to tune missiles.
Missiles have three “phases” in their flight. These are the boost phase, the midcourse phase, and the terminal phase. All three of these are represented in the guidance module design window. The boost phase is usually just a phase where you are expending a lot of delta v to both get up to speed, and to get a rough intercept trajectory in place. The midcourse phase occurs when the boost phase delta v is spent; this is determined by the “propellant for boost phase” slider, and expends a certain percentage of your propellant. The midcourse phase generally consists of unpowered gliding, possibly interrupted by occasional course corrections. The number one reason missiles can end up running out of delta v, other than the engine bug, is if too many course corrections are made here. Finally, the terminal phase triggers when the missile believes it has enough delta v to burn all the way to its target.
All three phases have explicit control options presented in the guidance package, along with a variety of control algorithms. Of particular interest are the unguided, augmented proportional, and pure pursuit algorithms. The pure pursuit algorithm simply points the missile at the target and thrusts; in general, it is very bad at actually hitting a target. The unguided algorithm, like its namesake, performs no course correction. Augmented proportional navigation thrusts for where the objective will be if it continues to accelerate at the same rate it currently is doing so; in a perfect world, this would be the best guidance algorithm. However, this is not a perfect world.
In order to actually get an intercept, damping is needed on top of the augmented proportional algorithm. This caused the algorithm to be mixed with either a pure pursuit or unguided algorithm, dependent on if the acceleration checkbox is checked or not, with the mixing percentage determined by the damping coefficient. This prevents, when properly tuned, missiles fishtailing out of control or performing constant course corrections during cruise stage and wasting all delta v.
------------------------------------------ A practical guide to guidance design -----------------------------
How is this actually tuned in practice? Typically, by following a missile throughout its course and observing its behavior. Usually boost damping can be set to one, and is not all that important; setting midcourse to 0.25 likewise also usually works. However, terminal damping must be tuned carefully. In general, if you follow a missile home and observe you are undershooting your target, you probably want to reduce the damping coefficient; conversely, if you are fishtailing like a drunken sailor, increasing the damping might help. This is complicated by the fact that it is also possible to undershoot simply because you have insufficient acceleration, or delta v. I would recommend starting with a terminal damping delta v of 1.25, and fiddling from there.
What you should set your boost delta v to depends in large part on what you are attempting to do with the missiles. Intercepting high acceleration targets generally requires more delta v and acceleration than stationary targets, necessitating more delta v be preserved for course corrections and terminal phase. As a rule of thumb, preserve 50-60 % if your target is expected to accelerate fast; 70-80 is reasonable against slower targets.
As always, experimentation is necessary for best results. Once I have the engines shutting off, it typically takes between 5-10 trials before I have the missiles reliably intercepting my targets; sometimes, this requires adjusting reserve delta v. Enjoy making missiles, and I hope this guide helped. If you have any suggestions or questions, feel free to reply to this thread.
-------------------------------- A list of known gotchas ----------
As time goes on and I help debug more missile designs, additional problems that are hard to debug become known. This is a list of problems that have popped up since the guide has been made, and their resolution.
Midcourse sabotage:
If missiles have poor turn rate, the midcourse phase can wreak your design if course corrections are performed. The idiotic AI tends to turn the missile sideways to perform a correction, but often forgets to orient it back forward once the correction is done. This results in the missile going in spirals, and on terminal the confused missile never manages to properly straighten out.
A solution here is to either set the midcourse guidance law to unguided, or increase the midcourse damping factor. Additionally, if you have RCS thrusters on both the front and back ends of the missile it may reduce these problems.
This guide is current as of CoaDE version 1.2.1
For the impatient, a quick summary of the contents are listed below:
• The engine shut off bug:
- Engines will refuse to shut off if they are thrown around too much. This will result in them using all your delta v, even when the guidance system tells them to shut off.
- Fix this by moving the center of mass back, reducing the gimbal angle, reducing engine thrust, or using RCS and differental throttle and absolutely no gimbals.
- Even with all these measures, even Gimbal-less RCS will oscillate uncontrollably if given too much thrust. Ultimately, you will have to build carefully, and attempt to limit how much engines are thrown, accelerate, and vibrate. Experiment!
• Control tuning: The percentage of delta v expended in the boost stage should depend on what you are targeting.
- Against fast moving or fast dodging targets, you need a lot of terminal delta v. Set boost delta v somewhere around 50-60 to start.
- If your missile is a kinetic kill vehicle or aimed at slower moving ships consider setting boost delta v greater than 70 %
- High acceleration helps reduce the needed terminal delta v, but you must watch out for the engine shut off bug.
• Control tuning: damping coefficients
◦
- For a quick setup, Set boost damping to 1, and midcourse to 0.25. Use augmented proportional navigation in all slots. Check acceleration on boost and terminal phase; leave it unchecked elsewhere. Start terminal damping at 1.
- Follow a missile home on your target. If it is passing by the target on the near side, your damping coefficient needs to go down. If it is fishtailing like a drunken sailer, it needs to go up. Fiddle for 5-10 trials, trying to tune it to something good.
- If you are not even getting close, no matter what you do, you either need more acceleration or more delta v on terminal.
------------------------- The engine shut off bug: why your designs are running out of delta v -----------
Perhaps you have previously tried to design missiles, only to eventually give it up. The problem, you found, was that your missiles would launch, and shortly after launch run out of delta v, no matter what you did to the guidance system. If this has happened to you, you have probably encountered a bug: the engine shut off bug.
If an engine is subject to sufficient jerk or acceleration (it is not clear which), it will refuse to shut off, even when the control module is attempting to force the missile into a phase which lacks an acceleration command. The most common example being a missile continuing to fire despite entering mid course phase. With an engine stuck on, the missile runs out of delta v. To verify this bug is affecting you, you can try forcing midcourse on a missile, and then manual shutting off then turning on the engines; if they stay dark, this bug is the problem.
The bug can be handled a variety of ways. All of them boil down to reducing how much the engine is getting thrown around, and typically increase the turnaround time. The first suggestion I would offer is reduce the gimbal angle. Large gimbal angles in particular seem to greatly amplify the issue, allowing room for the engine bell to be thrown around and preventing it from extinguishing. If you see the engine bell vibrating like crazy, you may consider reducing the gimbal angle; I have had to reduce the gimbal angle to 0.5 degrees to get designs to shut off before. An alternative to reducing gimbal angle, depending on the design, may be to reduce engine thrust. With less thrust, the engine gets jarred less when the gimbal switches sides during course corrections, which seems to allow the engine to shut off.
For particularly turnaround sensitive applications, you may want to consider eliminating gimbals all together. Using small RCS thrusters without gimbals, and removing any gimbals on your main engine, can enable you to produce faster turning missiles that nonetheless will not get stuck on. Do note there is a limit to this; if your RCS thrusters have too much thrust, they will end up forcing each other on when firing, locking the missile into an oscillation guaranteed to waste all your delta V. Finally, you could also try differential throttles; many engines in back, which can be turned on and off by the control module.
Ultimately, you will have to fiddle to find what works for your application.
-------------------------------- A quick review of the control module ----------------
The control module contains so many options, it can be hard to know where to start. An overview of how the control module works, and how it integrates into missile guidance, is thus useful in understanding how to tune missiles.
Missiles have three “phases” in their flight. These are the boost phase, the midcourse phase, and the terminal phase. All three of these are represented in the guidance module design window. The boost phase is usually just a phase where you are expending a lot of delta v to both get up to speed, and to get a rough intercept trajectory in place. The midcourse phase occurs when the boost phase delta v is spent; this is determined by the “propellant for boost phase” slider, and expends a certain percentage of your propellant. The midcourse phase generally consists of unpowered gliding, possibly interrupted by occasional course corrections. The number one reason missiles can end up running out of delta v, other than the engine bug, is if too many course corrections are made here. Finally, the terminal phase triggers when the missile believes it has enough delta v to burn all the way to its target.
All three phases have explicit control options presented in the guidance package, along with a variety of control algorithms. Of particular interest are the unguided, augmented proportional, and pure pursuit algorithms. The pure pursuit algorithm simply points the missile at the target and thrusts; in general, it is very bad at actually hitting a target. The unguided algorithm, like its namesake, performs no course correction. Augmented proportional navigation thrusts for where the objective will be if it continues to accelerate at the same rate it currently is doing so; in a perfect world, this would be the best guidance algorithm. However, this is not a perfect world.
In order to actually get an intercept, damping is needed on top of the augmented proportional algorithm. This caused the algorithm to be mixed with either a pure pursuit or unguided algorithm, dependent on if the acceleration checkbox is checked or not, with the mixing percentage determined by the damping coefficient. This prevents, when properly tuned, missiles fishtailing out of control or performing constant course corrections during cruise stage and wasting all delta v.
------------------------------------------ A practical guide to guidance design -----------------------------
How is this actually tuned in practice? Typically, by following a missile throughout its course and observing its behavior. Usually boost damping can be set to one, and is not all that important; setting midcourse to 0.25 likewise also usually works. However, terminal damping must be tuned carefully. In general, if you follow a missile home and observe you are undershooting your target, you probably want to reduce the damping coefficient; conversely, if you are fishtailing like a drunken sailor, increasing the damping might help. This is complicated by the fact that it is also possible to undershoot simply because you have insufficient acceleration, or delta v. I would recommend starting with a terminal damping delta v of 1.25, and fiddling from there.
What you should set your boost delta v to depends in large part on what you are attempting to do with the missiles. Intercepting high acceleration targets generally requires more delta v and acceleration than stationary targets, necessitating more delta v be preserved for course corrections and terminal phase. As a rule of thumb, preserve 50-60 % if your target is expected to accelerate fast; 70-80 is reasonable against slower targets.
As always, experimentation is necessary for best results. Once I have the engines shutting off, it typically takes between 5-10 trials before I have the missiles reliably intercepting my targets; sometimes, this requires adjusting reserve delta v. Enjoy making missiles, and I hope this guide helped. If you have any suggestions or questions, feel free to reply to this thread.
-------------------------------- A list of known gotchas ----------
As time goes on and I help debug more missile designs, additional problems that are hard to debug become known. This is a list of problems that have popped up since the guide has been made, and their resolution.
Midcourse sabotage:
If missiles have poor turn rate, the midcourse phase can wreak your design if course corrections are performed. The idiotic AI tends to turn the missile sideways to perform a correction, but often forgets to orient it back forward once the correction is done. This results in the missile going in spirals, and on terminal the confused missile never manages to properly straighten out.
A solution here is to either set the midcourse guidance law to unguided, or increase the midcourse damping factor. Additionally, if you have RCS thrusters on both the front and back ends of the missile it may reduce these problems.