6
Real Time Digital Simulation of a Satellite Attitude Control System Alper SARIKAN * , M. Timur AYDEMR ** , Emre YAVUZOLU *** , Çalar ÖZYURT **** * KAREL Electronics Cyberpark Cyber Plaza, B Blok 3. Kat, Bilkent 06800 Ankara / Turkey [email protected] ** Gazi University, Electrical & Electronics Engineering Department Maltepe-Ankara, TURKEY [email protected] *** Turkish Aerospace Industries Ankara, TURKEY [email protected] **** Turkish Aerospace Industries Ankara, TURKEY [email protected] This work has been conducted under the project contract 107E231 which is supported by Scientific and Technological Research Council of Turkey (TUBITAK). AbstractSatellite attitude control systems have too many dynamic variables for all cases of operation. Therefore, their tests for all these conditions may not be possible or may require highly specialised test environments. As an alternative to these time consuming and expensive methods, real time digital simulation and hardware in the loop methods that are developed in the latest years can be used. This paper presents a new approach for the real-time digital simulation and hardware in the loop support for testing satellite attitude control system. Control Moment Gyroscope has been chosen as the example system. Real time models of brushless dc motor and stepper motor have been obtained, and in connection with these models a steering logic model has been developed for satellite attitude control system within the same real time digital simulation environment. Index Terms: Real Time Digital Simulation, Control Moment Gyroscopes, Satellite Attitude Control I. INTRODUCTION Main disadvantage of general simulation tools is that they do not have real time processes. This means that time required for the computation of the system response is much greater than the exact run time of the system. Because of this non real-time operating property of the system devices cannot be connected externally to these simulators. This deficiency limits the usage of simulation tools in testing physical control and protective devices. Applications such as spaceships, boats running on electric power, hybrid cars and distributed energy systems require complex power generation and transmission systems [1]. In those systems having multiple generators and complex loads connected together with power circuits, it is very important to preserve quality and reliability of the energy in all operating conditions. Similarly, as the space missions have become more demanding, designing an attitude determination and control system with higher performance to respond the needs of future has also become more challenging. Design, integration and acceptance tests of such systems involve major difficulties. Testing of systems having too many dynamic variables for all cases of operation usually will not be possible or it requires highly specialized test environments. With the importance and complexity of modern digital control systems, including advanced control strategies implemented in far more than 100.000 lines of code per project and distributed over several controller boards with multiple processors each and real-time bus communication between them, this traditional approach is no longer adequate, and concern must be given to system verification-validation process [2]. In this concept reliable tests must be performed and result of these must be reported as unit test result for a variety of previously defined test cases within the project schedule. In order to achieve this goal real time simulation is required to analyse the dynamical behaviour of the complex and high- speed systems. Analog simulators are useful in that case but they have limitations on the size of the simulated system [3]. As an alternative for these time consuming and expensive simulation and testing methods, real time digital simulation and hardware in the loop methods are developed in the latest years. Real time digital simulators are seen as more efficient actuators due to their superior properties compared to other simulators. Real Time Digital Simulation (RTDS) tools roughly consist of a hardware block and a software block. Hardware block has special interfaces for components that can be supported within the software algorithm running on the application. The function of the software block is to support the hardware block and at the same time to control the system, which is being simulated by means of the interface, connected through the hardware. Depending on the type of the application, user can select components from the library and adjust the simulation parameters using a Graphical User Interface. RTDS procedure starts with the selection of the step size, adjustment of the hardware in the loop support and determination of the running mathematical model for the components used from the library. Simulation time can be short or long depending on the application type. General structure of 978-1-4244-4987-3/10/$25.00 ©2010 IEEE SPEEDAM 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion 827

[IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

  • Upload
    caglar

  • View
    213

  • Download
    1

Embed Size (px)

Citation preview

Page 1: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

Real Time Digital Simulation of a Satellite Attitude Control System

Alper SARIKAN *, M. Timur AYDEM�R **, Emre YAVUZO�LU ***, Ça�lar ÖZYURT **** * KAREL Electronics Cyberpark Cyber Plaza, B Blok 3. Kat, Bilkent 06800 Ankara / Turkey

[email protected] ** Gazi University, Electrical & Electronics Engineering Department Maltepe-Ankara, TURKEY

[email protected] *** Turkish Aerospace Industries Ankara, TURKEY

[email protected] **** Turkish Aerospace Industries Ankara, TURKEY

[email protected]

This work has been conducted under the project contract 107E231 which is supported by Scientific and Technological Research Council of Turkey (TUBITAK).

Abstract— Satellite attitude control systems have too many dynamic variables for all cases of operation. Therefore, their tests for all these conditions may not be possible or may require highly specialised test environments. As an alternative to these time consuming and expensive methods, real time digital simulation and hardware in the loop methods that are developed in the latest years can be used. This paper presents a new approach for the real-time digital simulation and hardware in the loop support for testing satellite attitude control system. Control Moment Gyroscope has been chosen as the example system. Real time models of brushless dc motor and stepper motor have been obtained, and in connection with these models a steering logic model has been developed for satellite attitude control system within the same real time digital simulation environment. Index Terms: Real Time Digital Simulation, Control Moment Gyroscopes, Satellite Attitude Control

I. INTRODUCTION Main disadvantage of general simulation tools is that

they do not have real time processes. This means that time required for the computation of the system response is much greater than the exact run time of the system. Because of this non real-time operating property of the system devices cannot be connected externally to these simulators. This deficiency limits the usage of simulation tools in testing physical control and protective devices.

Applications such as spaceships, boats running on electric power, hybrid cars and distributed energy systems require complex power generation and transmission systems [1]. In those systems having multiple generators and complex loads connected together with power circuits, it is very important to preserve quality and reliability of the energy in all operating conditions. Similarly, as the space missions have become more demanding, designing an attitude determination and control system with higher performance to respond the needs of future has also become more challenging. Design, integration and acceptance tests of such systems involve major difficulties. Testing of systems having too many dynamic variables for

all cases of operation usually will not be possible or it requires highly specialized test environments.

With the importance and complexity of modern digital control systems, including advanced control strategies implemented in far more than 100.000 lines of code per project and distributed over several controller boards with multiple processors each and real-time bus communication between them, this traditional approach is no longer adequate, and concern must be given to system verification-validation process [2]. In this concept reliable tests must be performed and result of these must be reported as unit test result for a variety of previously defined test cases within the project schedule. In order to achieve this goal real time simulation is required to analyse the dynamical behaviour of the complex and high-speed systems. Analog simulators are useful in that case but they have limitations on the size of the simulated system [3].

As an alternative for these time consuming and expensive simulation and testing methods, real time digital simulation and hardware in the loop methods are developed in the latest years. Real time digital simulators are seen as more efficient actuators due to their superior properties compared to other simulators.

Real Time Digital Simulation (RTDS) tools roughly consist of a hardware block and a software block. Hardware block has special interfaces for components that can be supported within the software algorithm running on the application. The function of the software block is to support the hardware block and at the same time to control the system, which is being simulated by means of the interface, connected through the hardware. Depending on the type of the application, user can select components from the library and adjust the simulation parameters using a Graphical User Interface. RTDS procedure starts with the selection of the step size, adjustment of the hardware in the loop support and determination of the running mathematical model for the components used from the library. Simulation time can be short or long depending on the application type. General structure of

978-1-4244-4987-3/10/$25.00 ©2010 IEEE

SPEEDAM 2010International Symposium on Power Electronics,Electrical Drives, Automation and Motion

827

Page 2: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

the RTDS system and sample environment for the achievement of the hardware in the loop support is given in Fig. 1.

Satellite Attitude System(Single Unit)

Digital/Analog Input/Output UnitMain Simulation PC

Driv

ers

SimulationSoftware

StepperMotor BLDC

Motor

MomentWheel

Fig. 1: Structure of the Real Time Digital Simulator architecture

Hardware in the loop support is used to observe the reactions of a system in a special state whose creation in real operating conditions is difficult or time consuming. To achieve this, the system to be tested is connected to the I/O ports of the simulator. I/O ports can be either analog or digital. Simulator should solve system equations with high speed and result should be obtained before the next sample reaches the simulator [1]. Other main property of this structure is without hardware support, it enables to start with simulation only and as the design improves, overall system can be tested with the addition of hardware blocks (electrical and mechanical sub-systems) one by one [2, 4].

Control Moment Gyroscopes (CMG) are devices that are used in attitude control of satellites. They consist of two motors with axes of rotation perpendicular to each other. This way a torque can be generated in the direction which is perpendicular to both axes.

Real time digital simulation of a satellite attitude control system utilizing CMGs is presented in the paper. Stepper motor and Brushless DC motor that make up the CMG are first modeled and simulated individually. Then, a control algorithm is given for the complete system and its real time digital simulation results are presented.

II. RTDS FRAMEWORK INFRASTRUCTURE The framework developed is executed on a computer

which has a dual-core 3 GHz processing power with 8 Giga bytes of memory. In order to interface digital and analog input and output signals required for the hardware in the loop support an I/O board is used within the computer attached to the PCI slot. In order to achieve the maximum performance during instruction execution QNX [5] real time operating system is used on this computer and on this real time operating system, an interrupt-driven framework is developed. The interrupt interval for this framework is configurable and the minimum interval achieved by this configuration is 9 microseconds. On this interrupt-driven framework the total execution time must not exceed the interrupt interval and this interval consists the time required for mathematical operations and digital-analog I/O operation for hardware.

III. ATTITUDE CONTROL INFRASTRUCTURE Main function of the attitude control hardware is to

supply required translational and rotational acceleration to satellite to accomplish the desired maneuver. Control forces and torques can be obtained through different sources. According to these sources, attitude control hardware could be categorized as follows:

Momentum exchange devices: They produce torque by modifying their angular momentum vector. The momentum exchange devices do not require tanks to store expendables. While the whole satellite system momentum remains constant, momentum of the actuator is transferred to the satellite to reorient it into a desired attitude.

All actuators consist of a spinning disc with an angular velocity �, (and corresponding angular momentum h=Idisc�). They might be grouped according to the means of torque production:

i) Momentum Wheels (MW) and Reaction Wheels (RW): Both momentum and reaction wheels produce torque by increasing or decreasing the rotation speed of the wheel. Momentum wheels provide constant angular momentum for gyroscopic stabilization. Orientation of the spin axis is fixed with respect to the inertial space. Attitude control is achieved by varying the spin speed of the wheel about some nominal value whereas reaction wheel is nominally at rest.

