en:stabilization

This shows you the differences between two versions of the page.

Next revision | Previous revision Next revision Both sides next revision | ||

en:stabilization [2018/10/08 14:08] golikov created |
en:stabilization [2019/07/31 15:34] golikov |
||
---|---|---|---|

Line 1: | Line 1: | ||

- | ===== Why do we need stabilization mode ===== | + | =====Lesson 04===== |

+ | ==== Why do we need stabilization mode ==== | ||

- | Satellite stabilization mode means maintaining a zero angular velocity. This mode is necessary, for example, to obtain clear images or transfer them to a ground receiving point, when the data transmission time is long and the satellite antenna is not allowed to deviate from the ground receiving point. The theory also described in this lesson is suitable for maintaining any desired angular velocity, and not just zero, for tasks such as tracking a moving object. | + | Satellite stabilization mode means maintaining a zero angular velocity. This mode is necessary, for example, to obtain clear images or transfer them to a ground receiving point, when the data transmission time is long and the satellite antenna is not allowed to deviate from the ground receiving point. The theory described in this lesson is also suitable for maintaining any desired angular velocity (not only zero velocity), and for such tasks as tracking a moving object. |

- | ===== How to implement stabilization mode ===== | + | ==== How to implement stabilization mode ==== |

- | You can change the satellite’s angular velocity using flywheels, jet engines, electromagnetic coils, and gyrodyne engines. In this example, we consider the control of the control moment using the flywheel. The action of this device is based on the law of conservation of angular momentum. For example, when the flywheel engine spins in one direction, the spacecraft (SC), respectively, begins to rotate in the other direction under the action of the same moment of unwinding, but directed in the opposite direction in accordance with the Newton's third law. If, under the influence of external factors, the spacecraft began to turn in a certain direction, it is enough to increase the speed of rotation of the flywheel in the same direction and the unwanted rotation of the spacecraft will stop, instead of the satellite, the rotational moment will "take" the flywheel. Receive information about the angular velocity of the satellite will be using an angular velocity sensor. In this example, we will look at how to calculate control commands for the flywheel for the satellite to stabilize or maintain the required angular velocity from the indications of the angular velocity sensor and data on the speed of the flywheel. | + | You can change the satellite’s angular velocity using flywheels, jet engines, electromagnetic coils, and gyrodyne engines. In this example we consider the control over the control moment using the flywheel. The action of this device is based on the Law of conservation of angular momentum. For example, when the flywheel engine spins in one direction, the spacecraft (SC), respectively, begins to rotate in the other direction. It happens under the action of the same unwinding moment, but directed in the opposite side in accordance with the Newton's Third Law. If, under the influence of external factors, the spacecraft begins to turn in a certain direction, it is enough to increase the rotation speed of the flywheel in the same direction. So, the unwanted rotation of the spacecraft will stop because the flywheel will "take" the rotational moment instead of the satellite. . The information about the angular velocity of the satellite will be received by use of angular velocity sensor. In this example, we consider how to calculate control commands for the flywheel from the indications of the angular velocity sensor and data on the speed of the flywheel. It is needed for the satellite to stabilize or maintain the required angular velocity |

===== Theory ===== | ===== Theory ===== | ||

==== Analogies between translational and rotational motion ==== | ==== Analogies between translational and rotational motion ==== | ||

- | The analogue of the law of conservation of momentum for rotational motion is the law of conservation of angular momentum or the law of conservation of kinetic momentum: | + | The analogue of the Law of conservation of momentum for rotational motion is the Law of conservation of angular momentum or the Law of conservation of kinetic momentum: |

$\sum\limits_{i=1}^{n}{{{J}_{i}}\cdot {{\omega }_{i}}}=const \label{eq:1}$ | $\sum\limits_{i=1}^{n}{{{J}_{i}}\cdot {{\omega }_{i}}}=const \label{eq:1}$ | ||

- | In general, the rotational motion of a satellite is described by laws similar to those known for translational motion. For example, for each parameter in the translational motion there is a similar parameter for the rotational motion: | + | In general, the rotational motion of a satellite is described by laws similar to thosefor translational motion. For example, for each parameter in the translational motion there is a similar parameter for the rotational motion: |

^ Translational motion ^ Analogy ^ Rotational motion ^ | ^ Translational motion ^ Analogy ^ Rotational motion ^ | ||

Line 30: | Line 31: | ||

| law of momentum conservation| $\sum\limits_{i=1}^{n}{{{m}_{i}}\cdot {{V }_{i}}}=const$ | $\sum\limits_{i=1}^{n}{{{J}_{i}}\cdot {{\omega }_{i}}}=const$ | | | law of momentum conservation| $\sum\limits_{i=1}^{n}{{{m}_{i}}\cdot {{V }_{i}}}=const$ | $\sum\limits_{i=1}^{n}{{{J}_{i}}\cdot {{\omega }_{i}}}=const$ | | ||

