User Tools

Site Tools



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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:wheel_subsys [2019/09/16 15:40]
en:wheel_subsys [2020/03/25 16:28] (current)
Line 1: Line 1:
-**Orientation flywheel** \\  +====== Reaction Wheel ====== 
-Virtual ​[[power_subsys|consumption]] - 2000mA+  
 +Virtual ​power draw: 2000 mA
 {{ :​ru:​маховик.png?​direct&​200| Двигатель-маховик}} {{ :​ru:​маховик.png?​direct&​200| Двигатель-маховик}}
-When in orbit, many satellites ​require ​precise ​orientation of certain surfaces in the correct direction - relative to the Earth, ​the Sun, stars or some other reference ​pointFor example, ​the [[camera_subsys|camera]] should be oriented towards the [[sim_earth|ground]] and the [[sun_battery|solar panels]] should be oriented towards the Sun. There are several known approaches for solving this problem. For example, you can use jet (rocket) ​orientation ​engines, which causes ​the spacecraft to rotate in the desired direction ​relative to the center ​of mass. However, this method requires the consumption of a working fluid (fuel), requires a complex system of engine nozzles, ​is potentially unsafe, etc. On small spacecraft, ​ [[wheel_subsys|flywheels]] are most often used to provide a given orientation of the satellite in space relative to the center of mass+As they travel along the orbit, many satellites ​need precise ​positioning whereby specific edges would be aligned with particular directions ​relative to Earth, Sun, fixed stars or some other reference. ​A particular application would require ​the satellite to have its observation ​camera ​face Earth or solar cells face Sun. In smaller-scale orbiters the required spatial ​orientation ​of the satellite ​relative to the mass center is achieved ​most often using reaction wheels.
-The flywheel ​is an electromechanical ​device ​that consists of an electric motor with a wheel mounted ​on its axis of rotationAs the engine ​accelerates or decelerates, the spacecraft ​itself ​rotates ​faster or slower ​according to the law of conservation of the kinetic momentSince there are no external forces in outer space and the amount of motion cannot change, ​turning the flywheel ​clockwise ​causes ​the whole spacecraft to rotate counterclockwise. ​Thus, by controlling the engine ​and the rotation of the [[wheel_subsys|flywheel]],​ you can control ​the motion ​of the whole spacecraft ​(in factthe rotation) ​around its center ​of mass.+A reaction wheel is a mechanical ​device ​comprising ​an electric motor with a wheel fixed on its spindleThe engine ​spins by accelerating and decelerating alternatelyand the angular momentum conservation law will make the orbiter ​itself ​spin faster or slower. ​Considering that there are no external forces in the space and the amount of motion cannot change, clockwise ​rotation of the wheel would make the entire orbiter ​rotate counterclockwise. ​So, by controlling the motor and the reaction wheel we can control motion ​around ​the mass center ​(in essence, rotation) of the entire orbiter.
-In our modelfree rotation of the spacecraft, ​and hence the [[wheel_subsys|flywheel]], ​is possible ​only around ​one axis vertical. ​Therefore, only one orientation flywheel is installed on the "satellite."+In our model free rotation of the Orbicraft Construction Set and hence the reaction wheel is only possible ​around ​a single ​axis – the vertical ​axisFor that reason ​the satellite” only has a single positioning reaction wheel.
-The following functions are used for working ​with the flywheel ​motor: ​\\ +The following functions ​(in C) are used for interacting ​with the reaction wheel motor:
-//int32_t motor_set_speed(uint16_t num,int16_t RPM,int16_t *confirm);// \\  +<code C>int32_t motor_set_speed(uint16_t num,int16_t RPM,int16_t *confirm);</code> 
-The function allows you to set the flywheel speed. If everything is successfulit will return ​the LSS_OK code and the "confirm" value equal to the desired RPM. Howeverit can take quite a long time for the [[wheel_subsys|flywheel]] to accelerate ​to the required ​speed.+ 
 +Commands a speed setpoint ​to the wheelreturning ​the LSS_OK code upon success ​and the requested RPM in the confirm ​variable. However it could take quite some time for the wheel to actually reach the requested ​speed. 
 +The following function queries the current wheel rotation speed: 
 +<code C>​int32_t motor_request_speed(uint16_t num,int16_t *pRPM);</​code>​ 
 +==== Sample C Test Code for the Reaction Wheel ==== 
 +<file c Wheel_test.c>​ 
 + #include "​libschsat.h"​ 
 + /* 
 + ** Lab 5: manage motor speed 
 + */ 
 + void control(void) 
 + const int num = 1; /* motor number #1 */ 
 + int16_t temp; 
 + int16_t rpm = -3000; /* -3000 ... +3000 */ 
 + printf("​Enable motor #​%d\n",​ num); 
 + motor_turn_on(num);​ 
 + printf("​Manage speed motor #​%d\n",​ num); 
 + while (rpm <= 3000) { 
 + printf("<<<​ Set speed to %d\n", rpm); 
 + if (LSS_OK == motor_set_speed(num,​ rpm, &temp)) { 
 + if (temp == rpm) 
 + printf("​\t%d confirmed\n",​ rpm); 
 + Sleep(1);​ 
 + if (LSS_OK == motor_request_speed(num,​ &temp)) { 
 + printf("​Got speed %d >>>​\n",​ temp); 
 + } else { 
 + puts("​Fail! >>>"​);​ 
 + rpm += 500; 
 + printf("<<<​ Set speed to 0\n"​);​ 
 + if (LSS_OK == motor_set_speed(num,​ 0, &temp)) { 
 + if (temp == 0) 
 + printf("​\t%d confirmed\n",​ 0); 
 + Sleep(1);​ 
 + if (LSS_OK == motor_request_speed(num,​ &temp)) { 
 + printf("​Got speed %d >>>​\n",​ temp); 
 + } else { 
 + puts("​Fail! >>>"​);​ 
 + Sleep(1);​ 
 + motor_set_speed(num,​ 0, &​temp);​ 
 + Sleep(1);​ 
 + printf("​Disable motor #​%d\n",​ num); 
 + motor_turn_off(num);​ 
-//int32_t motor_request_speed(uint16_t num,int16_t *pRPM);// \\  
-This function allows you to request the current flywheel speed. 
en/wheel_subsys.txt · Last modified: 2020/03/25 16:28 (external edit)