ii) Control Moment Gyros (CMG): Control torques are generated by changing the direction of the momentum vector (i.e. the direction of the axis of spinning wheel). [6]

BLDC motors are used for momentum wheels and stepper motors are used for controlling the moment generated throughout the momentum wheel.

Fig. 2: Single Gimbaled Control Moment Gyroscopes

IV. MATHEMATICAL ANALYSIS OF A 2-CMG SYSTEM Most CMGs described in the literature are based on the

4-CMG redundant pyramid configuration. However, references [6-8] describe a 2-CMG parallel arrangement where the gimbal axes are perpendicular to the x-y plane and are parallel to each other as depicted in Figure 3.

Using Euler’s principle which relates the torque to the derivative of angular momentum:

•= Sext HN (1)

where Hs is the angular momentum with respect to the spacecraft’s body-fixed control axis and Next is the external torque vector, including all types of external disturbances. Angular momentum equation is given as

hIH S += ω (2)

828

Page 3: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

x

y

z

NCMG-2NCMG-1

hCMG-1

•δ

hCMG-2

•δ

Fig. 3: 2-CMG Parallel Arrangement

where I is the spacecraft inertia matrix, � is the angular velocity vector, and h is the total CMG momentum vector. The total CMG momentum vector, for the 2-CMG cluster, is related to the gimbal angles as (Figure 4):