- | ==== Derivation of the ratio for the required angular velocity of the flywheel ==== | + | ==== Derivation of ratio for required angular velocity of flywheel ==== |

- | We write the law of conservation of the kinetic moment of the system satellite + flywheel for the moments of time "1" и "2": | + | Let us write the law of conservation of kinetic moment of the system ‘satellite + flywheel’ for the moments of time "1" и "2": |

${{J}_{s}}\cdot {{\omega }_{s1}}+{{J}_{m}}\cdot {{\omega }_{m1}}={{J}_{s}}\cdot {{\omega }_{s2}}+{{J}_{m}}\cdot {{\omega }_{m2}}$ | ${{J}_{s}}\cdot {{\omega }_{s1}}+{{J}_{m}}\cdot {{\omega }_{m1}}={{J}_{s}}\cdot {{\omega }_{s2}}+{{J}_{m}}\cdot {{\omega }_{m2}}$ | ||

- | The absolute speed of the flywheel, i.e. the flywheel speed in an inertial coordinate system, for example, associated with the Earth, is the sum of the satellite angular velocity and the angular velocity of the flywheel relative to the satellite, i.e. flywheel angular velocity: | + | The absolute speed of the flywheel, i.e. the flywheel speed in an inertial coordinate system (for example, associated with the Earth) is the sum of the satellite angular velocity and the angular velocity of the flywheel relative to the satellite, i.e. flywheel angular velocity: |

${{\omega }_{mi}}={{\omega }_{si}}+{{{\omega }'}_{mi}}$ | ${{\omega }_{mi}}={{\omega }_{si}}+{{{\omega }'}_{mi}}$ | ||

- | Please note that the flywheel can measure its own angular velocity relative to the satellite body or relative angular velocity. | + | Please note: the flywheel can measure its own angular velocity relative to the satellite body or relative angular velocity. |

- | Express the desired speed of the flywheel, which must be set | + | Let usxpress the desired speed of the flywheel which must be set |

${{J}_{s}}\cdot {{\omega }_{s1}}+{{J}_{m}}\cdot \left( {{\omega }_{s1}}+{{{{\omega }'}}_{m1}} \right)={{J}_{s}}\cdot {{\omega }_{s2}}+{{J}_{m}}\cdot \left( {{\omega }_{s2}}+{{{{\omega }'}}_{m2}} \right) $ | ${{J}_{s}}\cdot {{\omega }_{s1}}+{{J}_{m}}\cdot \left( {{\omega }_{s1}}+{{{{\omega }'}}_{m1}} \right)={{J}_{s}}\cdot {{\omega }_{s2}}+{{J}_{m}}\cdot \left( {{\omega }_{s2}}+{{{{\omega }'}}_{m2}} \right) $ | ||

Line 50: | Line 51: | ||

$ {{\omega }_{m2}}={{\omega }_{m1}}+\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}\left( {{\omega }_{s1}}-{{\omega }_{s2}} \right) $ | $ {{\omega }_{m2}}={{\omega }_{m1}}+\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}\left( {{\omega }_{s1}}-{{\omega }_{s2}} \right) $ | ||

- | Denote the relation $\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}$ как $k_d$. | + | Denote the relation $\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}$ as $k_d$. |

- | For the operation of the algorithm is not necessary to know the exact value. $\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}$, because the flywheel cannot instantly set the required angular velocity. Also, the measurement noise interferes with the control process: the satellite’s angular velocity measured with an angular velocity sensor is not accurate, since there is always a constant error and measurement noise in measurements. It should be noted that measurements of the angular velocity and issuing commands to the flywheel occur with some minimum time step. All these limitations lead to the fact that $k_d$ experimentally selected or built detailed computer models that take into account all the above limitations. In our case, the coefficient $k_d$ will be selected experimentally. | + | Operation of the algorithm does not require the exact value of $\frac{{{J}_{s}}+{{J}_{m}}}{{{J}_{m}}}$ because the flywheel cannot instantly set the required angular velocity. Also, the precision of measurements is not absolute: the satellite’s angular velocity measured with an angular velocity sensor is not accurate, since measurements always contain measurement noise. Note that measurement of the angular velocity and command issuing to the flywheel occur with some minimum time step. All these limitations lead to the fact that $k_d$ should be experimentally selected. If it does not work we build detailed computer models which take into account all the above limitations. In our case, the coefficient $k_d$ will be selected experimentally. |

