What is Orbicraft for?
How to work with it
Orbicraft Subsystems
Arduino-Based payload
Lessons
Laboratory equipment
Feedback
News
What is Orbicraft for?
How to work with it
Orbicraft Subsystems
Arduino-Based payload
Lessons
Laboratory equipment
Feedback
News
This is an old revision of the document!
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.
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.
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}$
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:
Translational motion | Analogy | Rotational motion |
---|---|---|
Force | $F\leftrightarrow M$ | Momentum |
Distance | $S\leftrightarrow \alpha$ | Angle |
Speed | $V\leftrightarrow\omega$ | Angular velocity |
Acceleration | $a\leftrightarrow\epsilon$ | Angular acceleration |
Weight | $m\leftrightarrow J$ | Moment of inertia |
The laws of motion also look similar.
Title of law | Translational motion | Rotational motion |
---|---|---|
Newton's second law | $F=m\cdot a$ | $M=J\cdot \epsilon$ |
kinetic energy | $E=\frac{m\cdot {{V}^{2}}}{2}$ | $E=\frac{J\cdot {{\omega}^{2}}}{2}$ |
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$ |
We write the law of conservation of the 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}}$
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}}$
Please note that 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
${{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) $
$ \left( {{J}_{s}}+{{J}_{m}} \right)\left( {{\omega }_{s1}}-{{\omega }_{s2}} \right)=-{{J}_{m}}({{\omega }_{m1}}-{{\omega }_{m2}}) $
$ {{\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$.
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.
$ {{\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:
${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\left( {{\omega }_{s1}}-{{\omega }_{{s\_goal}}} \right)$
Using the rotation mode with a constant speed, it is possible to make the satellite turn at any angle if the satellite is rotated at a constant speed for a certain time. Then the time that the satellite needs to rotate at a constant speed $\omega_{s\_goal}$ to turn to the required angle $\alpha$ is determined by dividing these values:
$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:
${{\omega }_{m2}}={{\omega }_{m1}}+{{k}_{d}}\cdot {{\omega }_{s1}}$
# request for angular velocity sensor (AVS) and flywheel data hyro_state, gx_raw, gy_raw, gz_raw = hyro_request_raw(hyr_num) mtr_state, mtr_speed = motor_request_speed(mtr_num) # conversion of angular velocity values in degrees/sec gx_degs = gx_raw * 0.00875 # if AVS is set up with the z axis, then the angular velocity # of the satellite coincides with the readings of the AVS along the z axis, otherwise # it is necessary to change the sign: omega = - gz_degs omega = gz_degs mtr_new_speed = int(mtr_speed+ kd*(omega-omega_goal))
# Differential feedback coefficient. # The coefficient is positive if the flywheel is located with the z axis up # and AVS is also z-axis up. # The coefficient is chosen experimentally, depending on the form # and the masses of your companion. kd = 200.0 # The time step of the algorithm, sec time_step = 0.2 # Target satellite angular velocity, degrees/sec # For stabilization mode is equal to 0.0 degrees/sec omega_goal = 0.0 # Flywheel number mtr_num = 1 # Maximum allowable flywheel speed, rpm mtr_max_speed = 7000 # Number of AVS (angular velocity sensor) hyr_num = 1 # Functions for determining the new flywheel speed. # New flywheel speed is made up of # current flywheel speed and speed increments. # Incrementing speed in proportion to angle error # and error in angular velocity. # mtr_speed - flywheel current angular speed, rpm # omega - current satellite angular velocity, degrees/sec # omega_goal - target angular velocity of the satellite, degrees/sec # mtr_new_speed - required angular velocity of the flywheel, rpm def motor_new_speed_PD(mtr_speed, omega, omega_goal): mtr_new_speed = int(mtr_speed + kd*(omega-omega_goal)) if mtr_new_speed > mtr_max_speed: mtr_new_speed = mtr_max_speed elif mtr_new_speed < -mtr_max_speed: mtr_new_speed = -mtr_max_speed return mtr_new_speed # The function includes all devices # to be used in the main program. def initialize_all(): print "Enable motor №", mtr_num motor_turn_on(mtr_num) sleep(1) print "Enable angular velocity sensor №", hyr_num hyro_turn_on(hyr_num) sleep(1) # The function disables all devices # to be used in the main program. def switch_off_all(): print "Finishing..." print "Disable angular velocity sensor №", hyr_num hyro_turn_off(hyr_num) motor_set_speed(mtr_num, 0) sleep (1) motor_turn_off(mtr_num) print "Finish program" # The main function of the program in which the remaining functions are called. def control(): initialize_all() # Initialize flywheel status mtr_state = 0 # Initialize the status of the AVS hyro_state = 0 for i in range(1000): print "i = ", i # Аngular speed sensor (AVS) and flywheel requests. hyro_state, gx_raw, gy_raw, gz_raw = hyro_request_raw(hyr_num) mtr_state, mtr_speed = motor_request_speed(mtr_num) # Processing the readings of the angular velocity sensor (AVS), # calculation of the satellite angular velocity. # If the error code of the AVS is 0, i.e. no error if not hyro_state: gx_degs = gx_raw * 0.00875 gy_degs = gy_raw * 0.00875 gz_degs = gz_raw * 0.00875 # if AVS is set up with the z axis, then the angular velocity # of the satellite coincides with the readings of the AVS along the z axis, otherwise # it is necessary to change the sign: omega = - gz_degs omega = gz_degs print "gx_degs =", gx_degs, \ "gy_degs =", gy_degs, "gz_degs =", gz_degs elif hyro_state == 1: print "Fail because of access error, check the connection" elif hyro_state == 2: print "Fail because of interface error, check your code" # Processing the flywheel and setting the target angular velocity. if not mtr_state: # if the error code is 0, i.e. no error print "Motor_speed: ", mtr_speed # setting of new flywheel speed mtr_new_speed = motor_new_speed_PD(mtr_speed,omega,omega_goal) motor_set_speed(mtr_num, mtr_new_speed) sleep(time_step) switch_off_all()
- Change the program so that the satellite rotates at a constant speed.
- Change the program so that the satellite works according to the flight timeline:
- Rewrite the program in C and get it working.