21 hhh += (3) where ih is the individual angular momentum of the ith CMG.

In this particular work it is always assumed that the angular momentum magnitudes of each CMG 0hhi ≡ are the same.

)( iihh δ= (4)

��

���

�++−

=21

210 sinsin

coscosδδ

δδhh (5)

y

1δ2δ

h2 h1

CMG 2 CMG 1 Fig. 4: 2-CMG Geometrical Configuration

Equation (6) relates the torque to the angular momentum derivative. For the CMG torque:

••== δAhNCMG

(6) where A is the well known Jacobian matrix.

��

���

� −=

21

210 coscos

sinsinδδδδ

hA (7)

A useful parameterisation of the geometrical configuration of the 2-CMG system is by defining two new angles � and � as depicted in Figure 5.

22

'1 δδα +=

22

'1 δδβ −= (8)

where 10'

1 180 δδ −= , � are called the ‘‘rotation’’ angle and � the ‘‘scissor’’ angle. Using this parameterisation, Equations (6) and (7) can be written as:

��

���

�=

βαβα

cossincoscos

2 0hh (9)

��

���

�−−−

=βαβαβαβα

sinsincoscossincoscossin

0hA (10)

This parameterisation allows visualisation of the 2-CMG system in a better way, but also eases the analysis of the CMG system.

y

1δ 2δ

αβ'

x

Fig. 5: CMG Geometrical Configuration with the �-� Parameterization

The ‘‘scissor’’ angle � determines (or modulates) the magnitude of the angular momentum of the CMG cluster:

βcos2 0hh = (11) The direction of the CMG angular momentum vector h

is determined by the ‘‘rotation’’ angle �. Angular momentum magnitude can vary up to a maximum of 2h0.

For the 2-CMG system the magnitude of the gimbal angles will be the same, ie. �1 = �. This means that the angular momentum vector h will vary its magnitude on the y-axis ‘‘scissor’’ angle- with a constant ‘‘rotation’’ angle � of 90°. The gimbal rate command is given by using Equation (12):

CMGNAh

1

021 −

•=δ (12)

where A-1 is the inverse of the Jacobian matrix A. Using the �-� parameterisation Equation (12) can also

be written as:

CMGNAh

1

021 −

=��

��

βα (13)

where

����

����

−−

=−

βα

βα

βα

βα

sinsin

coscos

sincos

cossin

2 01 hA (14)

V. REAL TIME DIGITAL SIMULATION MODEL OF STEPPER MOTOR

In order to model the stepper motor the equations 15-21 are used within the RTDS library. In this model not only the motor parameters but also the load torque and detent torque are used. By using these parameters current, torque, speed, position values are calculated within the loop.

Fig. 6: Phase Equivalent Circuit

829

Page 4: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

Parameters used in the stepper motor model are defined in Table 1. The equivalent circuit of the motor is shown in Figure 6.

TABLE 1 PARAMETER DEFINITIONS USED IN THE SIMULATION

va, vb Phase Voltage (V) ia, ib Phase Current (A) Ra, Rb Phase Resistance (Ohm) La, Lb Phase Inductance (H) ea, eb EMF (V) � Mechanical Angle (rad) ωm Angular Velocity (rad/sn) p Number of pole pairs m Maksimum flux (Vs) Te Motor Torque (Nm) TL Load Torque (Nm) Tdm Torque without drive (Nm) B Friction coefficient (Nms) J Moment of Inertia (kgm2)

By using the phase equivalent circuit phase voltages are

calculated with equations 1 and 2.

aa

aaaa edt

diLiRv ++= (15)

bb

bbbb edtdi

LiRv ++= (16)

Electromotive force is calculated by the following

equation, )sin( θψω ppe mma −= (17)

)cos()2sin( θψωπθψω ppppe mmmma =−−= (18) The torque generated by the motor is

)4sin()cos()sin(. θθψθψ pTppippiT dmmbmae −+−= (19) Motion equation for the motor is

mLem BTT

dtdJ ωω

−−= (20)

The rotor angle is calculated with equation 7.

�= dtmωθ (21) Figure 7 shows the results obtained by RTDS of the

stepper motor. Parameter values used in the simulations are given in Table 2.

TABLE 2

MOTOR PARAMETERS USED IN THE SIMULATION J 0.02 kg/m2 Kv 0.1 Nm/A Kt 0.1 V/(rad/s), Ra 2 La 0.5 H Vs 18V

VI. RTDS MODEL OF BRUSHLESS DC MOTOR In order to model the Brushless dc motor the equations

22-27 are used within the RTDS library. In this model motor is driven with 6-step inverter with 1200 conduction angle and a commutation phase sequence of AB-AC-BC-BA-CA-CB. In each commutation interval of 600 only two

phases are activated. Using the hall-sensor data can specify these intervals. The mathematical equations used within the model are given in (22-28). For each phase, R and L (phase resistance and inductance) are assumed to be equal. M describes the mutual inductance and ea, eb, ec are used to describe the phase back-emf voltages.

Fig. 7: (From top to bottom) Phase Current ia, Phase Voltage va,

Angular velocity wm and Motor Torque Te

���

���

�+

���

���

���

���

−−

−+

���

���

���

���

�=

���

���

c

b

a

c

b

a

c

b

a

cn

bn

an

eee

iii

dtd

MLML

ML

iii

RR

R

vvv

000000

000000

(22)

Motor’s motion equation, emf voltages and torque generated by the motor are given by the equations (23)-(27).

830

Page 5: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

rr

Le Bdt

dJTT ωω ++= (23)

)(2 ere

a fke θω= (24)

)3