$ {{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\left( {{\omega }_{s1}}-{{\omega }_{s2}} \right) $ | $ {{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\left( {{\omega }_{s1}}-{{\omega }_{s2}} \right) $ | ||

- | The angular velocity $\omega_{s2}$ at time "2" is the target angular velocity; we denote it by $\omega_{s\_goal}$. Thus, if it is necessary that the satellite maintained the angular velocity $\omega_{s\_goal}$, then knowing the current angular velocity of the satellite and the current angular velocity of the flywheel, it is possible to calculate the desired velocity of the flywheel to maintain the "rotation with constant speed" mode: | + | The angular velocity $\omega_{s2}$ at time "2" is the target angular velocity; we denote it by $\omega_{s\_goal}$. Thus, if the satellite is supposed to maintain the angular velocity $\omega_{s\_goal}$, then knowing the current angular velocity of the satellite and the current angular velocity of the flywheel, it is possible to calculate the desired velocity of the flywheel to maintain the "rotation with constant speed" mode: |

${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\left( {{\omega }_{s1}}-{{\omega }_{{s\_goal}}} \right)$ | ${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\left( {{\omega }_{s1}}-{{\omega }_{{s\_goal}}} \right)$ | ||

Line 64: | Line 65: | ||

$t=\frac{\alpha}{\omega_{{s\_goal}}}$ | $t=\frac{\alpha}{\omega_{{s\_goal}}}$ | ||

- | If it is required that the satellite be stabilized, then $\omega_{s\_goal}=0$ and the expression becomes simpler: | + | If the satellite is required to be stabilized, then $\omega_{s\_goal}=0$ and the expression becomes simpler: |

${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\cdot {{\omega }_{s1}}$ | ${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\cdot {{\omega }_{s1}}$ | ||

Line 70: | Line 71: | ||

===== Python implementation ===== | ===== Python implementation ===== | ||

- | ==== Sample Python code using the formula: ==== | + | ==== Sample of Python code using the formula: ==== |

<code python> | <code python> | ||

Line 88: | Line 89: | ||

</code> | </code> | ||

- | ==== An example of the complete code of the satellite stabilization program in Python: ==== | + | ==== Example of complete code of the satellite stabilization program in Python: ==== |

<code python> | <code python> | ||

Line 95: | Line 96: | ||

# and AVS is also z-axis up. | # and AVS is also z-axis up. | ||

# The coefficient is chosen experimentally, depending on the form | # The coefficient is chosen experimentally, depending on the form | ||

- | # and the masses of your companion. | + | # and the mass of your satellite. |

kd = 200.0 | kd = 200.0 | ||

# The time step of the algorithm, sec | # The time step of the algorithm, sec | ||

Line 104: | Line 105: | ||

# Flywheel number | # Flywheel number | ||

mtr_num = 1 | mtr_num = 1 | ||

- | # Maximum allowable flywheel speed, rpm | + | # Maximum allowed flywheel speed, rpm |

mtr_max_speed = 7000 | mtr_max_speed = 7000 | ||

# Number of AVS (angular velocity sensor) | # Number of AVS (angular velocity sensor) | ||

Line 120: | Line 121: | ||

# mtr_new_speed - required angular velocity of the flywheel, rpm | # mtr_new_speed - required angular velocity of the flywheel, rpm | ||

def motor_new_speed_PD(mtr_speed, omega, omega_goal): | def motor_new_speed_PD(mtr_speed, omega, omega_goal): | ||

- | mtr_new_speed = int(mtr_speed + kd*(omega-omega_goal)) | + | mtr_new_speed = int(mtr_speed |

+ | + kd*(omega-omega_goal) | ||

+ | ) | ||

if mtr_new_speed > mtr_max_speed: | if mtr_new_speed > mtr_max_speed: | ||

mtr_new_speed = mtr_max_speed | mtr_new_speed = mtr_max_speed | ||

Line 151: | Line 154: | ||

- | # The main function of the program in which the remaining functions are called. | + | # The main function of the program in which remaining functions are called up. |

def control(): | def control(): | ||

initialize_all() | initialize_all() | ||

Line 168: | Line 171: | ||

# Processing the readings of the angular velocity sensor (AVS), | # Processing the readings of the angular velocity sensor (AVS), | ||

# calculation of the satellite angular velocity. | # calculation of the satellite angular velocity. | ||

- | # If the error code of the AVS is 0, i.e. no error | + | # If the error code of the AVS is 0, i.e. there is no error |

if not hyro_state: | if not hyro_state: | ||

gx_degs = gx_raw * 0.00875 | gx_degs = gx_raw * 0.00875 | ||

Line 198: | Line 201: | ||

===== Tasks ===== | ===== Tasks ===== | ||

- | - Change the program so that the satellite rotates at a constant speed. | + | 1. Change the program so that the satellite rotates at a constant speed. |

+ | 2. Change the program so that the satellite works according to the flight timeline: | ||

+ | * stabilization within 10 seconds | ||

+ | * 180 degree rotation in 30 seconds | ||

+ | * stabilization within 10 seconds | ||

+ | 3. Rewrite the program in C and get it working. | ||

- | - Change the program so that the satellite works according to the flight timeline: | ||

- | * stabilization within 10 seconds | ||

- | * 180 degree rotation in 30 seconds | ||

- | * stabilization within 10 seconds | ||

- | |||

- | - Rewrite the program in C and get it working. |

en/stabilization.txt · Last modified: 2020/03/25 16:28 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International