2(2

πθω −= ere

b fke (25)

)3

4(2

πθω −= ere

c fke (26)

���

��� −+−+= cebeae

te ifififkT )

34()

32()(

2πθπθθ (27)

In these equations TL describes load moment, J is the

moment of inertia, B is the friction coefficient and ωr is the motor speed, ke, kt show emf and torque constants. f(.) function describes the emf generated by the motor and this function in a period is as follows:

����

����

����

����

<≤−+−

<≤−

<≤−−

<≤

=

πθππθπ

πθπ

πθππθπ

πθ

θ

23

5),3

5(613

5,13

2),3

2(613

20,1

)(

ee

e

ee

e

ef

(28)

The motor parameters used in the simulation are given

in Table 3. Figure 8 shows the simulation results for a BLDC initially at no load and then loaded with the rated load.

TABLE 3 MOTOR PARAMETERS USED IN THE SIMULATION

J 5 10-4 kg-m2 Kt 0.42 Nm/A Ke 0.45 V/(rad/s), R 0,09 L 50e-6 H M 25e-6 H P 2 (Number of poles)

(a) (b)

(c)

Fig. 8: Motor torque, phase voltage and phase current during simulation

VII. SATELLITE ATTITUDE CONTROL SYSTEM RTDS APPLICATION

Mathematical model described in section IV for the attitude control of a spacecraft equipped with CMGs is constructed in the RTDS software. Fig. 9 shows the block diagram of the satellite simulation together with the attitude control system.

QUATERNIONNAVIGATOR

QUATERNIONFEEDBACK

CONTROLLER

STEERING LOGICCMG DYNAMICS

SPACECRAFTDYNAMICS

q

w

h

•δ

Fig. 9: CMG Based Attitude Control System Diagram

In steering logic block, required gimbal rates to

generate the internal control torque commanded is determined using a desired steering logic algorithm. Then, these rates are fed forward to CMG Dynamics Block, where the gimbals are driven. Inside the CMG Dynamics Block, the gimbal rates are integrated to obtain gimbal angles instantaneously which are used to compute instantaneous angular momentum, and torque of the two CMGs. These values are obtained from stepper and brushless dc motor models (section V and VI) running within the same simulation software. The execution of the simulation is targeting to achieve a 300 rotation of the satellite with the following parameters.

TABLE 4 SIMULATION PARAMETERS

Parameter Value RPinitial: Initial attitude

roll-pitch [0°,0°]

RPcommanded: Attitude commanded

[30°,0°]

I: Inertia Matrix ��

���

�100010 kg.m2

Text: External disturbance torque

0

allowable

•δ : Allowable

gimbal rate

2 rad/s

h0: Angular momentum magnitude

1.0 N.m.s

Fig. 10: Satellite Attitude Profile

831

Page 6: [IEEE 2010 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010) - Pisa, Italy (2010.06.14-2010.06.16)] SPEEDAM 2010 - Real time digital

Simulations are repeated in order to achieve the desired attitude control is done. From the simulations result given in Figure 10 the requested attitude is established with the proposed algorithm.

VIII. CONCLUSION A real time digital simulation of a satellite attitude

control system is developed. First, real time simulations of stepper motors and brushless motors have been realized. Then a satellite attitude control system consisting of two CMGs is defined and modeled.

A steering law for a cluster of redundant single gimbal CMGs is presented. The steering law combines desired gimbal rates with torque requirements in a weighted fashion. The law may be used by planning the maneuvers. These gimbal angles are employed to calculate desired gimbal angle rates, and it is shown that the system moves to desired gimbal angles. This simulation infrastructure is still being developed and by adding new mathematical models and improving the sampling time this system can be used for detailed analysis of more complex systems. By this way, verification-validation test duration can be decreased for complex systems.

ACKNOWLEDGMENT This work has been conducted under the project

contract 107E231 which is supported by Scientific and Technological Research Council of Turkey (TUBITAK). Authors wish to thank TUBITAK for this support.

REFERENCES [1] Matar, M., Abdel-Rahman, M., Soliman, A.M., “FPGA-Based

Real-Time Digital Simulation”, International Conference on Power Systems Transients (IPST’05) in Montreal, Canada on June 19-23, 2005.

[2] Dufour, C. and Bélanger, J., “Real-time Simulation of a 48-Pulse GTO Statcom Compensated Power System on a Dual-Xeon PC using RT-LAB”, International Conference on Power Systems Transients (IPST’05) in Montreal, Canada on June 19-23, 2005.

[3] Terwiesch, P., Keller, T. and Scheiben, E., “Rail Vehicle Control System Integration Testing Using Digital Hardware-in-the-Loop Simulation”, IEEE Transactions On Control Systems Technology, Vol. 7, No. 3, May 1999.

[4] Taoka, H., Iyoda, I., Noguchi, H., Sato, N., Nakazawa, T., Yamazaki, A., “Real-Time Digital Simulator with Digital/Analog Conversion Interface for Testing Power Instruments”, IEEE Transactions on Power Systems, Vol. 9, No. 2, May 1994.

[5] QNX Realtime Systems. The QNX real time operating system. URL: http://www.qnx.com/.

[6] Yavuzoglu, E. “Steering Laws For Control Moment Gyroscope Systems Used In Spacecrafts Attitude Control”, A Master Of Science Thesis Submitted To The Graduate School Of Natural And Applied Sciences Of The Middle East Technical University, 2003

[7] Crenshaw, J., “2-Speed, A single-gimbal control moment gyro attitude control system”, Proc. AIAA Guidance and Control Conference, 1973

[8] Wie B., “Singularity Escape/Avoidance Steering Logic for Control Moment Gyro Systems”, Submitted to JGD&C, July 17, 2002

832