I NASA Technical Memorandum 4790 

PLATSIM: A Simulation and Analysis 

Package for Large-Order Flexible Systems 

(Version 2.0) 

Peiman G. Maghami, Sean I? Kenny, and Daniel l? Giesy 

Langley Research Center, Hampton, Virginia 

National Aeronautics and 

Space Administration 

Langley Research Center 

Hampton, Virginia 23681 -21 99 

December 1997 
Chapter 1 

Introduction 

The software package PLATSIM provides time and 

frequency domain analysis of large-order generic space 

platforms. PLATSIM can perform open-loop analysis or 

closed-loop analysis with linear or nonlinear control system models. PLATSIM’s generic control structure paradigm permits almost any type of control architecture to 

be implemented, for example: attitude control systems 

with or without flexible body controls, active isolation 

systems, and payload-instrument local control systems. 

In the time domain analysis, PLATSIM simulates the 

response of the space platform to disturbances and calculates the jitter and stability values from the response time 

histories. In the frequency domain analysis, PLATSIM 

calculates frequency response function matrices and provides the corresponding Bode plots. While PLATSIM 

was designed for analyzing space platforms, it only 

assumes that it has a finite element model of a structure 

that is being excited by force and/or torque inputs. Thus, 

any structure (e.g., aeronautical, automotive, structural, 

or mechanical) that fits this model can be analyzed by 

PLATSIM. 

PLATSIM operates in the MATLAB@ technical 

computing environment at MATLAB version 4.2 or 5.0. 

MATLAB, a product of The Mathworks, Inc., is a technical computing environment for high-performance 

numeric computation and visualization (ref. 1). 

PLATSIM also uses the Control System Toolbox and 

SIMULINK, which are additional products of The 

Mathworks, Inc. User input to PLATSIM is provided in 

the form of MATLAB readable data files and MATLAB 

function M-files. 

PLATSIM allows the user to maintain a database of 

performance measurement outputs on the space platform 

and a database of disturbance scenarios. An individual 

run of PLATSIM can use all the performance outputs or 

a user-selected subset; the user selects one disturbance 

scenario for each run. Time domain analysis in 

PLATSIM provides on-screen plots of time histories at 

user-selected output locations (e.g., instrument boresight) due to user-selected disturbance scenarios, encapsulated PostScript files of these plots, tables of jitterstability values due to disturbances for user-selected time 

window sizes, and files containing the time history data 

in either compressed or full form. Frequency domain 

analysis in PLATSIM provides on-screen Bode plots, 

encapsulated PostScript files of these plots, and files containing the plot data. 

PLATSIM includes novel algorithmic features that 

provide efficiency in all calculations and, in some cases, 

are actually enabling technologies. PLATSIM exploits 

the particular form of sparsity (block diagonal with 2 by 

2 blocks) of the plant matrices for both time analysis and 

frequency domain analysis. A new, original algorithm for 

the efficient computation of closed-loop (as well as openloop) frequency response functions for large-order systems has been developed and is implemented within 

PLATSIM. This algorithm is an enabling technology for 

the analysis of large-order systems, in general, and flexible space systems, in particular. Furthermore, a novel 

and efficient jitter analysis routine which determines jitter and stability values from time simulations in a very 

efficient manner (speedup of three to four orders of magnitude in typical examples as compared to the brute force 

approach of sweeping minima and maxima) has been 

developed for and is incorporated in the PLATSIM 

package. 

PLATSIM requires the following user inputs: modal 

data of the spacecraft as generated by finite element analysis, damping ratios for flexible modes, information 

about control actuators, measurement feedback sensors, 

and performance instrument outputs (e.g., boresight measurements), spacecraft disturbance data, and spacecraft 

control system model. 

The program can be used in either a graphical user 

interface (GUI) mode or in a batch mode. The two modes 

differ in the way the required and optional flags and 

parameters that control execution are defined. In the GUI 

mode, the parameters and flags are chosen from pop-up 

MATLAB menus with a keypad and a mouse. In the 

batch mode, all flags and parameters are defined in 

MATLAB command lines, which can be placed in an 

ASCII input file. 

Although PLATSIM was developed to analyze 

generic space platforms, the Earth Observing System 

EOS-AM-1 (ref. 2) is used throughout this manual as an 

example. Furthermore, several M-files and data files 

included in the PLATSIM distribution, some of which 

are listed in appendix A, correspond to the EOS-AM-1 

spacecraft. These files are the spacecraft control system 

defined in f ormscs .m, the instrument types and connectivity data defined in instdata .m, the finite element data defined in omega. mat and phi .mat, the 

damping schedule defined in mkdamp.m, and the 

spacecraft disturbance data defined in di s t da t a . m 

and its supporting routines. These files can serve as templates for the user-supplied files for other space platform 

applications. 

PLATSIM Version 2.0 Enhancements 

PLATSIM version 2.0 offers several substantial 

improvements in both capabilities and performance over 

the initial version 1.0 release. Improvements have been 
made to all aspects of the software package, but the most 

significant improvements have been made to core analysis modules (time and frequency domain modules and the 

jitter analysis module) and to the graphical user interface. 

PLATSIM version 2.0 offers the following new features: 

Nonlinear controllers are permitted. 

Seven nonlinear integration routines are available for 

The user has direct access of controller states to facilcontroller state propagation. 

tate solution integrity checking. 

There is direct interface with SIMULINK controller 

models. 

Controller models may be SIMULINK block diagrams 

or generic S-functions. 

Time-domain memory management has been greatly 

enhanced. 

Jitter calculations may be performed on-the-fly as 

opposed to postprocessing the entire time history 

matrices. 

Time-domain analysis has been generalized. 

The control system can be modeled as continuous time 

Hybrid control system models, consisting of continuThree methods are available for the propagation plant 

or discrete time. 

ous and discrete states, are supported. 

states. 

Frequency domain analysis has been generalized. 

PLATSIM frequency domain analysis now has the 

capability of performing Bode analysis on 16 closedloop and 9 open-loop transfer functions. 

The control system may be continuous time or discrete 

time. 

The graphical user interface has been expanded. 

Complete graphical access to all new time and frequency domain features has been added, for example, 

transfer function definition (including inputloutput 

connections), controller implementation methods, 

plant integration methods, and others. 

Graphical interface for defining jitter windows is 

possible. 

Session file creation for convenient recovery of previous PLATSIM run-time variable setting can be used. 

The manual begins with the description of input files 

and variables required by PLATSIM that include the 

finite element data, instrument and disturbance description data, and information on the control system (chapter 2). In chapter 3, the methodology and the assumptions 

behind the various analysis capabilities by the program 

are described, along with a discussion on the execution 

control parameters and options, which direct the type and 

extent of analysis performed by PLATSIM. Chapter 4 

describes the graphical user interface execution mode as 

well as the batch execution mode. The various menus, 

buttons, and sliders in the graphical user interface that 

assign the execution control parameters, define or redefine the structural and controls models, or execute the 

program are discussed in detail. The description of the 

results or output of the various analyses performed by 

PLATSIM, in terms of file names, types, and contents 

are provided in chapter 5. These results and outputs 

include the time history plots, reduced time history data, 

jitter tables, gain and phase plots, and transfer functions. 

The run-time diagnostic messages generated by 

PLATSIM are listed in chapter 6. Appendixes A and B 

provide a listing of typical user-supplied routines 

required by the program. Appendix C provides an example of the type of routine required for the solution integrity check capability of PLATSIM. Finally, examples of 

typical PLATSIM outputs for a time domain analysis 

(including jitter analysis) and a frequency domain analysis are provided in appendix D. 

2 
Contents 

Chapterl-Introduction ................................................................. 1 

PLATSIM Version 2.0 Enhancements ..................................................... 1 

Chapter2-InputFiles ................................................................. 3 

ModalFrequency DataFile ............................................................. 3 

ModeShapeDataFile ................................................................. 3 

ModalDampingScheduleFile ........................................................... 3 

InstrumentDataFile ................................................................... 4 

Instrument data parameter act ......................................................... 4 

Instrument data parameter mout ....................................................... 5 

Instrument data parameter pout ....................................................... 6 

Instrument data parameter instr ...................................................... 6 

DisturbanceData ..................................................................... 7 

distdata.minput ................................................................. 7 

distdata.moutputs ............................................................... 7 

ControlSystemFile ................................................................... 9 

Linear and time-invariant control system ................................................. 9 

Nonlinear or time variant control system ................................................. 9 

SolutionCheckFile .............................................................. 10 

Nonlinear Reaction Wheel Friction .................................................. 10 

Nonstictioncondition ............................................................... 10 

Stictioncondition .................................................................. 10 

Chapter 3-Analysis Methodology and Options ............................................. 13 

TimeDomain ....................................................................... 13 

Linearanalysis ..................................................................... 13 

Nonlinearanalysis .................................................................. 13 

Jitteranalysis .................................................................. 14 

FrequencyDomain ................................................................... 14 

PLATSIMfiquencydomaininputs .................................................... 15 

PLATSIMfrequencydomainoutputs ................................................... 15 

Execution Control Parameters .......................................................... 16 

Chapter6ProgramExecution .......................................................... 21 

Overview ........................................................................... 21 

GUIMode .......................................................................... 21 

Top-level graphical interface .......................................................... 21 

Supporting graphical interfaces ........................................................ 25 

BatchMode ......................................................................... 32 

BatchModeOperation ............................................................ 32 

iii 
Chapter5-PLATSIMOutput ........................................................... 35 

TimeDomain Analysis ................................................................ 35 

Full-timehistories .................................................................. 35 

Time history plots and reduced time history data .......................................... 35 

Example .......................................................................... 36 

File-namingconventionsforPC’s ...................................................... 36 

Jitter results and plots ............................................................... 36 

Frequency Domain Analysis ............................................................ 37 

Frequencyresponsematrix ........................................................... 37 

Bodeplots ........................................................................ 37 

File-naming conventions for PC’s ...................................................... 38 

Chapter~DiagnosticMessages ......................................................... 39 

Appendix A-User-Supplied Routines for Earth Observing System EOS-AM-1 Example ............ 43 

Appendix B- S-Function Representation of Earth Observing System EOS-AM- 1 

AttitudeControlSystem ............................................................... 57 

Appendix C-Solution Integrity Checking File .............................................. 61 

Appendix D-Time Domain Output and Frequency Domain Output for Earth Observing System 

EOS-AM-1 Example .................................................................. 67 

Time Domain Output for EOS-AM- 1 ................................................ 67 

Frequency Domain Output for EOS-AM-1 ............................................ 70 

References ........................................................................... 72 

iv 
Figure 1 . Format of phi . dat ............................................................ 4 

Figure 2 . Reaction wheel friction characteristics ............................................. 10 

Figure3.Stictioncondition .............................................................. 10 

Figure 4.Open-loop block diagram ....................................................... 15 

Figure 5 . Closed-loop block diagram ....................................................... 15 

Figure 6 . Graphical user interface for the PLATSIM package ................................... 21 

Figure 7 . Work space button pull-down menu ................................................ 22 

Figure 8 . Options button pull-down menu ................................................... 22 

Figure 9 . Jitter window interface .......................................................... 23 

Figure 10 . Analysis button pull-down menu ................................................. 23 

Figure 11 . Inputs/outputs button pull-down menu ............................................. 24 

Figure 12 . Spacecraft modal uncertainty interface 

Figure 13 . Mode-by-mode frequency modification interface .................................... 27 

Figure 14 . Set analysis parameters interface (time domain) ..................................... 28 

Figure 15 . Controller definition interface .................................................... 29 

Figure 16 . Set analysis parameters (closed loop, frequency domain) .............................. 29 

Figure 17 . Inputloutput connections interface ................................................ 31 

Figure 18 . Performance output selection interface 

Figure 19 . Disturbance module interface .................................................... 31 

Figure D1 . Example of time-history plot .................................................... 68 

Figure D2 . Example of Bode plot ......................................................... 71 

............................................ 25 

............................................ 31 

V 
Chapter 2 The ASCII file omega.dat contains one frequency 

per line: 

Input Files 

The PLATSIM program requires user-supplied 

information from which it can construct the simulation or 

analysis model. PLATSIM requires 

1. Information on the finite element model of the plant: 

modal frequencies, modal damping ratios, and mode 

shapes. 

instrument outputs: location, direction, identification 

number, and types. 

3. Information on disturbances: disturbance time histories, along with the corresponding location and direction of actions, and identifying names. 

4. Information on the control system mathematical 

model: whether the controller is linear or nonlinear; 

for linear control systems, the control system matrices; for nonlinear control systems, the nonlinear controller function, along with discrete-state updates and 

output vector. 

5. Information on user-defined and optional checking 

algorithm to be used in the validation of the integration of the nonlinear controller. 

I 

I 2. Information on the control system hardware and 

Specifically, PLATSIM requires users to provide the following input files: 

modal frequency data file (omega.dat or 

omega.ma t ) 

mode shape data file (phi.dat or phi.mat) 

modal damping schedule file (mkdampm) 

instrument data file (instdata.m) 

disturbances data file (dis tdat a.m) 

disturbances files (arbitrarily named M-files) 

control system file (arbitrarily named M-file) 

solution check file (optional) (so1chk.m) 

Note: These files should be placed in MATLAB’s 

directory path. 

The remainder of this chapter is devoted to presenting the 

details of these input files. 

Modal Frequency Data File 

The finite element modal frequency data are to be 

provided in ASCII file omega.dat, or in MATLAB 

binary file omega.mat. 

01 

02 

*P 

where p is the number of modes in the spacecraft model. 

The MATLAB binary file omega.mat should contain a variable omega which is ap x 1 vector containing 

the frequencies from omega.dat as described above. 

The user running PLATSIM in its graphical user 

interface (GUI) mode has the opportunity, via the menu 

item “Modify Plant Model” under the “Options” button, 

to interactively change the plant model’s frequencies. 

(See “Program Execution” on page 21.) 

Mode Shape Data File 

The finite element mode shape data are to be provided in ASCII file phi.dat, or in MATLAB binary file 

phi.mat. Use s to denote the number of grid points at 

which mode shape data are to be given in file phi . dat 

and label these grid points with grid numbers 

N,, N2, . . ., N,. Then phi . dat has (p x s) lines in the 

format shown in figure 1 on page 4, where X;, Y;, and 

Z; are the modal translations in X, Y, and Z, and 0;. @;, 

and Y; are rotations about X, Y, and Z for mode i at grid 

point Nj. Note that grid points that are not needed to 

model instruments, the control system, or disturbances 

do not need to be included in file phi . dat. However, if 

they are included, care must be taken to ensure that each 

mode block contains data for exactly the same grid 

points. 

Note: If p frequencies are defined in omega.dat, 

modal amplitudes for exactly p modes should be defined 

in phi.dat, and the i-th mode in phi.dat should correspond to frequency oi. 

The MATLAB binary file phi.mat should contain 

a variable phi, which is a (’p x s) by 7 matrix containing 

the grid numbers and mode shape displacements and 

mode slope displacements from phi.dat as described 

previously. Users are encouraged to create the binary file 

phi.mat to improve the efficiency of loading model 

data. 

Modal Damping Schedule File 

PLATSIM determines the damping ratios of the flexible spacecraft modes by calling the user-supplied 

3 
................................ 

Ns X: Y: Z: 0: 4: 

Figure 1. Format of phi.dat. 

MATLAB function mkdamp in file mkdamp . m. This 

function has the following form: 

function [dl =mkdamp (omega) 

I The input argument omega is a vector containing 

the modal frequencies ol, q, ..., op. The user must set 

the output d to a vector containing the corresponding 

damping ratios. Appendix A contains a sample file 

mkdamp . m for the EOS-AM- 1 mission. This file defines 

a damping ratio of 0.2 percent for structural modes with 

frequencies under 15 Hz, a damping ratio of 0.25 percent 

for structural modes with frequencies between 15 Hz and 

50 Hz, and a damping ratio of 0.3 percent for structural 

modes with frequencies over 50 Hz. 

The user running PLATSIM in its graphical user 

interface (GUI) mode can use “Modify Plant Model” 

under the “Options” menu to change the damping schedule. (See “Program Execution” on page 21 .) 

Instrument Data File 

The data defining the location, direction, type, and 

identification of the control system actuators and sensors, 

as well as the performance outputs of the system, must be 

provided by the user through a user-supplied MATLAB 

function instdata in a file named instdata.m. This 

function must have the following form: 

function [act,mout,pout, instrl = instdata 

The following is a description of the user-defined output 

parameters in file instdata. See appendix A for a 

sample file instdata.m for the EOS-AM-1 spacecraft. 

Instrument data parameter act . Parameter act is 

used to define the location, direction, identification, and 

scaling of the control system actuator models. Parameter 

act is a matrix of four rows by as many columns as 

4 
necessary to represent the actuators. An example of act 

is given as 

- 

111 121 122 827 + 

5664 + 

mout = 11 11 11 120 + 

0.5 0.25 0.25 1.0 + 

- 0001 - + 

625 1211 1212 827 + Grid Point No. 

act = 14 5 

5 6 1 + 1 DirectionNo. 1 

300 550 550 400 + IdentificationNo. 

1.0 0.5 0.5 1.0 + Weighting/ScaleFactor 

- 

Grid Point No. 

Direction No. 

Identification No. 

Weighting/Scale Factor 

Type Flag No. 

The first row of act defines the finite element grid 

points upon which the actuators are acting. 

The second row of act defines the directions at 

which the actuators are acting. Direction numbers 

are limited to 1 through 6, which correspond to 

x-translational, y-translational, z-translational, 

x-rotational, y-rotational, and z-rotational directions, respectively. 

The third row of act defines the user-defined positive identification numbers associated with the 

actuators. Note: Each actuator must have a 

unique identification number. A single actuator 

may require more than a one-column 

description. 

The fourth row of act defines the weighting-scale 

factors associated with the actuators. This factor 

allows for distributing the effect of an actuator 

within grid points. For example, in the act example, actuator 550 exerts its torque about the Y-axis 

on two grid points (1211 and 1212), each with a 

weighting of 0.5; that is, half the torque generated 

by this actuator is applied to grid point 121 1 and 

the other half to grid point 1212. On the other 

hand, actuator 400 exerts its torque about the 

Z-axis solely at grid point 827. This factor also 

allows for independent scaling of the actuator 

output. 

Each column of act indicates a contribution of an 

actuator (force or torque) to a grid point. Note: 

Each actuator must be represented by at least 

one column. 

Note: Internally, PLATSIM reorders the actuator 

numbers according to the sorted (low-to-high) 

identification numbers provided in the third row of 

act. In the previous example, PLATSIM considers actuator 300 as the first actuator, actuator 400 

as the second, and actuator 550 as the third and last 

actuator. 

Znstncment data parameter mout. Parameter 

mout is used to define the location, direction, identification, scaling, and measurement type of the control system 

sensor models. Parameter mout is a matrix of five rows 

by as many columns as necessary to represent the measurement outputs. An example of mout is given as 

The first row of mout defines the finite element 

grid points whose responses contribute to the sensor measurements. 

The second row of mout defines the direction 

associated with the grid point responses that 

contribute to the sensor measurements. Direction 

numbers are limited to 1 through 6, which 

correspond to x-translational, y-translational, 

z-translational, x-rotational, y-rotational, and 

z-rotational directions, respectively. 

The third row of mout defines the user-defined 

positive identification numbers associated with the 

measurement sensors. Note: Each measurement 

sensor must have a unique identification nmber. A single sensor may require more than a 

one-column description. 

The fourth row of mout defines the weightingscale factor associated with the sensors. This factor 

allows for the contribution of responses from multiple grid points and directions to a measurement 

signal. For example, in the mout example above, 

measurement sensor 11 measures a combined 

response from rotation about the Y-axis at grid 

point 11 1, rotation about the Z-axis at grid point 

121, and rotation about the Z-axis at grid point 

122, with corresponding weighting factors of 0.5, 

0.25, and 0.25. In other words, the measurement 

signal of sensor 11 is comprised of half the rotational response (about the Y-axis) at grid 11 1, a 

quarter of the rotational response (about the Z-axis) 

at grid point 121, and a quarter of the rotational 

response (about the Z-axis) at grid point 122. Note 

that this weighting-scale factor also allows for 

independent scaling of the sensor output. 

The fifth row of mout defines the measurement 

sensor type flag numbers which take the value 0 for 

displacement and the value 1 for rate. PLATSIM is 

programmed only to handle displacement and rate 

sensors as input to the control system; however, 

acceleration feedback to the control system can be 

implemented by the addition of a judiciously 

selected prefiltering of a velocity signal. 

5 
Each column of mout indicates a contribution of a 

grid point (in a specified direction and type) to a 

measurement sensor. Note: Each measurement 

sensor must be represented by at least one 

column. 

Note: Internally, PLATSIM reorders the sensor 

numbers according to the sorted (low-to-high) 

identification numbers provided in the third row 

of mout. In the previous example, PLATSIM 

314 

6 

pout = 113 

considers sensor 11 as the first sensor and sensor 

120 as the second and last sensor. 

Instrument data parameter pout. Parameter 

pout defines the location, direction, identification, 

scaling, and measurement type of the performance output 

models. Parameter pout is a matrix of 5 rows by as 

many columns as necessary to represent the performance 

outputs. An example of pout is given as 

567 Grid Point No. 

Direction No. 

Identification No. 

4 

1120 

lo 1 2 1 + 1 TypeFlag No. 1 

Note: The rows and columns of parameter pout 

follow exactly the definitions given for that of 

parameter mout with one exception: 

The elements in the fifth row of pout, which 

define the performance output types, may also 

take values of 2 for acceleration output. 

A weighting factor is included with the prior data. 

One use of this weighting factor is for conversion 

of units. The performance output which is being 

calculated in radians is converted to arc seconds by 

multiplying the original weighting factors [ 1 0.3 11 

by (3600 x 180)/n to obtain the fourth row in the 

example pout. 

Instrument data parameter inst r. Parameter 

instr is a matrix of character strings that provides 

names for the performance outputs. The number of rows 

in instr must be equal to the number of performance 

outputs, that is, the number of distinct entries in the third 

row of pout. An example of ins t r, corresponding to 

the previous example of pout, is given as 

IISWIR PitchlSWIRlarc-sW 

1 1201VNIR Yaw AccelerationlVNIRlarc-sec/sec 

11 31TIR RolllTIRlarc-sec 

instr = 

Each element of instr is a string consisting of 

three or four fields separated from each other by 

the vertical bar (I) character. 

The first field is an integer which must correspond 

to one of the performance output identification 

numbers defined in the third row of pout. 

, 

Note: Every identification number in that row 

must be referenced in ins t r. 

The second field is one or more alphanumeric 

words which provide a unique name for the corresponding performance output. These names are 

used in PLATSIM on menu labels and to identify 

information in output tables and graphs. They are 

also used as parts of file names after embedded 

blanks have been replaced by underscores (-). 

No characters (except blanks that will be 

replaced by underscores) should be used 

that would confuse the computer operating 

system when used in a file name. 

For purposes of determining whether 

character strings are distinct, embedded 

blanks should be considered the same as 

underscores (e.g., “SWIR Pitch” and 

“SWIR-Pitch” should be considered the 

same). 

The third field is used to name the menu button 

under which this instrument will be found when 

running PLATSIM in the GUI mode. By using the 

same name in the third field of several entries, the 

entries will be grouped in a submenu under the 

same menu heading. In the example shown previously, all performance outputs are found under 

separate menus labeled: “SWIR’, “VNIR’, and 

“TIR’. 

If the optional fourth field is present, PLATSIM 

will add it to the second field in generating the vertical legend of time history plots; this can be used, 

for example, to give the units of the output. 

6 
Disturbance Data 

In the development of the PLATSIM package, it was 

assumed that spacecraft simulations and analyses would 

be performed for a variety of different disturbances scenarios and that each user would maintain a disturbance 

database. Easy interactive access to the disturbance datal base is provided in PLATSIM through a graphical user 

interface. The operation and capabilities of the disturI 

I 

bance GUI will be described in “Program Execution” on 

page 21. 

The PLATSIM disturbance data are communicated 

to the main package through a user-supplied MATLAB 

function distdata in file distdata.m. This usersupplied data file provides a complete description of all 

spacecraft disturbance scenarios. A spacecraft disturbance scenario may consist of several disturbance events. 

A disturbance event is a force or torque time history acting on the platform. 

The actual structure of the user disturbance data is 

described herein. Note: The specific structure of the 

function call has been modified for version 2.0. The 

variable t d f 1 ag has been added to the input list. The 

first line(s) of file distdata.m. must have the following form: 

function [dist,w,period,cnames,dnames, 

instdat , mapping] 

=distdata (casenum, tdf lag) 

The data the user returns in the first three parameters 

(dist, w, and period) will depend on casenum, 

while the data returned in the last four parameters 

(cnames, dnames, instdat , and mapping) 

must be the same, independent of the value of casenum. 

The data returned in dist, w, and period will 

model the one or more disturbance events of the disturbance scenario identified by casenum. 

I 

distdata .minput 

casenum: Used to select a particular disturbance scenario from the user-provided database. 

If PLATSIM calls distdata with casenum= 0, 

the user need only return the last four parameters (cnames, dnames, instdat, and 

mapping). 

If casenum is input as a positive integer between 

the values of 1 and the number of rows in character 

matrix dnames, then all seven parameters should 

be returned with the values in the first three corresponding to the disturbance scenario whose name 

is in row casenum of dnames. See input variable 

tdflag for exceptions. 

Note: All other values of cas enum are invalid. 

For all nonbatch mode operations, the value of 

casenum is set by the disturbance module GUI. 

In batch mode, the value of casenum is set in the 

batch mode input file. 

tdf lag: A string variable set to ‘yes’ for time-domain 

analysis and to ‘no’ for frequency domain analysis. This 

input is a version 2.0 modification which allows users to 

avoid unnecessary calculations when frequency domain 

analysis is requested. 

When tdflag=‘no’, output variables w, and 

period do not have to be defined. 

di stdat a. m outputs 

dist: A matrix of four rows by as many columns as 

necessary to describe one disturbance event represented 

by a column of the matrix w. An example of dist is 

given as 

6325 121 112 + GndPointNo. 

dist = I 1 5 I] + I DirectionNo. 1 

100 200 200 + IdentificationNo. 

1.0 0.6 0.4 + Weightingkale Factor 

The first row of dist defines the finite element 

grid points upon which the disturbances are acting. 

The second row of dist defines the directions at 

which the disturbances are acting. Direction numbers are limited to the integers 1 through 6, 

which correspond to x-translational, y-translational, 

z-translational, x-rotational, y-rotational, and 

z-rotational directions, respectively. 

The third row of dist defines the user-defined 

positive identification numbers associated with the 

disturbances. Note: Each disturbance event must 

have a unique identification number. A single 

disturbance event may require more than a onecolumn description. 

The fourth row of dist defines the weightingscale factor associated with the disturbances. This 

factor allows for distributing the effect of a disturbance across multiple grid points. For example, in 

the di s t illustration, disturbance 200 exerts its 

torque about the Y-axis on two grid points (121 and 

112), with weighting factors of 0.6 and 0.4, respectively. In other words, 60 percent of the torque 

exerted by this disturbance is applied to grid point 

121, and the other 40 percent is applied to grid 

point 112. On the other hand, disturbance 100 

exerts its force in the x-direction solely at grid 

point 6325. This factor also allows for independent 

scaling of the disturbance levels. 

7 
Each column of di s t indicates a contribution of a 

disturbance (force or torque) to a grid point. Note: 

Each disturbance must be represented by at 

least one column. 

Note: Internally, PLATSIM reorders the disturbance numbers according to the sorted (low-tohigh) identification numbers provided in the third 

row of di s t. In the previous example, PLATSIM 

considers disturbance 100 as the first disturbance 

event and disturbance 200 as the second and last 

disturbance event. 

w: A matrix of force and/or torque disturbance time history profiles. The number of rows in w is the number of 

time steps, and the number of columns in w is the number 

of disturbance events. This output is optional for frequency domain analysis. 

period: A disturbance sampling period, which is also 

used as the update rate of the simulation solution. Note 

that the same discretization period is used for all events 

in a single disturbance scenario. This output is optional 

for frequency domain analysis. 

cnames : A string matrix that contains the menu heading labels for the disturbance GUI. The disturbance GUI 

will create a pull-down menu button for each row in 

cnames. The entries in cnames are used for menu 

button labeling only and will not appear in output 

documentation. 

dnames: A string matrix of disturbance scenario case 

names. The rows in dnames are used for labeling pulldown menu items in the disturbance GUI, for labeling 

plot figures, and for constructing some PLATSIM output 

file names. 

If the PLATSIM user selects a disturbance scenario 

from the disturbance GUI that was in row ‘3” of 

dnames, then PLATSIM will call distdata 

with casenum = ‘j’. The user who wrote 

distdata . m must return the disturbance case 

which corresponds to the name in row “j” of 

dnames by testing casenum and acting on the 

value found there. 

Individual disturbance scenarios may be “commented out” by editing distdata . m to return 

the corresponding row of dnames with an asterisk 

(*) as the first character. The scenario will still 

show on the disturbance GUI menu but in a distinctive grey type, and it will not be selectable. 

instdat: The variables instdat and mapping 

together define which dnames row entries will appear 

under a particular cnames disturbance GUI pull-down 

menu button. The vector instdat may be any length, 

and its entries may be in any numerical order. 

Note: The entries in instdat must correspond 

to valid row numbers in the dnames string 

matrix. 

mapping: The vector mapping must contain nonnegative integers and define the partitioning of the 

instdat vector required to map the entries in dnames 

to the disturbance GUI labels created from cnames. 

The number of entries in the mapping variable 

must equal the number of rows in cnames. 

The sum of all entries in mapping must equal the 

number of elements in ins t dat. For example, if 

instdat has 30 elements, the MATLAB command sum (mapping) must also equal 30. 

To illustrate the use of the parameters cnames, 

dnames, instdat , and mapping, suppose the file 

di s t da t a . m contains these commands: 

cnames = str2mat(‘Calibrationf,’Tracking’); 

dnames = str2mat(‘Solar Array‘,’Telescope Cal‘,’Antenna Cal’); 

dnames =str2mat(dnames,‘Telescope Track’,’Antenna Track’,‘Antenna Sweep‘); 

instdat=[l 2 3 1 4 5 61; 

mapping= [ 3 4 I ; 

This disturbance database should contain six disturbance cases whose names are given in the six lines of the 

dnames matrix. When PLATSIM is run in GUI mode, 

there will be two buttons on the disturbances menu with 

labels Calibration and Tracking. The 

Calibration button will invoke a submenu showing 

three entries (mapping ( 1 ) = 3) which will be taken 

from the first three rows of the dnames matrix. The first 

three entries of instdat are [l 2 31. The 

Tracking button will invoke a submenu showing four 

entries (mapping (2 ) = 4) which will be taken from 

rows 1,4,5, and 6 of dnames . The next four entries of 

8 
instdat are [l 4 5 61). Note that the same 

disturbance scenario (Solar Array in this example) 

may be included in more than one category. 

Control System File 

The control system model is accessed by a usersupplied MATLAB function whose name is in the string 

variable nlcon. Depending on the linear or nonlinear 

nature of the controller, the user-supplied file may be 

either a PLATSIM version 1.0 style, that is, a function 

that returns a linear time-invariant state space representation, or a MATLAB S-function. It should be emphasized 

that any linear or nonlinear control system can be represented, such as a spacecraft attitude control system, a 

flexible body control for payload isolation or disturbance 

rejection, robotic control, and many others. 

Linear and time-invariant control system. If the 

control system is linear and time invariant, information 

on the control system may be provided in one of two 

ways: 

1. A user-supplied MATLAB function must provide the 

matrices that define the control system in state-space 

form. This form was required by PLATSIM 

version 1.0. 

The first line of this type controller file must have 

the form function [~SCS,~SCS,CSCS,~~CS] 

=xxyyzz where the output parameters ascs, 

bscs, cscs, and dacs denote the state matrix, 

the input influence matrix, the output influence 

matrix, and the feed-through matrix of the control 

system, respectively. The name of the controller 

file, xxyyzz.m in this example, is arbitrary and 

is passed to PLATSIM in the execution control 

parameter (p. 16 ff) nlcon as nlcon= 

’xxyyz 2’. 

An example file named f0rmscs.m is given in 

appendix A. This file corresponds to a simplified 

continuous-time model of the attitude control system of the EOS-AM-1 spacecraft. 

2. A user-supplied MATLAB S-function may be provided in one of three ways: 

As a user-supplied MATLAB function which follows the inpudoutput requirements for S-functions. 

Type help sfunc at the MATLAB prompt for a 

complete description of S-functions. An example 

of a user-supplied S-function corresponding to a 

continuous-time model of the attitude control system of the EOS-AM-1 spacecraft is given in 

appendix B. 

A user-supplied SIMULINK block diagram. If the 

controller exists as a block in a SIMULINK simulation file, a MATLAB S-function may be obtained 

by isolating the controller block, by changing its 

input and output connections to Inports and 

Outports, respectively, and by saving the 

updates. 

A user-supplied C or FORTRAN function 

which follows the inpudoutput requirements of 

S-functions. This function is subsequently converted to a MATLAB “mex” file through the 

MATLAB fmex or cmex routines. 

Note: Controller file names are arbitrary and can be 

modified from default values during program execution in GUI mode or by setting string parameter 

nlcon in the batch mode. 

General assumptions and comments: 

1. The linear controller can be either a continuous or a 

digital controller. Note that the user declares the continuous or digital nature of the controller in flags used 

during the program execution. 

2. It is assumed that the control system is implemented 

with a negative feedback connection. 

3. It is assumed that the number of control system inputs 

is equal to the number of measurement outputs of the 

plant. Moreover, there is a straight connection 

between the measurement outputs of the plant and the 

inputs of the control system. 

4. It is assumed that the number of control system outputs is equal to or greater than the number of control 

inputs to the plant. However, it is assumed that only 

control system outputs 1 through the number of plant 

inputs are used in the feedback connection. Moreover, 

the feedback connection is a straight connection. 

Nonlinear or time variant control system. If the 

controller model is nonlinear or time variant, the necessary information on the control system model is provided 

solely by a user-supplied MATLAB S-function which 

can be defined in one of three ways, as discussed in the 

previous section. An example of a nonlinear control system corresponding to a continuous-time model of the 

attitude control system of the EOS-AM- 1 spacecraft with 

reaction wheel stiction is provided in user-supplied 

MATLAB S-function s t i c t ion. m. 

General assumptions and comments: 

1. The nonlinear controller may have both continuous 

and discrete states. (See S-function definitions.) 

2. It is assumed that the control system is implemented 

with a negative feedback connection. 

9 
3. It is assumed that the number of control system inputs 

is equal to the number of measurement outputs of the 

plant. Moreover, there is a straight connection 

between the measurement outputs of the plant and the 

inputs of the control system. 

4. It is assumed that the number of control system outputs is equal to or greater than the number of control 

inputs to the plant. However, it is assumed that only 

control system outputs 1 through the number of plant 

inputs are used in the feedback connection. Moreover, 

the feedback connection is a straight connection. 

Solution Check File 

PLATSIM provides the capability to accept or reject 

a solution of the nonlinear controller integration through 

the use of the user-supplied so1chk.m input file. By 

using this function (given the information on the previous as well as the current controller states and outputs), 

the user can implement a checking of the solution; that is, 

if the conditions are not met, the current solution is 

rejected, and a smaller recommended step size is provided by so1chk.m. The first line of file so1chk.m 

must have the form 

function [han]=solchk(z2,u2, zl,ul,h) 

where the input parameters 22, u2, zl, ul, and h are 

defined as 

z 2 : current controller state vector 

u2 : current controller output vector 

z 1: previous controller state vector 

ul: previous controller output vector 

h: integration step size 

The output parameter han must be set to h, if the 

user accepts the solution. If the solution is rejected, han 

should contain the recommended new integration step 

size, which must be less than h. 

Nonlinear Reaction Wheel Friction 

As an example of controller solution checking, consider the problem of nonlinear reaction wheel friction 

model (stiction); see figure 2, “Reaction wheel friction 

characteristics.” 

Nonstiction condition. If the wheel speed is nonzero, or if the magnitude of the applied torque is greater 

than or equal to the stiction torque (static friction torque), 

the reactive torque is given as 

Trenct = -J,b>, 

Friction 

torque 

’ 

t 

static P friction t 

I Wheel speed 

Figure 2. Reaction wheel friction characteristics. 

where Trent, denotes the reactive torque (output torque), 

J, represents the inertia of the reaction wheel, and hW 

represents the wheel speed rate. 

Stiction condition. If the wheel speed is zero and the 

magnitude of applied torque is also less than or equal to 

the stiction torque (see fig. 3, “Stiction Condition”), the 

reactive torque is given as 

‘react =o 

The wheel speed would stay at zero until the applied 

torque becomes larger then the stiction torque (static friction torque). 

T 

B 

v) 8 Time 

+ 

Estimated zero crossing 

attime, T, 4 

Figure 3. Stiction condition. 

From the previous equations, it is obvious that the 

reactive torque is not a continuous function of b,. 

Moreover, it is quite possible that in the process of 

advancing the states of the nonlinear control system, 

which includes the nonlinear model of the reaction 

wheel, an integration step may come about wherein (a) a 

zero-crossing of the wheel speed occurs, and (b) the 

applied torque at the time of wheel speed zero-crossing is 

10 
less than or equal to the stiction torque; that is, stiction 

has occurred. Thus, the current solution of the integration 

is not valid because it did not model the behavior of the 

wheel properly by predicting and taking the stiction of 

the wheel into account. For example, if from the states 

and outputs it is determined that a stiction condition may 

have occurred in the vicinity of point “s”, at time T, 

the integration with a step size of T, or some fraction of 

I 

I 

I from the previous step, the user may recommend retrying 

T, 

I 

I 

The solution check is provided to give the user the 

capability of altering integration step sizes and state values to accommodate for discontinuities associated with 

some nonlinear devices. A solution check file for the 

stiction of reaction wheels in the EOS-AM-1 example is 

provided in appendix C. Note that in this example file, 

the checks on the zero crossing of the wheel speed and 

the friction torque crossing of the applied torques are performed by using linear interpolation between the previous and current values. 

11 
Chapter 3 

Analysis Methodology and Options 

PLATSIM includes novel algorithmic features that 

provide efficiency of all calculations while constituting 

enabling technology in some cases. PLATSIM exploits 

the particular form of sparsity of the plant matrices both 

in the continuous-time and discrete-time forms, as used 

by the time domain analysis and the frequency domain 

analysis. 

Time Domain 

In the time domain analysis, PLATSIM performs a 

time simulation of the system by using the user-provided 

input data files (which define the model) together with 

the execution control parameters selected by the user. 

This simulation is optionally followed by a jitter analysis 

at the discretion of the user. PLATSIM assumes the following with regard to the plant and control system 

models: 

1. The plant model is assumed to be linear with model 

information provided, as described in chapter 2. 

2. The control system model can be either linear or nonlinear. See chapter 2 for the proper input file format. 

3. The control system can be modeled in continuous 

time or in discrete time. 

4. Hybrid control system models, consisting of 

continuous-time and discrete-time modules, are also 

permitted (in the nonlinear analysis only). 

5. The information needed to declare the type of control 

system is provided by the user through the linearity 

flag (execution control parameter linf lag) and the 

continuous-time flag (execution control parameter 

ct f lag). See “Execution Control Parameters” on 

page 16. 

Once the plant and the control system models have 

been defined, PLATSIM allows for two types of time 

analysis, linear and nonlinear. The user defines the type 

of analysis desired through the implementation flag 

(impf lag). See “Execution Control Parameters” on 

page 16. PLATSIM takes advantage of the sparsity of the 

spacecraft dynamic model system matrix to perform the 

linear or nonlinear analysis very efficiently. The reader 

should refer to reference 3 for a detailed description of 

this sparsity. To take advantage of the sparsity, 

PLATSIM assumes that the measurement outputs of the 

plant, which are inputs to the control system, are processed through a sample and hold analog-to-digital conversion; this is not a restrictive assumption because it is a 

routine procedure in almost all modem practical 

applications. 

Linear analysis. When using the previously mentioned assumption regarding the sample and hold applied 

to control inputs, the following applies to linear analysis: 

1. If the control system model is discrete time with a 

sampling period tsc, then time simulation is performed through algebraic propagation of the plant and 

the controller states, with the output updates occurring at the appropriate times (every t sd for the plant 

and every t sc for the controller). 

2. If the control system model is continuous time, the 

controller is still implemented in a discrete-time form. 

However, the sampling period tsc is chosen automatically by PLATSIM to be small enough; that is, 

the controller, for all practical purposes, is continuous 

time. Then, time simulation is performed through 

algebraic propagation of the plant and the controller 

states, with the output updates occurring at the appropriate times (every tsd for the plant and every tsc 

for the controller). 

The controller sampling rate is chosen to be one 

decade larger than the crossing frequency with the 

line 20 dB below the H-infinity norm (of the controller). A 40 dB line is used if the roll-off rate is 

less than 20 dB/decade. 

Users may define their own value for tsc (the 

value must be different from the default) to override its automatic computation. (See “Execution 

Control Parameters” on page 16.) 

3. The disturbances are interpolated by using linear 

interpolation as necessary. 

Nonlinear analysis. When using the assumption 

regarding the sample and hold applied to control inputs, 

the following applies to nonlinear analysis: 

1. In the nonlinear analysis, the sampled measurement 

outputs are used in one of seven nonlinear integration 

routines to propagate the states of the controller. 

These routines are as follows: 

Euler integration algorithm 

Second-order Runge-Kutta-Heun integration algorithm (with no error control) 

Second-order Runge-Kutta integration algorithm 

(with third-order error control) 

Third-order Runge-Kutta algorithm by BogackiShampine (with error control) 

Fourth-order Runge-Kutta-Hall integration algorithm (with error control) 

Fifth-order Runge-Kutta integration algorithm by 

Fehlberg (with error control) 

Modified Rosenbrock algorithm for stiff systems 

(with error control) 

13 
The desired integration routine is selected from the first 

element of vector imthd . (See “Execution Control 

Parameters” on page 16.) 

2. Three methods are available for the propagation of the 

plant states: 

Zero-order hold 

First-order hold 

Fourth-order Runge-Kutta-Hall integration 

algorithm (with error control) 

The desired integration routine is selected from the second element of vector imthd . (See “Execution Control 

Parameters” on page 16.) 

3. If the control system does not have discrete states, and 

if tsc is not defined by the user, then tsc is set 

propagation, as needed. 

t sc should be defined by the user. 

reject a solution of the nonlinear controller integration 

through the use of the user-supplied so1chk.m input 

file. (See “Solution Check File” on page 10.) The idea 

is that given information on the previous, as well as 

the current controller states and outputs, the user can 

implement a desired checking of the solution; that is, 

if the conditions are not met, the current solution is 

rejected, and a smaller recommended step size is provided by so1chk.m. 

6. The disturbances are interpolated by using linear 

interpolation as necessary. 

I equal to tsd by PLATSIM to perform controller state 

4. Note: If the control system has discrete states, then 

1 5. The user is provided with the ability to accept or 

Jitter analysis. The calculation of jitter by 

PLATSIM depends on a user-provided window (time 

interval). Each performance output time history is 

scanned from beginning to end by moving this window 

along it. At each window position in the scan, the maximum peak-to-peak variation of the portion of the time 

history within the window is noted. The biggest of these 

is observed as the window moves to scan the entire time 

history; this is the measure of jitter in this time history 

corresponding to this window. 

l 

In typical applications of this technology, time histories can contain on the order of a hundred thousand to a 

million points, and the various windows used in the analysis (there are typically several of them) can cover anywhere from a few hundred points to the entire time 

history. If jitter is calculated in the obvious way (by plating the window at the beginning of the time history, finding the peak-to-peak variation under the window, 

moving it one time step, finding the new peak-to-peak 

14 

variation, and repeating until the end of the time history 

is reached), then about k(n -k) references are being 

made to points in the time history for each window, 

where n is the number of points in the time history and 

k is the number of points under the window. The number 

of references to time history points can constitute a senous computational burden. 

PLATSIM uses an alternate algorithm (ref. 4), which 

has been shown to improve computational speed by three 

to four orders of magnitude, when compared with the 

obvious way of calculating using typical engineering 

problems. A single pass is made through the time history. 

If the jitter value is desired for more than one window, all 

are done in the same pass. A running tally is kept of jitter 

attributable to points which have passed out of the moving windows, and lists are kept of points still under any 

of the windows which might be significant in future parts 

of the jitter calculation. This single pass calculation can 

be done by making only (mu + b)n references to points 

in the time history vector, where n is still the number of 

points in the time history, m is the number of windows 

for which jitter is being calculated, and u and b are constants which are reasonably small and are independent of 

the actual lengths of the windows. Empirical observation 

has shown that u is about 0.3(a + b) , which implies that 

the time to calculate jitter for each window after the first 

is about 30 percent of the time that is taken for the first. 

Note: The user should refer to the section “Execution 

Control Parameters” at the end of this chapter for a 

complete listing and description of time domain and 

jitter analyses parameters. 

Frequency Domain 

In frequency domain analysis, PLATSIM computes 

the frequency response function matrix from a set of 

user-defined inputs to a set of user-defined outputs for a 

set of frequency points selected by the user. A new, original algorithm for the efficient computation of closedloop (as well as open-loop) frequency response functions 

for large-order systems has been developed and is implemented within PLATSIM. This algorithm exploits the 

particular form of sparsity (block diagonal with 2 by 2 

blocks) of the plant state matrices in both the continuous 

and discrete forms used by the frequency analysis, as 

well as the sparsity in the control input and disturbances 

influence matrices in the continuous form. This algorithm is an enabling technology for the analysis of largeorder systems, in general, and flexible space systems, in 

particular. A detailed description of a sample algorithm 

is provided in reference 5. Figures 4 and 5 on page 15 are 

block diagrams of open-loop and closed-loop systems 

with the various input and output types identified. 
PLATSIM frequency domain inputs 

1. Ref, Attitude or rate reference commands: valid with 

both open-loop and closed-loop analyses 

2. D, Disturbances at the plant input: valid with both 

open-loop and closed-loop analyses 

3. W, External disturbances: valid with both open-loop 

and closed-loop analyses 

4. M, Measurement noise: valid only with closed-loop 

analysis 

I PLATSIM frequency domain oulputs 

1. Err, Tracking errors: valid only with closed-loop 

2. U, Control input: valid with both open-loop and 

analysis 

closed-loop analyses 

D 

3. Yper, Performance outputs: valid with both openloop and closed-loop analyses 

4. Y, Measurement outputs: valid with both open-loop 

and closed-loop analyses 

PLATSIM makes the following assumptions and restrictions in frequency domain analysis: 

1. Control implementation must be linear (parameter 

impf lag set to ‘yes’). 

2. Control system may be continuous time or discrete 

time. 

3. Input or output types cannot be combined; for example, input: measurement noise and input: external disturbances cannot be analyzed simultaneously. 

W I 

Y 

Controller Plant 

Figure 4. Open-loop block diagram. 

Controller I 

+ 

M 

Figure 5. Closed-loop block diagram. 

15 
~ 

4. The smallest frequency used in the analysis must not 

approach zero because the frequency analysis problem becomes ill conditioned in the presence of rigidbody modes (or pure integrators) as frequency 

approaches zero. 

clflag 

desint 

5. Each flexible mode either must have positive damping, or its frequency must not be included in the frequency vector used for the analysis. 

both 

both 

Execution Control Parameters 

There are 38 execution control parameters within 

PLATSIM. These are MATLAB work space variables 

that are used to define the type, extent, methods, and 

options of analysis required by the user, as well as to 

control the output of the program. Some of these parameters have meaning to both time and frequency domain 

analysis, some only to time domain, and some only to 

frequency domain. Most of these parameters can be 

defined easily by using an interactive PLATSIM GUI 

(chapter 4). Execution control parameters can also be set 

by using commands from a prewritten script to run 

PLATSIM in the background. (See “Batch Mode” on 

page 32.) PLATSIM assigns a default value to all execution control parameters, with the exception of the 

parameter casenum. If PLATSIM is running in GUI 

mode, casenum is set by user responses to the “Disturbances” menu. In batch mode, casenum must be set 

before PLATSIM is called. The default values for most 

execution control parameters are specified in the userchangeable file defau1ts.m. Users are encouraged to 

customize defau1ts.m to fit their particular analysis 

needs. See appendix A for a listing of def ault s.m. 

Table 1. Specifications for Individual Execution Control Parameters 

Usage t casenum 

Type 

integer 

string 

integer vector 

string 

Description 

This variable is set to the number of the disturbance scenario to be used. PLATSIM will pass this value to usersupplied MATLAB function disdata.m. Can be set from 

GUI mode. 

This flag controls whether closed-loop or open-loop 

analysis is performed. For closed-loop analysis, set 

clf lag=’yes’, and for open-loop analysis, set 

cl f lag=’no’. Can be set from GUI mode. 

Determines which performance outputs will be used. If left 

undefined, all will be used. To use, set “desint” to a vector of instrument identification numbers. (These numbers 

appear in the third row of the pout matrix returned by usersupplied MATLAB function inst data.) Can be set from 

GUI mode. 

Defines whether linear or nonlinear implementation of the 

control system is used. For a nonlinear implementation of 

the control system, set impf lag=’no’. Can be set from 

GUI mode. The necessary control system files are automatically created by PLATSIM; that is, 

1. If the controller is linear, impf lag is set to ‘yes’, and 

an S-function is provided for the control system, an 

equivalent state space representation is created, and 

nlcon is set to f0rmscs.m. A file formscs.mat is 

also created to hold the controller data. 

2. If the controller is linear, impf lag is set to ‘yes’, and 

a state space representation is provided for the control 

system; no action is taken. 

3. If the controller is linear, impf lag is set to ‘no’, and a 

state space representation is provided for the control 

system, an equivalent S-function is created, and nlcon 

is set to platc-*.m, where the asterisk is replaced by 

the lowest integer that defines a unique file name in the 

current directory. 

16 
Table 1. Continued 

integer scalar, or 

vector 

sting 

real scalar 

Name 

Which structural modes to use in the analysis. The value 0 

means “all modes”. A positive integer n means “modes 1 

through n”. A negative integer -n means “only mode n”. A 

MATLAB vector such as [ 1 : 6,10, 13 : 161 means “use 

exactly the mode numbers in the vector”. Can be set from 

CUI mode. 

For time domain analysis, set tdf lag=‘yes’. Set 

tdf lag=‘no’ for frequency domain analysis. Can be set 

from CUI mode. 

Parameter t sc defines the controller sampling period. If 

the controller is discrete time, the user should provide the 

sampling time of the controller (or the default value would 

be used). The value of tsc for a continuous time controller 

is based upon the following: if the user has provided a preferred value, it will be used; otherwise, a sufficiently small 

sampling time is automatically computed and used. Can be 

set from GUI mode. 

Usage Type I Description 

impflag both sting 4. If the controller is nonlinear, impf lag is set to ‘no’, 

and an S-function is provided for the control system; no 

action is taken. 

5. If the controller is nonlinear, impf lag is set to ‘yes’, 

and an S-function is provided for the control system, an 

equivalent state space representation is created, and 

nlcon is set to f0rmscs.m. A file formscs.mat is 

linflag both sting If the control system is linear, set linflag=’yes’. For 

nonlinear control systems, set linf lag=’no’. Can be set 

from CUI mode. 

A mnemonic forplor hold, phold is the number of seconds 

a time history, Bode plot, or jitter analysis table will remain 

on-screen before being cleared for the next plot. See note 1 

at the end of table. 

phold both real scalar 

both sting In time domain analysis, plt f lag=’yes’ causes reduction of time history data for plotting and writing of MATfile with reduced time histories. In both analyses, causes 

plots (time history or Bode) to be displayed on-screen. Disable by setting plt f lag=’no’. Can be set from CUI 

mode. 

both sting If plt f lag is set to ‘yes’, this causes the encapsulated 

PostScript forms of the plots to be written to files. Disable 

by setting prt f lag=’no’. Can be set from CUI mode. 

nlcon both string The name of the MATLAB M-file which contains the 

S-function that describes the linear or nonlinear controller. 

Can be set from CUI mode. 

Determines what interface mode PLATSIM runs in. Set 

runmode=’batch’ before entering the platsim command to run in batch mode. Only the fist character of runmode is significant and may be of either case. 

runmode both sting 

mode both 

tdflag both 

tsc both 

17 
Table 1. Continued 

Name Description 

abstolc 

Usage 

time 

Type 

real scalar Absolute error tolerance used in the nonlinear integration of 

the controller. See note 1 at end of table. ~~ 

abstolp time real scalar Absolute error tolerance used in the nonlinear integration of 

the plant. See note 1 at end of table. ~~ 

If ct f lag is set to ‘yes’, the controller provided by the 

user is assumed to be continuous (no discrete states). If the 

controller has any discrete states, then set ctf lag=’no’. 

Can be set from CUI mode. 

Note: PLATSIM assumes that the input to the controller is 

discrete (sampled and held for one sampling period). See 

“Time Domain” on page 13. 

ctflag both string 

imthd time integer vector Determines the solution techniques used in the propagation 

of the controller and plant states. When controller implementation is nonlinear, impf lag is set to ‘no’. Parameter 

imthd is a 2-element integer vector, with the first element 

identifying the solution technique used in the propagation of 

the controller states and the second element identifying that 

used for the plant. Can be set from GUI mode. The options 

for the first element of imthd are 

1. Euler integration algorithm 

2. 2nd-order Runge-Kutta-Heun integration algorithm 

(with no error control) 

3. 2nd-order Runge-Kutta integration algorithm (with 3rdorder error control) 

4. 3rd-order Runge-Kutta algorithm by Bogacki-Shampine 

(with error control) 

5. 4th-order Runge-Kutta-Hall integration algorithm (with 

error control) 

6. 5th-order Runge-Kutta integration algorithm by 

Fehlberg (with error control) 

7. Modified Rosenbrock algorithm for stiff systems (with 

error control) 

The options for the second element of imthd are 

0. zero-order-hold integration 

1. first-order-hold integration 

2. fourth-order Runge-Kutta-Hall integration algorithm 

(with error control) 

time string Causes jitter analysis to be performed on time histories. Disable by setting j t r f lag=’no’. Can be set from GUI 

mode. 

lowmemflag time string If lowmemf lag is set to ‘yes’, and time-domain analysis 

or jitter analysis is requested, PLATSIM implements a 

memory efficient simulation and jitter analysis algorithm 

which reduces the required memory drastically, while paying a slight penalty on computational efficiency. Can be set 

from CUI mode. 

maxiter time integer scalar Maximum number of iterations allowed for convergence at 

each step of the nonlinear integration. See note 1 at end of 

table. 

18 
Table 1. Continued 

Name Usage Type Description 

multflag time sting If multf lag=’no’, a separate time simulation for each 

event in the disturbance scenario is performed. To simulate 

the effect of all disturbances simultaneously, set mu1 t - 

f lag=’yes’. Can be set from GUI mode. 

The parameter nplp t s is used in reducing the time histories for plotting. The data points to be plotted are divided 

into nplpt s nonoverlapping groups of consecutive points, 

the groups containing, as nearly as possible, the same number of points. See note 1 at end of table. 

nplpts time real scalar 

options time real vector options is a 3-element vector that defines the most commonly used parameters in the nonlinear integration. The 

first element defines the relative integration error tolerance, 

the second element defines the minimum step size allowed, 

and the third defines the maximum step size allowed. Can 

be set from GUI mode. 

both sting If pmf lag=’yes’ a performance meter is shown during 

simulation and that indicates what percentage of the calculation has been completed. Can be set from GUI mode. 

To save full, that is, not reduced time histories, set savef lag=’yes’. Can be set from GUI mode. 

solchkf lag is valid only with the nonlinear controller 

implementation in time domain analysis. If solchkf lag 

is set to ‘yes’, the nonlinear integration solution is checked 

against a set of user-defined conditions (provided in a 

MATLAB function in file so1chk.m; see “Solution Check 

File” on page 10); that is, if the conditions are met, the solution is accepted; otherwise, a smaller integration step is suggested by the user (as the output of so1chk.m). Can be set 

from GUI mode. 

saveflag time string 

solchkflag time string 

tclip time real scalar The parameter t cl ip is used for clipping the time histories. If the value entered is not zero, any data point corresponding to a time before t c 1 ip will be removed; that is, it 

will not be used for jitter computation. Units of tclip 

must match the units of parameter period returned by 

user-supplied MATLAB function di s tdata. This option 

is useful in the jitter analysis of steady-state disturbance 

sequences. May be set from CUI mode. 

window time real vector A vector whose nondecreasing and positive elements define 

the time windows to be used in the jitter analysis. window 

must be defined if jitter analysis is requested. May be set 

from GUI mode. 

bfrax frequency string If bf rax is set to ‘yes’, the Bode plot frequency axis units 

are set to radsec; otherwise, they are set to Hz. Can be set 

from GUI mode. 

If bmagax is set to ‘yes’, the Bode magnitude plot axis is 

presented in decibels; otherwise, it is presented in a logarithmic scale. Can be set from GUI mode. 

bmagax frequency string 

bodemthd frequency integer vector Determines the types of inputs and outputs for which a 

frequency response function is desired. bodemthd is a 

2-element integer vector, with the first element identifying 

the type of input and the second identifying the type of output. Can be set from GUI mode. The options for the fist 

element of bodemthd are 

1. attitude or rate reference commands (open loop and 

closed 100~) 

19 
Table 1. Concluded 

frqflag 

il 

iu 

npts 

usrfrq 

Name 

frequency 

frequency 

frequency 

frequency 

frequency 

bodemthd 

desinti 

Usage 

frequency 

frequency 

desinto frequency 

Type 

integer vector 

integer vector 

integer vector 

string 

real scalar 

real scalar 

real scalar 

real vector 

DescriDtion 

2. disturbances at the plant input (open loop and closed 

3. external disturbances (open loop and closed loop) 

4. measurement noise (closed loop only) 

The options for the second element of bodemthd are 

1. tracking errors (closed loop only) 

2. control inputs (open loop and closed loop) 

3. performance outputs (open loop and closed loop) 

4. measurement outputs (open loop and closed loop) 

loop) 

Determines which elements from the type selected (see 

“Frequency Domain” on page 14) will be used as the inputs 

for the frequency response analysis. If undefined, all inputs 

will be used. To use, set desint i to a vector of identification numbers of the desired elements. Can be set from CUI 

mode. 

Determines which elements from the type selected (see 

“Frequency Domain” on page 14) will be used as the outputs for the frequency response analysis. If undefined, all 

outputs will be used. To use, set desinto to a vector of 

identification numbers of the desired elements. Can be set 

from GUI mode. 

If f rqf lag is set to ‘yes’, model frequencies and, if 

defined, a user-prescribed frequency vector, provided in 

MATLAB variable usrf rq, are added to the frequency 

vector used in the frequency domain analysis. Can be set 

from CUI mode. 

The smallest frequency at which frequency domain analysis 

will be done is 10W. Can be set from CUI mode. ____ ___~ ___~ ~ 

The largest frequency at which frequency domain analysis 

will be done is 10Aiu. Can be set from CUI mode. 

The number of frequency points at which frequency domain 

analysis will be done is npts. Can be set from CUI mode. 

usrf rq is a MATLAB vector which contains the userdefined frequencies that are also used in the frequency 

domain analysis. f rqf lag must be set to ‘yes’ for this 

parameter to be used by PLATSIM. Can be set from CUI 

mode. 

Note 1. To run PLATSIM in GUI mode with a nondefault value for this parameter, it must be set by MATLAB 

assignment statement prior to invoking plats im. 

i 20 
Chapter 4 

Program Execution 

Overview 

As already stated, PLATSIM operates in the 

MATLAB technical computing environment of 

MATLAB version 4.2. The Mathworks, Inc. products, 

Control System Toolbox and SIMULINK, must also be 

available. In order to run PLATSIM, one must first start 

MATLAB. Furthermore, MATLAB must have access to 

the PLATSIM source code and the user-supplied data 

and M-files. Source code access is typically defined by a 

startup.m file that sets the MATLAB path variable 

automatically on initialization. 

GUI Mode 

A graphical user interface (GUI) has been developed 

for PLATSIM. PLATSIM’s GUI uses MATLAB’s Handle Graphics available in MATLAB version 4 or 5. The 

objective of this GUI is to provide the user with a convenient and intuitive way to set PLATSIM execution control parameters. A screen image of the PLATSIM GUI is 

shown in figure 6. 

Top-level graphical interface. The top-level interface consists of five menu buttons (MATLAB uimenu 

functions) and two slider controls (MATLAB 

ui cont rol functions). Additional, low-level, 

supporting interfaces have been developed to provide 

complete graphical access to all PLATSIM simulation 

and analysis features. See “Supporting graphical interfaces” on page 25. 

The Menu-Driven (GUI) Mode is the default execution mode and is invoked by typing platsim in the 

MATLAB command window. Normal execution of the 

PLATSIM GUI will create a file called plats im.mat , 

which contains parameters associated with various GUI 

functions. A complete description of all PLATSIM GUI 

features is given in this chapter. 

PLATSIM 

NASA 

Langley Research Center 

++ 

++ 

Version 2.0 

August 1995 

Figure 6. Graphical user interface for the PLATSIM package. 

21 
H Workspace (see fig. 7, “Workspace button pull-down 

menu .”) 

New Figure I 

Clear & Reset Defaults I 

Close Window I 

I H Options (see fig. 8, “Options button pull-down menu.”) 

Figure 7. Workspace button pull-down menu. 

New Figure 

The “New Figure” menu button simply executes 

the MATLAB command figure. The creation of a 

new figure is useful if graphical preprocessing or 

postprocessing of PLATSIM data is desired. 

Clear & Reset Defaults 

This menu button clears all (work space and global) variables and resets them to their default values. (See file defau1ts.m.) This menu option 

must be invoked between successive PLATSIM 

Nns. 

Save Session 

Selecting this menu button saves the current values of all PLATSIM variables to a binary “MATfile”. This utility, along with the “Load Session ...” 

menu button, allows users to quickly recover previous PLATSIM run-time variable settings. 

Load Session 

Loads a previously saved session file and sets all 

GUI object properties accordingly. 

Save Workspace 

This menu button simply executes the MATLAB 

save command. All work space variables are 

saved on disk using the default file name 

mat 1 ab.mat . 

Close Window 

This menu button closes the main PLATSIM GUI 

window. 

Modifv Plant Model P 

Plotting & Printing *c 

Feedback Connection fl 

Jitter Analvsis /I 

Save Output Time History 1 

Figure 8. Options button pull-down menu. 

Modify Plant Model 

This menu button has two submenu selection 

options: “Frequencies” and “Damping Ratios”. 

These submenu items allow the user to graphically modify or define both frequency uncertainties and modal damping ratios. Details for using 

these submenu options are described in “Supporting graphical interfaces” on page 25. 

Plotting & Printing 

The “Plotting & Printing” submenu button provides the user with three plot control options: “No 

Plotting”, “Plot Results”, and “Plot with Hardcopy”. The “Plot with Hardcopy” option will plot 

the analysis results on the screen and save datareduced versions of the plots in encapsulated 

PostScript files. 

Feedback Connection 

This menu button allows the user to select 

between open-loop, cl f lag= ‘ no ’ , and closedloop, c 1 flag= ’ yes ’ , analysis modes. Specific 

controller models are prescribed in the “Set 

Analysis Parameters” graphical interface under 

the “Analysis” menu button. 

Jitter Analysis 

This menu button has three submenu selection 

options: “Perform Jitter Analysis”, “Memory 

Conservative Mode”, and “Jitter Windows”. 

Selecting “Perform Jitter Analysis” sets 

j trf lag=’yes’ which invokes the baseline 

postprocessing jitter analysis algorithms. If the 

“Memory Conservative Mode” (1 owmemf lag= 

’yes’) is selected, jitter values are calculated as 

time history data are generated. Therefore, 

creating and postprocessing potentially very 

large time history response vectors are not 

lowmemflag=’yes’ and saveflag=’yes’ is 

not valid because time history results are not 

available to write to disk. Selecting “Jitter Windows” opens an additional graphical interface 

(see fig. 9, “Jitter window interface,” on page 23) 

for the selection of various jitter windows from 

required. The combination of 

22 
Figure 9. Jitter window interface. 

either the predefined push buttons or by entering 

arbitrary time values in the text field at the bottom 

of the interface. 

Save Output Time History 

The “Save Output Time History” submenu button 

provides the user with the option to save the complete output time history data; that is, variables y 

and instr will be saved if this option is 

selected; that is, savef lag=’yes’. Note that 

selecting this option has the potential of creating a 

very large file(s) and therefore should be used 

with caution. The output data will be saved in the 

file(s) labeled yl .ma t and, if necessary, y2 .mat, 

y3 .mat, and so on-as many as necessary so that 

there is one for each disturbance event. 

W Analysis (see fig. 10, “Analysis button pull-down 

menu.”) 

Frequency Domain Analysis 

Set Analysis Parameters 

Display Parameters 

I ” “....__l.l__ll.--- 

C Progress Meter 

~~ ~ 

Figure 10. Analysis button pull-down menu. 

Time Domain Analysis 

Selecting this menu button specifies that time 

domain analysis will be performed; that is, 

tdf lag=’yes’. The time domain and frequency 

domain modes are mutually exclusive options; 

that is, PLATSIM does not allow for simultaneous time and frequency domain analyses. 

Frequency Domain Analysis 

This button specifies that frequency domain analysis will be performed; that is, tdf lag=’no’. 

When frequency domain analysis is selected, the 

clip window slider and text in the lower right corner of the main PLATSIM GUI will disappear. 

Set Analysis Parameters 

This menu button invokes supporting graphical 

interfaces that are used to define various integration and analysis parameters. The interface that is 

displayed when this button is pressed is dependent on the status of tdflag and clflag. See 

“Supporting graphical interfaces” on page 25. 

Display Parameters 

Selecting the “Display Parameters” button will 

echo the current values of PLATSIM parameters 

in the MATLAE3 command window. 

Progress Meter 

If “Progress Meter” is selected, a graphic meter is 

displayed showing the percent completion of the 

23 
simulation of the response to the current 

disturbance event or of the current frequency 

domain analysis. 

Begin Analysis 

Selecting “Begin Analysis” executes the 

MATLAB script file p1attime.m or platf req . m for time or frequency domain analysis, 

depending on the analysis requested. Once an 

analysis has been started, all GUI functions are 

disabled. User control of the GUI will not be 

returned until the analysis has been completed. As 

for MATLAB version 4.2 or 5.0, the user may terminate the analysis at any time by sending an 

interrupt signal (Control C on most UNIX 

workstations) from the MATLAB command window. If MATLAB is unresponsive to the interrupt 

signal, most UNIX systems will respond to the 

suspend signal (typically, Control Z). The user 

resorting to this expedient should remember to 

ki 11 the suspended process. 

H Inputs/Outputs (fig. 11). 

Performance Outputs ... Select Disturbances,,. 

Run Disturbances Together 

I 

Figure 1 1. Inputsloutputs button pull-down menu. 

Performance Outputs 

Selecting the menu item labeled “Performance 

Outputs” provides access to the performance output selection figure window (see “Performance 

output selection interface” on page 31). See “Supporting graphical interfaces” on page 25. 

Select Disturbances 

This menu button allows the user to interactively 

select a disturbance model to be used in the 

PLATSIM analysis. See “Supporting graphical 

interfaces” on page 25. 

Run Disturbances Together 

This menu button controls whether several simulations are run, one for each individual disturbance event, or whether all disturbance events 

acting simultaneously are simulated. Ifjitter analysis is performed without selecting “Run Disturbances Together, ” the jitter contributions from 

each of the individual disturbance events are 

added together to give a total jitter. For the purpose of determining overall response at various 

output locations, the “Run Disturbances 

Together” option may provide more useful 

results. Selecting “Run Disturbances Together” 

sets the work space variable mult f lag= ’yes ‘ . 

Warning: Running disturbances separately 

requires a separate simulation for each disturbance event. Disturbance scenarios which have 

many separate events may require excessive 

CPU time to complete. 

H Quit 

QuitMATLAB 

This button simply quits the current MATLAB 

session without saving any work space variables. 

H Number of Modes 

A slider control which is situated at the lower lefthand side of the top-level interface may be used to 

set the number of modes (PLATSIM variable 

mode) which is to be included in the analysis. The 

slider allows the user to move, with a mouse, a sliding bar which sets the numeric input to the value that 

appears in the text field of the slider. The mode(s) to 

be used in the analysis may also be changed by clicking the mouse in the text field and typing the desired 

scalar or vector values. A scalar entry of 100 is 

equivalent to [ 1 : 10 0 I in MATLAB notation; that 

is, the first 100 modes will be used in the simulation. 

Vector entries are used when multiple mode ranges 

are desired or when mode range starting points do 

not include the first mode. All vector entries must 

follow MATLAB’s syntax. For example, to capture 

the rigid body response plus the flexible body 

response between modes 100 and 200, the user 

would enter [ 1 : 6 100 : 2 00 3 in the slider’s text 

field. Negative scalar values are also permitted, and 

are used to indicate that a single mode will be used 

in the simulation, for example, if a text field entry of 

- 1 0 0 is used, only mode 100 will be used in the 

simulation. A slider value of 0 implies all available 

modes will be used in the simulation. 

H Enter Clip Window 

This GUI item is used to define the clip window 

(tclip) used in time domain analysis. The functionality of this slider is similar to the mode slider. 

Definition of the t c 1 ip execution control parameter is provided in “Execution Control Parameters” on 

page 16. 

24 
Supporting graphical interfaces. Supporting graphical interfaces are accessed from either the top-level 

menu buttons or from other support interfaces. All 

top-level menu button labels ending with the ellipsis 

symbol (...) access a supporting interface. Instructions for 

each supporting interface are presented below in an itemized list, with each item label specifying the menu path 

from the top-level menu buttons. For example, the 

description of the frequency modification interface has 

this label: Options -> Modify Plant Model -> Frequencies ..., which implies that it is accessed from the toplevel “Options” button under the “Modify Plant Model” 

submenu button. 

All PLATSIM’s GUI routines operate in an asynchronous input mode, with the exception of the disturbance selection GUI, which is a synchronous process. 

Synchronous processing temporarily suspends other 

MATLAB processes and waits for the user to respond to 

the current synchronous process before continuing. 

Therefore, once the “Select Disturbances. ..” button is 

pressed, a disturbance selection should be made before 

attempting to access other PLATSIM features. 

W Options -> Modify Plant Model -> Frequencies ... 

Selecting the “Frequencies” submenu button of the 

“Modify Plant Model” option provides the user 

access to the Spacecraft Modal Uncertainty Graphical User Interface tool shown in figure 12, “Spacecraft modal uncertainty interface.” Note: Each time 

the “Frequencies” submenu button is selected, 

frequency values as defined in fde(s) omega. dat 

or omega. mat are used as the initial values. This 

interface tool has two options for adding modal 

uncertainties to the plant structural model. The two 

types of uncertainties considered are constant scaling 

and random scaling. The constant scaling uncertainties are defined as follows: 

00 

j at* = ai +ai xs 

Whereas the random scaling uncertainties are defined 

00 ai* = ai +ai xRixSj 

_i - ___- 

Figure 12. Spacecraft modal uncertainty interface. 

25 
The variable Si in the above equations represents 

user-defined constant scale factor(s) for each prescribed 

range, and Rj represents a set of random numbers, one for 

each mode, uniformly distributed over the interval (0,l) 

(by the MATLAB random number generator rand). 

modes (frequency) 

The frequency spectrum axis may be changed 

from “Mode Number” (which is the default setting) to “Frequency (Hz)” by using the top pushbutton on the interface. 

Reset 

The “Reset” button resets the frequency uncertainty scale factors to zero for all modes and sets 

the number of ranges to three. 

range 

The frequency spectrum, as defined in file(s) 

omega.dat or omega.mat, may be subdivided 

into several intervals (ranges) to allow for different levels of uncertainties for different modes 

within the frequency spectrum. A “range”, as 

defined by the interface, is denoted by the interval 

(a,b], where “a” and “b” are the lower and upper 

bounds on the interval, respectively. For example, 

if a = 10, and b = 20, all modes starting from 11 

through 20 (including mode 20) will have the 

same S factor. The lower and upper bounds 

(“range” label on the GUI) for the interval may be 

changed by using a mouse to “click-and-drag” on 

the vertical lines that are used to represent interval 

ranges. 

value 

The scale factors (“value” label on the GUI) may 

also be changed by using a mouse to “click-anddrag” on the shaded regions between the vertical 

lines. Both “range” and “value” may be changed 

by using keyboard entries once the corresponding 

graphical element has been activated. A “range” 

or “value” element is activated by using the 

mouse to “click” on a vertical line or shaded 

region, respectively. Once a graphical element 

has been activated, its numeric value will be displayed in the “range” or “value” text area of the 

graphical interface. 

Ranges 

The user may change the number of ranges by 

selecting the interface button labeled “Ranges”. 

Scaling 

A user may choose between the two allowable 

types of scaling by selecting “constant” or “random” from the “Scaling” button (constant is the 

default setting). 

mode by mode 

See item: Options -> Modify Plant Model -> Frequencies ... -> mode by mode 

File 

The “File” button allows the user either to save 

the current frequency uncertainties to a “.mat ” 

file or load a preexisting “.mat ” file containing 

frequency uncertainties. 

Close 

This menu button closes the Spacecraft Modal 

Uncertainty Graphical User Interface. 

mOptions -> Modify Plant Model -> Frequencies ... -> 

Selecting the “mode-by-mode” button from the 

Spacecraft Modal Uncertainty Graphical User Interface provides access to a graphical interface which 

allows convenient mode-at-a-time frequency modifications. Figure 13 on page 27 shows a screen image 

of the mode-by-mode graphical interface. This interface gives the user a list of frequencies of all modes 

in a read only text window displayed on the right 

side of the interface. 

mode by mode 

Frequency of Interest (Hz) 

The user can scan the list of frequencies to select a 

particular mode using the “Frequency of Interest” 

text field. In figure 13, “Mode-by-mode frequency modification interface,” on page 27, a 

value of 1 Hz has been entered as the frequency of 

interest, and mode 25 was determined to be the 

closest mode, 1.0184 Hz. 

Desired Value (Hz) 

In figure 13 on page 27, the value of the currently 

selected mode, 1.0184 Hz, may be changed by 

either deleting the text and reentering a new 

value, or by scaling it using any arithmetic operator, for example, +, -, * (for multiplication), or / 

(for division). 

Change Selection 

The user can also scroll through the list of frequencies using the “Change Selection” buttons. 

The value in Hz of the currently selected mode 

will be displayed in the “Desired Value” text 

field. The currently selected mode is the mode 

that is between the two horizontal dashed lines. 

I 26 
Figure 13. Mode-by-mode frequency modification interface. 

Reset 

The “Reset” button restores the modal frequencies 

to their nominal values, that is, those defined with 

the interface in figure 12 on page 25. 

Undo 

The “Undo” button clears only the last frequency 

modification. 

Close 

The “Close” button closes the interface and 

accepts all frequency changes. 

W Options -> Modify Plant Model -> Damping Ratios... 

Selecting the “Damping Ratios” button from the 

“Modify Plant Model” menu provides the user 

access to a graphical tool for defining/modifying the 

spacecraft modal damping schedule. The operation 

of the damping schedule graphical interface is very 

similar to the frequency modification graphical interface. The graphical damping tool allows users to easily modify the structural damping ratios. Structural 

damping ratios and ranges are specified by using a 

mouse to “click and drag” on graphical elements that 

represent modal damping ratios and ranges. 

Keyboard entries are also permitted once a modal 

damping range or value element has been activated 

by a mouse click (see above frequency modification 

description for definition of ranges, values, and 

active elements). Damping schedules may also be 

saved or loaded by using the “File” button. This tool 

uses, as its default damping schedule, the schedule 

defined in the user-changeable file mkdamp.m. If 

mkdamp.m has not been defined, then a default 

damping schedule of 0.25 percent is assumed for all 

modes. 

W Analysis -> Set Analysis Parameters... (time domain 

This interface provides access to various PLATSIM 

time domain analysis parameters. See figure 14 on 

page 28 for a screen image of this interface. As 

mentioned in “Top-level graphical interface” on 

page 21, the interface that is displayed when the “Set 

Analysis Parameters” button is pressed is dependent 

on the status of tdf lag and clf lag. The following five time domain analysis features are accessible 

with this interface: 

analysis) 

27 
’Click’ on Plant, G(S), 

or Controller, K( S) 

to set integration 

parameters, 

1. ..................... ... ..... .. .. ........ . . .. . 

Max Step 

Tole ran ce 

~ 

Figure 14. Set analysis parameters interface (time domain). 

Controller Definition 

Pressing the “Name & Type” button opens the 

GUI shown in figure 15 on page 29. In this window, the user must enter the controller file name 

and select whether it is a linear or nonlinear 

controller. The file name is stored in string 

variable nlcon and the type is in string variable 

linf lag. 

Controller Implementation 

The linear or nonlinear implementation methods 

(impf lag) can be selected by using this interface. See “Time Domain” on page 13, and 

“Execution Control Parameters” on page 16 for a 

complete description of controller implementation methods. 

Continuous- or Discrete-Time Controller 

PLATSIM variable ct f lag is set using the buttons labeled: “continuous”, “discrete”, and variable tsc is defined in the “sample time” text 

field. Select “discrete” (ct f lag=’no’) for 

mixed-time controllers, that is, for controllers 

with both continuous and discrete states. 

Controller Integration 

The desired nonlinear controller integration routine may be selected from the pop-up menu on the 

“Controller Integration” panel. The additional 

integration parameters that can be set with this 

interface are minimum step size, maximum step 

size, and relative error tolerance. 

Plant Integration 

The choice of three plant integration routines are 

available in this release of PLATSIM. The pop-up 

menu on the “Plant Integration” panel provides 

the interface to these choices: zero-order hold, 

first-order hold, and Runge-Kutta 34. 

Analysis -> Set Analysis Parameters... (frequency 

domain analysis) 

This interface provides access to various PLATSIM 

frequency domain analysis parameters. See 

figure 16, “Set analysis parameters (closed loop, frequency domain),” on page 29 for a screen image of 

this interface. The following six frequency domain 

analysis features are accessible with this interface: 

28 
Controller Name 

Figure 15. Controller definition interface. 

Ref Err 

Y 

Controller + Plant 

e 

FREQUENCY BOUNDS 

(in powers ot 10) 

Upper Bound 

Lower Bound 

M 

'Click' on input and 

output symbols to 

define transfer 

function . Yellow are inputs 

Green are outputs 

FREQUENCY POINTS I 1 v Include mode! freqencles 1 [ 

Figure 16. Set analysis parameters (closed loop, frequency domain). 

29 
Bode plot units 

The magnitude and frequency units on the Bode 

plots are defined by using this interface. The variables corresponding to the magnitude and frequency units are bmagax and bfrax, 

respectively. See “Execution Control Parameters” 

on page 16. 

Frequencybounds 

Upper and lower frequency bounds are defined 

using this interface. The variables corresponding 

to the upper and lower bounds are iu and il, 

respectively. Both entries are in powers of ten, 

that is, loi1 and loiu. The units for the frequency bounds are defined by the parameter 

bf rax. 

Frequency points 

This panel has three options: include model 

frequencies (f rqf lag), extra frequency points 

(usrfrq), and the number of points (npts) at 

which frequency domain analysis will be done. 

Selecting the “Include model frequencies” button 

sets variable f rqf lag=’yes’, which augments 

the nominal frequency vector with model 

frequencies. The nominal frequency vector is 

defined by using the MATLAB command: 

1 og spac e( i 1, iu,np t s). See “Frequency 

Domain” on page 14, for a list of assumptions and 

restrictions for frequency domain analysis. 

Transfer function definition 

PLATSIM has the capability of performing Bode 

analysis on 16 closed-loop and 9 open-loop transfer functions. Transfer functions may be selected 

from the pop-up menu on the “Transfer Function 

Definition” panel or selected graphically by using 

the mouse to point and click on the block diagram 

inpudoutput symbols. See “Frequency Domain” 

on page 14 for a description of transfer function 

inputs and outputs. 

Controller 

Pressing the “Controller” button opens the same 

GUI shown in figure 15 on page 29. In this window, the user must enter the controller file name 

and whether it is a linear or nonlinear controller. 

The file name is stored in string variable, nlcon 

and the type is in string variable, 1 inf lag. 

Connections 

Selecting the button labeled “Connections” provides access to the graphical interface shown in 

figure 17, “Inputloutput connections interface,” 

30 

on page 31. Once a transfer function has been 

defined, specific inputloutput connections may be 

specified with this interface. Variables desint i 

and desinto (see “Execution Control Parameters” on page 16) are defined with this interface. 

The interface will display all possible inputs and 

outputs for a given transfer function. Inputs and 

outputs are labeled as input-xyz for inputs and 

output-xyz for outputs, where xyz is the 

unique identification number as specified in data 

files instdata.m and distdata.m. See 

“Instrument Data File” on page 4 for descriptions 

of identification numbers. To use the interface, 

select the inputloutput pairs and press the “Connect” button. Connections are made from each 

activated input to all activated outputs. In 

figure 17, “Inputloutput connections interface” on 

page 31, two separate sets of connections have 

been made; that is, input-2 is connected to 

outputs 1, 3 and 6, and input-6 is connected to outputs-3 and 4. (Also see fig. 18 on 

page 3 1, “Performance output selection interface.”) Input and output buttons can be activated 

individually by pressing each button separately, 

or in groups by using the middle mouse button 

and dragging a rectangle around the desired 

inputs and/or outputs. The “Delete All” button 

breaks all connections and sets desinti=[] and 

des into=[]. The “Delete” button, while activated, permits connections to be broken from 

individual inputs or outputs. Transfer functions 

using external disturbances as inputs require a 

disturbance scenario to be specified so that specific inputs may be correctly displayed. Therefore, if the “Connections” button is pressed before 

a disturbance is chosen, the user will be required 

to make a disturbance scenario selection using the 

interface shown in figure 19 on page 31 before 

individual connections can be specified. 

W Inputs/Outputs -> Performance Outpu t... 

Selecting the submenu item labeled “Performance 

Outputs” provides access to the performance output selection figure window shown in figure 18 on 

page 3 1. The performance output window provides a 

menu-driven method of selecting a full or partial set 

of output locations from those defined in the userdefined function instdata.m. This utility allows 

for a large database of output locations to be maintained in function instdata.m, without the computational expense of solving for all these outputs in 

every analysis. The labeling and grouping of the 

menu items for the performance output window are 

determined by the third field in the work space variable instr, which itself is defined in function 
II Delete 1 Delete AII j Done 1 

Figure 17. Input/output connections interface. 

I CHOOSE A DISTURBANCE MODEL 

~AVBASE~ CERES~ M SRI MODIS IMOPITTI ASTER[ 

Figure 18. Performance output selection interface. 

Figure 19. Disturbance module interface. 

31 
ins t da t a.m. All entries that have exactly the same 

character string in the third field of instr will be 

under the same pull-down menu, and this common 

character string will be used to title the menu group. 

See “Instrument Data File” on page 4 for more information on the instrument data file. The performance 

output selection figure window has three pushbutton 

functions. These buttons are used to select all outputs, deselect all outputs, or close the selection 

window, and are labeled “Set All”, “Clear All”, and 

“Close”, respectively. A user may select performance outputs individually, or as groups of outputs 

using the “Select All” option for each group, or all 

groups using the master “Set All” button. Any currently selected output may be deselected by simply 

reselecting the item, or using the “Clear All” button. 

An additional level of print control is available for 

each group of performance outputs using the “Print” 

button at the bottom of each group’s pull-down 

menu. Deselecting the “Print” button disables printing and plotting for all performance outputs under 

that menu heading. 

W Inputs/Outputs -> Select Disturbances... 

When the pull-down menu button labeled “Select 

Disturbances” is selected, an additional figure 

window with a top-level menu bar will appear; 

see figure 19, “Disturbance module interface,” on 

page 3 1. The disturbance window top-level menu 

bar is used to display labels pertaining to disturbance 

scenario groups that may consist of one or more disturbance scenarios. A single instrumentlsystem may 

have multiple disturbance scenarios. For example, a 

scanning telescope may have a disturbance scenario 

that describes the forces/torques related to the 

motion of a scanning mirror and a separate disturbance scenario for calibration operations. The entries 

in the cnames and dnames matrices (see 

“Disturbance Data” on page 7 for more details) provide the names for the disturbance scenario groups 

and the disturbance scenarios, respectively. A disturbance scenario may be selected from the pull-down 

menu with a single click from a mouse. Upon selec: 

tion, the appropriate disturbance models, as defined 

in the user provided file di s t dat a.m, will be executed and instrumentlsystem disturbance data will be 

loaded into the MATLAB work space. This process 

may take several seconds to complete, depending on 

the number of data points and the number of individual force and/or torque profiles that make up the disturbance scenario. Note that if the user attempts to 

run a simulation without first selecting a disturbance 

model, a warning message will be displayed with 

instructions to select a disturbance followed by the 

display of the disturbance module figure window. 

Batch Mode 

In batch mode, each PLATSIM execution control 

parameter is set either by the user with MATLAB assignment statements before the platsim command is 

entered or it is used with its default value. Execution control parameters may be set in an interactive MATLAB 

window, but it is primarily intended to provide a way to 

run PLATSIM in the background by using commands 

from a prewritten script. 

Batch Mode Operation 

Batch mode operation will be demonstrated with two 

batch mode examples. 

Example 1. MATLAB is started in a directory containing two files which are listed here, 

runp1at.m: 

startup .m and 

.............. .............. 

startup.m 

format compact 

path(’/scb3/usr5/eos/platdir’,path) 

path(’/scb3/usr5/eos/platdir/eos~eg’,path) 

runplat .m 

diary % generate a diary of the run 

runmode=‘b’; % run in batch mode 

tdflag = ‘n’; % perform frequency domain analysis 

mode = 40; % use first 40 modes 

clflag = ’n‘; % run Bode plot open loop 

casenum = 7; % use ’MODIS static imbalance’ disturbance 

.............. .............. 

.............. .............. 

.............. .............. 

% from the EOS-AM-1 example 

32 
prtflag = 'n'; 

desinto = 14; 

ndist = -2; 

phold = 120; 

platsim 

% do not write .eps files 

% only output is 'MODIS Pitch' 

% use only the second event from the 

% 'MODIS static imbalance' disturbance 

% give the user at least 2 minutes to look at plot 

%This shouldnow runa single input/single output 

% Bode plot using 1000 points logarithmically spaced 

% between .01 and 10,000. 

MATLAB is started and the command 

>> runplat 

is given. MATLAB performs the necessary calculations and displays the Bode plot. To exit from 

MATLAB, the command 

>> quit 

is given. Now two new files are in the directory, 

MODI S-s t at i c-imbalance-f req.mat , which 

contains the results of the Bode calculation in MATLAB 

readable form, and diary, which shows what 

occurred: 

PLATSIM initialization in progress ... 

Selected disturbance case: MODIS 

static imbalance 

Initiating Bode Plot for bodemthd 

=[3 31 

Task completed in 13.05 seconds 

Plot and print Bode plots Task 

completed in 8.16 seconds 

PROGRAM COMPLETED Total cpu time = 

22.72 seconds >> quit 

2204653 flops. 

Example 2 uses a batch operation utility such as the 

UNIX at command. First a command script is prepared 

and written to a file, for example, doit (line numbers 

are not present in the script; they have been added here 

for reference purposes): 

1. setenv DISPLAY 

2. /usr/local/matlab-4.2/bin/matlab 

<< EOF > mat-out 

3. diary 

4. runmode= ' b ' ; 

5. casenum=7; 

6. pmflag='n' ; 

7. platsim 

8. quit 

9. EOF 

A UNIX command such as SUN Solaris command 

at -m -f doi t 2 0 : 0 0 will wait until 8 p.m. and then 

start executing the commands in doi t . Line 1 of doi t 

may get around a problem MATLAB has on some systems while trying to run plotting commands without running them from a logged-in terminal. Line 2 starts 

MATLAB running and uses the following lines as input 

to MATLAB until it finds the line (9) matching the EOF 

in line 2. MATLAB then executes lines 3 through 8, 

causing it to run PLATSIM in batch mode by using disturbance number 7 (MODIS static imbalance) and by 

using defaults for all other run parameters except 

pmflag. When the job is done, the user can harvest 

results from the files created by PLATSIM. (See 

chapter 5, "PLATSIM Output.") 

33 
Chapter 5 

PLATSIM Output 

PLATSIM returns its results in two general manners, 

interactive and permanent. Interactive output includes 

MATLAB work space variables which are set to the 

results of PLATSIM calculations, plots, and tables displayed in MATLAB figure windows. Permanent output 

consists of a variety of files. The most useful of the 

PLATSIM work space variables can be captured in 

MATLAB MAT-files. Plots can be written as encapsulated PostScript files. Tables of jitter values are written 

as both ASCII files and in PostScript form. 

General file-naming conventions will be given first, 

and the modifications necessary to fit PC file-naming 

limitations will be given at the end of each section. 

Time Domain Analysis 

Full-time histories. The results of each simulation 

are contained in a variable y which contains one column 

for each performance measurement output and one row 

for each row in the user-supplied disturbance time histories used to drive the simulation. If the user needs these 

full-time histories, the user can elect to have them written 

to MAT-files (savef lag on page 19 and “Save Output 

Time History” on page 23). 

1. File yl.mat will contain the time history by using the 

first disturbance event or the simulation by using all 

events simultaneously. 

2. If there is more than one disturbance event and they 

are being run separately, the additional time histones 

are in files y2.mat, y3.mat, ... , up to as many as are 

needed. 

3. Each file contains the time history in variable y as 

previously stated, a scalar variable period that contains the time increment between discrete points of 

the simulation, and a character array instr whose 

rows contain the names of the performance outputs 

that are being simulated. 

4. Note: Depending on the numbers of performance 

outputs, the time steps of simulation, and the disturbance events, these files can be very large and 

can require significant disk space. 

Time history plots and reduced time history data. 

The user can elect to have the time histories plotted onscreen and further can elect to write encapsulated 

PostScript files of the on-screen plots. If the latter is chosen, a reduced form of the data is plotted. Although some 

simulations involved a hundred thousand or even a million time steps, the reduced data typically involve vector 

lengths of less than ten thousand. The reduction is performed in such a manner (ref. 3) that the visual effect of 

plotting the reduced data is virtually identical to that of 

plotting the full time history. Thus, the results are faster 

on-screen plotting, faster writing of encapsulated Adobe 

PostScript files, smaller PostScript files, and faster printing of these files by a PostScript printer. 

The following rules define how time history plot 

variable names are represented in the MATLAB work 

space: 

1. If each disturbance event is simulated separately, 

there is one time history plot variable for each combination of performance measurement output and disturbance event. 

2. If the disturbance events are run together, there is one 

time history plot variable per performance measurement output. 

3. The reduced data from a typical time history is contained in a MATLAB variable with a name which 

looks like ~113-1. 

The 113 is a performance output identification 

number taken from the third row of the usersupplied pout matrix. (See “Instrument data 

parameter pout “ on page 6.) 

The number 1 indicates that this is the response to 

the first event in the chosen disturbance scenario if 

events are run separately, or that this is a simulation using all the events simultaneously. 

If there is more than one event in the disturbance 

scenario, and if the events are being run separately, 

the reduced response to the second event will use 

the number 2 after the underscore, and so forth. 

The variable ~113-1 (or like variables) is a 

2-column matrix. Column 1 contains time data, 

and column 2 is the performance output data. 

The plots are made by plotting the second column 

of this variable as a function of the first column. 

The following rules define the file-naming 

convention used for the previously mentioned time 

history plot variables. All these variables are saved in 

a MATLAB MAT-file with a name such as 

MODIS-static-imbalance-l-time.mat. 

1. The MODIS-static-imbalance part of the 

name comes from replacing any blanks with underscore characters in the name for the disturbance used 

in this simulation. 

2. The number 1 is used if these data come from the first 

disturbance event in the disturbance scenario when 

events are being run separately, and it is also used if 

the events are run simultaneously. 

35 
3. If the events are being run separately, the second 

4. The time in the name distinguishes this file from a 

similarly named file from the frequency domain analysis part of PLATSIM. 

event would have the number 2. 

If the user chooses the option “Plot with Hardcopy”, 

PLATSIM writes encapsulated PostScript files of the 

plots, which the user can send to the printer. These files 

have names such as MODIS-Yaw-1-t ime.eps. 

1. The MODIS-Yaw part of the name comes from 

replacing any blanks with underscore characters in 

the name for the performance output used in this 

simulation. 

2. The number 1 and time follow the same convention 

as described in the previous paragraph. 

Jitter results andplots. If the calculation of jitter is 

elected, the results of the jitter calculation are available 

to the user in several forms. The following rules define 

how jitter work space variable names and file names are 

1. If disturbance events are run separately, the results of 

the jitter calculation for the first event are in 

MATLAB variable JITTERl; those for the second 

event (if any) are in JITTER2, and so forth. 

2. Each of these variables is a matrix with one column 

for each jitter window and one row for each performance output (the order of the rows is determined by 

the numerical order of the identification numbers of 

the performance outputs). 

3. The “total jitter” in the form of the sum of the individual jitter calculations is given in the variable 

4. If the disturbance events are run simultaneously, the 

results are in JITTER1 and JITTER, which, in this 

case, are identical. 

I 

I generated. 

JITTER. 

5. The variable JITTERl, JITTER2 (if defined), and 

so forth are preserved in the same files containing the 

reduced time histories (see the previous section). For 

example, JITTER2 would be in file 

MODIS~static~imbalance~2~time.mat following the example in the previous section. 

6. The variable JITTER would be written in a file 

namedMODIS-static-imbalance-time.mat. 

1 

The table of jitter values is displayed on the screen. 

1. If the events are being run separately, a table is presented for each event and another is presented for the 

jitter totals. 

The worst value in each column is displayed in a 

contrasting color for emphasis. 

These tables are also written in both PostScript and 

ASCII files. 

The PostScript format tries to emulate what is 

shown on the screen; however, if too many performance measurement outputs exist, the PostScript 

file prints two or more pages. 

The Postscript files for the individual disturbance 

event jitter results have names such as 

MODIS-static-imbalance-l-jitr.ps 

and 

MODIS-stat ic-imbalance-2-j it r.ps, 

while the table with overall totals is in 

MODI S-s tat ic-imbalance-j it r.ps. 

For the ASCII files, the names are the same except 

that the ps extension is replaced by out. 

2. If there is only one event in the disturbance scenario, 

or if the disturbance events are run simultaneously, 

The one jitter result is written to the files with 

names such as 

MODIS-static-imbalance-jitr.ps and 

MODIS-s t at ic-imbalance-j it r.out (no 

event number). 

Example. An example of time domain analysis and 

jitter analysis, which is based on the EOS-AM-1 spacecraft, is presented in appendix D. In the example, 

PLATSIM runs use the default values of all execution 

time parameters, along with the disturbance scenario 

MODIS static imbalance. 

File-naming conventions for PC’s. PC’s running 

under DOS (Disk Operating System) have limitations on 

which character strings may be file names. Letters are 

mapped to upper case. The file name may have, at most, 

eight characters, optionally followed by a period and an 

extension of one to three characters. Consequently, 

PLATSIM output files are given alternate names which 

conform to PC DOS restrictions, if the program is run on 

a PC: 

1. The file which was called, for example, 

MODIS-stat ic-imbalance-1-t ime.mat is 

now called JITTERl.mat. The file which was 

called, for example, 

MODIS-static-imbalance-time.matis now 

called JI TTER.MAT. 

2. The file which was called, for example, 

MODIS-s t at ic-imbalance-1-j it r.out is 

now called JITR-1.OUT. 

36 
3. The file which was called, for example, 

MODIS-static-imbalance-l-jitr.psis 

now called JITR.PS . 

4. The file which was called, for example, 

CERES2-Yaw-2-time.eps is now called 

P 9-2 -T.EPS . 

0 

0 

I 0 

0 

The number 9 comes from the identification number used for the instrument named CERES2 Yaw. 

The number 2 indicates the disturbance event 

number. 

The letter T indicates that the file contains a time 

history. 

Only single or double digit identification numbers 

are allowed for the performance outputs. 

Up to 99 events in a disturbance scenario are 

allowed. 

Frequency Domain Analysis 

Frequency response matrix. In frequency domain 

analysis, PLATSIM calculates either the open-loop or 

closed-loop frequency response matrix from a set of 

user-selected inputs to a set of user-selected outputs. As 

mentioned in the Instrument Data File on page 4, the 

inputs may be in the form of attitude or attitude rate reference commands, disturbances at the plant input, external disturbances, or sensor noise, if closed-loop response 

is requested, and in the form of attitude or attitude rate 

reference commands, disturbances at the plant input, or 

external disturbances, if open-loop response is requested. 

Similarly, the outputs may be in the form of tracking 

error, control effort, performance output, or measurement output, if closed-loop response is requested, and in 

the form of control effort, performance output, or measurement output, if open-loop response is requested. 

Moreover, all or a user-specified subset of the inputs or 

outputs may be chosen by the user. The vector of 

frequency points is generated from the execution control 

parameters defined by the user. (See parameters: il, iu, 

npts,clflag,usrfrq,and frqflag intablel.) 

The frequency response matrix is stored in a 

MATLAB work space array g. The size of array g is k by 

zxp, where k is the number of elements in the frequency vector, z is the number of selected inputs, and p 

is the number of selected outputs. Subsequently, the k by 

z x p gain matrix in decibels is stored in MATLAB variable m, and the k by z x p wrapped phase matrix in 

degrees is stored in MATLAB variable p. The frequency 

vector is stored in a MATLAB variable f rq. 

The variables f rq, g, m, and p are work space variables that are available to the user when PLATSIM 

completes the frequency domain calculations. These 

variables are also written in MATLAB binary form to a 

MAT-file following naming convention: 

1. 

2. 

3. 

4. 

If the inputs are reference commands, the file name 

would be ref erence-command-f req.mat. 

If the inputs are disturbances at the plant input, the 

file name would be 

input-disturbance-freq.mat. 

If the inputs are external disturbances, the file name 

would be 

MODIS-static-imbalance-freq.mat. The 

MODIS-static-imbalance part of the name 

comes from replacing any blanks with underscore 

characters in the name for the disturbance used in this 

analysis. 

If the inputs are measurement noise, the file name 

would be measurement-noise-f req.mat. 

Bodeplots. If plotting is requested, the Bode plots 

for the selected outputs in response to the selected inputs 

are plotted on-screen. If “Plot with Hardcopy” is 

selected, in addition to on-screen plots, PLATSIM writes 

encapsulated Adobe PostScript files of the plots. These 

files have the following naming convention: 

1. 

2. 

3. 

If the outputs are tracking errors, the file name 

would be t r ac ki ng-er r or-1-4-f req. eps . The number 1 corresponds to the identification number associated with the measurement output used in 

the analysis. The “4” corresponds to the identification 

number associated with the selected input. For example, if the input is an external disturbance, the 

number 4 indicates that the input used to generate the 

Bode plot corresponds to the disturbance event with 

identification number 4 for the disturbance scenario 

chosen. 

If the outputs are control effort, the file name would 

be control-input-1-4-f req.eps. The number 1 corresponds to the identification number associated with the actuator used in the analysis. The 

number 4 corresponds to the identification number 

associated with the selected input. For example, if the 

input is a reference command, the number 4 indicates 

that the input used to generate the Bode plot corresponds to a reference command for measurement output with identification number 4. 

If the outputs are performance outputs, the file name 

would be MODIS-Yaw-4-f req.eps. The 

MODIS-Yaw part of the name comes from replacing 

any blanks with underscore characters in the name for 

the performance output, supplied by the user, that is 

used in this analysis. The number 4 corresponds to the 

identification number associated with the selected 

37 
4. 

input. For example, if the input is an external disturbance, the number 4 indicates that the input used to 

generate the Bode plot corresponds to the disturbance 

event with identification number 4 for the disturbance 

scenario chosen. 

If the outputs are measurement outputs, the file name 

would be 

measurement-output-1-4-f req.eps. The 

number 1 corresponds to the identification number 

associated with the measurement output used in the 

analysis. The number 4 corresponds to the identification number associated with the selected input. For 

example, if the input is measurement noise, the number 4 indicates that the input used to generate the 

Bode plot corresponds to a measurement noise in the 

measurement output with identification number 4. 

An example of frequency domain analysis, which is 

based on the EOS-AM-1 spacecraft, is presented in 

appendix D. In the example, PLATSIM runs use the 

default values of all execution parameters except that 

tdf lag = ‘n’ selects frequency domain analysis, along 

with the disturbance scenario MODIS static 

imbalance. 

File-naming conventions for PC’s. As in the previous section on time domain analysis, the file-naming 

conventions just given will not work for Pc’s. The conventions used on PC’s are exemplified here: 

1. The frequency response matrix, the gain and phase 

matrices, and the frequency vector are stored in file 

FREQ.mat. 

2. The Bode plots, irrespective of the type of input or 

output, will be oli4-f.e~~. The letters o and i are 

prefixes that denote output and input, respectively. 

The number 1 denotes the identification number associated with the output (any form of output). The number 4 denotes the identification number associated 

with the input (any form of input). 

3. Using this naming convention, the identification numbers on inputs and outputs can each range from 1 

to 99 without violating the PC DOS file-naming limitation of 8 characters before the period. 

I 38 
Chapter 6 

Diagnostic Messages 

The error and diagnostic messages generated by 

PLATSIM are given below. The format used below gives 

a brief description of a scenario that may cause the error, 

the actual error message as seen in the MATLAB command window, followed by a recommended solution. 

In the GUI execution mode, if the “begin analysis” button is pushed before a disturbance is selected from the 

disturbance menu, PLATSIM displays the “PLATSIM 

DISTURBANCES” menu and the following message 

appears in the MATLAB window. 

A disturbance case was not specified, please select one 

now. 

Solution: Choose a disturbance from the pop-up menu. 

In the batch execution mode, if PLATSIM is executed 

without the execution control parameter casenum 

having been defined, the following message appears in 

the MATLAB window, and the execution of PLATSIM 

terminates. 

The batch mode disturbance variable ’cas enum’ is 

not defined. Please select a valid case number from 

file: ’distdata.m’ and resubmit ’platsim’. 

Solution: Assign a valid value to the execution control 

parameter casenum and restart the execution of 

PLATSIM. 

In the batch execution mode, if PLATSIM is executed 

with the execution control parameter casenum having 

been set to an invalid value, a message of the following 

form appears in the MATLAB window, and the execution of PLATSIM terminates. 

casenum=2 0 0, is not a valid disturbance case number. Select an integer between 1 and 15. 

Check batch mode input data. 

Solution: Assign a valid value to the execution control 

parameter casenum and restart the execution of 

PLATSIM. 

If the variables mapping, instdat, cnames, and 

dnames, as defined in the user-provided file 

di s t da t a . m, do not satisfy specific relationships, 

the following message will appear in the MATLAB 

window. 

Disturbance data is not correct! 

Solution: See “Disturbance Data” on page 7 for a complete description of di s t da t a . m variables. 

In the GUI execution mode, if the scalar parameter 

tclip contains a value greater than the simulation 

time, then a message of the following form appears in 

the MATLAB window. 

tclip (=1000) is larger than tfinal 

(=999.974) 

input a new value for t c 1 ip - - > 

Solution: Type in a valid value for tclip after the 

arrow, followed by a carriage return. 

If the scalar parameter tclip defined is greater than 

the simulation time and the execution mode is batch, 

the following message will appear: 

tclipislargerthan tfinal 

tclip is set to 0.5*tfinal. 

Solution: Adjust t c 1 ip or increase the simulation time. 

If any mode number chosen for analysis is greater than 

the number of modes available in the file omega.dat 

or omega.mat, the following message will appear in 

the MATLAB window and program execution will 

stop. 

An error has been detected in file 

formplnt. Maximum mode number chosen 

is greater than number of modes available. Program termination in formplnt. 

Solution: Check the mode numbers and restart the 

program. 

If the number of rows of array phi (in file phi.mat or 

phi.dat) is not an integer multiple of the number of 

modal frequencies defined in file omega.mat or 

omega.dat, the following error message will appear 

in the MATLAB window and program execution will 

stop. 

The number of rows of ”phi” (in file 

phi.mat or phi.dat) must be an integer 

multiple of the number of elements of 

’omega’ (in file omega.mat or 

omega. dat 1 . Program termination in 

f ormplnt . Solution: Make the phi and omega files consistent and 

restart the program. 

If a grid point defined in file instdata.m for the 

spacecraft control system input is not defined in array 

phi (in file phi.mat or phi.dat), the following 

error message will appear in the MATLAB window 

and program execution will stop. 

An error has been detected in file 

formp1nt.m. A FEM SCS input grid 

number as referenced in file 

instdata.m is not available in file 

phi.dat or phi-mat. Program termination in formplnt. 

Solution: Check the first row of parameter act in file 

instdata.m, check file phi.dat or phi.mat, and 

restart the program. 

39 
If a grid point used in file ins t da t a.m for the measurement outputs is not defined in array phi (in file 

phi.mat or phi.dat), the following error message 

will appear in the MATLAB window and program execution will stop. 

An error has been detected in file 

formp1nt.m. A FEM measurement output 

grid number as referenced in file 

instdata.m is not available in file 

phi.dat or phi.mat. Program termination in formplnt. 

Solution: Check the first parameter mout in file 

instdata.m and check file phi.dat or phi.mat, and 

then restart the program. 

If a grid point used in file instdata.m for the performance outputs is not defined in array phi (in file 

phi.mat or phi.dat), the following error message 

will appear in the MATLAB window and program execution will stop. 

An error has been detected in file 

formp1nt.m A FEM performance output 

grid number as referenced in file 

instdata.m is not available in file 

phi.dat or phi.mat. Program termination in formplnt. 

Solution: Check the first row of parameter pout in file 

instdata.3 check file phi .dat or phi .mat, and 

restart the program. 

If a grid point used in file di s t dat a.m for a disturbance sequence is not defined in array phi (in file 

phi.mat or phi.dat), the following error message 

will appear in the MATLAB window and program execution will stop. 

An error has been detected in file 

formp1nt.m. A FEM disturbance grid 

number as referenced in file 

distdata.m is not available in file 

phi.dat or phi.mat. Program termination in formplnt. 

Solution: Check file distdata.m and file phi.dat or 

phi.mat, and restart the program. 

If a step size smaller than the minimum step size, 

defined by the user, is required in the controller state or 

plant state propagation, the following error message 

will appear in the MATLAB window and program execution will stop. 

A step size smaller than the minimum is required in 

fi1ename.m. 

Note: Filename may take the name of any of the 

six routines that perform controller state or plant state 

propagation with step size control: rk2 3, rk3 2, rk3 4, 

rk45, rstiff, nlplnt4. 

Solution: (1) Decrease the minimum step size allowed 

from the GUI window or in variable option; 

(2) Increase the integration error tolerance from the GUI 

window or in variable opt ion. 

If the number of iterations in one integration step for 

the controller state or plant state propagation goes 

beyond the user-defined maximum number of iterations allowed, the following error message will appear 

in the MATLAB window and program execution will 

stop. 

Maximum number of iterations reached without convergence in f i lename . m 

Note: Filename may take the name of any of the 

six routines that perform controller state or plant state 

propagation with step size control: rk2 3, rk3 2, rk3 4, 

rk45, rstiff, nlplnt4. 

Solution: (1) Increase the maximum number of iterations 

allowed per step from the GUI window or in variable 

opt ion; (2) Increase the integration error tolerance 

from the GUI window or in variable opt ion. 

If the number of iterations in the solution check of the 

nonlinear controller goes beyond the user-defined maximum number of iterations allowed, the following error 

message will appear in the MATLAB window and program execution will stop. 

Maximum number of iterations reached without convergence in f i lename . m due to solchk. 

Note: Fi 1 ename . m may take the name of any of 

the four routines that perform controller state propagation: nlsim.m, nlsim2 .m, nlsim-m.m, 

nlsim-m2 .m. 

Solution: Increase the maximum number of iterations 

allowed per step from the GUI window or in variable 

opt ion. 

If an attempt is made to use the memory conservative 

feature of PLATSIM without having compiled the 

MEX-file for lmtime or trplomem, one of the following error messages will appear in the MATLAB 

window and program execution will stop. 

LMTIME: MEX-file for lmtime not found, cannot 

proceed. 

trp1omem.m: For 'help' only, must run the 

MEX-file from t rp 1 omem. c 

Solution: Compile the MEX-files for lmtime and 

trplome or do not attempt to run the memory conservative option. 

40 
IfPLATSIM function nlinitcl .m or nlinitol .m 

executes one of the commands exist ( ’nlsim’ ) , 

exist ( ’nlsim-m’ ), exist ( ’nlsim2 ’ ), 

exist ( ‘nlsim-m2’), or exist (’propgateo‘), 

and the answer is neither 2 (the name represents an 

M-file) nor 3 (the name represents a MEX-file), one of 

the following error messages will appear in the 

MATLAB window and program execution will stop. 

NLINITCL: failure setting ismex 

NLINITOL: failure setting ismex 

Solution: Make sure that none of these variables are 

being used in the wrong way (such as for a compiled 

SIMULINK function) and that the M-files (and 

MEX-files, if they exist) of these names are on the 

mat 1 abpa t h. 

NASA Langley Research Center 

Hampton, VA 23681-2199 

August 27,1997 

41 
Appendix A 

User-Supplied Routines for Earth Observing System EOS-AM-1 Example 

The following listings are examples of the routines to be supplied to PLATSIM by the user. These examples are 

based on the Earth Observing System EOS-AM-1 spacecraft and are distributed with PLATSIM. The user may want to 

use these examples as templates for writing the user-supplied routines for the platform that the user wishes to analyze. 

mkdamp.m 

function [d] =mkdamp(omega) 

% 

% function [dl =mkdamp (omega) 

% 

% purpose: to assign modal damping ratios 

% 

% input variables: 

% 

% omega : vector containing the natural frequencies 

% 

% output variables: 

% 

% d : vector of damping ratios 

% 

% 

% Author: Peiman G. Maghami 

% Spacecraft Controls Branch 

% NASA Langley Research Center 

% 

..................................................... 

% 

% damping schedule for the EOS-AM-1 Spacecraft 

% 

% damping ratio = 0.2% for modes with frequency less than 15Hz 

% damping ratio = 0.25% for modes with frequency greater than 15Hz 

% but less than 50Hz 

% damping ratio = 0.3% for modes with frequency greater than 50Hz 

for i=l:max(size(omega)) 

if omega(i)< 30.0*pi 

elseif omega(i)>=30.0*pi&omega(i)<lOO.O*pi 

else 

end 

d( i) =O .002; 

d(i) =Of 0025; 

d( i) =O. 003 ; 

end 

d=d’ ; 

in8tdata.m 

function [act,mout,pout,instrl=instdata 

% 

% function [act,mout,pout,instr]=instdata 

% 

% purpose: a user-defined routine to provide the grid 

43 
% point numbers, directions distribution/contribution 

% factors, and identification numbers for the 

% spacecraft instruments. It also provides names for 

% the performance outputs. 

% 

% 

% output variables: 

% 

% 

% act : control input information matrix 

% mout : measurement output information matrix 

% pout : performance output information matrix 

% instr : list of names for performance outputs 

% 

% 

% 

% Author: Peiman G. Maghami 

% Spacecraft Controls Branch 

% NASA Langley Research Center 

% August, 1993 

% 

% modified: P. G. Maghami 

% March, 1994 

% 

.................................................... 

% The following parameters are associated with 

% EOS-AM-1 Spacecraft. 

% 

.................................................... 

% define the spacecraft control input information 

% matrix (the ACS input at the RWA) 

% 

act=[155003,155003,155003; 

4, 5, 6; 

1, 2, 3; 

1.0, 1.0, 1.01; 

% 

% define grid points for the measurement feedbacks at 

% the NAVBASE 

% 

mout=[111091,111091,111091,111091,111091,111091; 

4, 4, 5, 5, 6, 6; 

1, 2, 3, 4, 5, 6; 

1.0, 1.0, 1.0, 1.0, 1.0, 1.0; 

0, 1, 0, 1, 0, 11; 

% 

% define grid points for performance outputs 

% [NAVBASE, CERES1, CERES2, MISR, MODIS-N, MOPITT, 

% SWIR, TIR, VNIR] 

% 

p~ut=[111091,111091,111091,350420,350420,350420, ... 
351420,351420,351420,333498,333498,3334981361203 ,... 361203,361203,396400,396400,396400,329722,329722, ... 329722,326989,326989,326989,325647,325647,325647; 

4,5,6,4,5,6,4,5,6,4,5,6,4,5,6,4,5,6,4,5,6,4,5,6,. . . 4,5,6; 

1,2,3,4,5,6,7,8,9,10,11,12l13,14,15,16l17,18,19,. . . 20,21,22,23,24,25,26,27; 

1,1'1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,. . . 1,1,1; 

o,o,o,o,o,o,o,o, 0,O' 0, 0'0,0,0, o,o, 0, o,o,o,o, o,o, . . . o,o, 01 ; 

% 

% convert the performance output units from rads 

% to arcsec 

% 

pout (4 I : ) = (180.0*3 600.0 /pi ) *pout (4, : ) ; 

% 

% 

% define the performance output names, display 

% and unit labels 

% 

instr=str2mat('llNAVBASE RolllNAVBASElarcsec','2lNAVBASE PitchlNAVBASEl 

arcsec' ) ; 

instr=str2mat(instr,'3 INAVBASE YawlNAVBASElarcsec'); 

instr=str2mat(instr,'41CERESl RolllCERESlarcsec','5ICERESl PitchlCERESl 

arcsec' ) ; 

instr=str2mat(instr,'6lCERES1 YawlCERESlarcsec'); 

instr=str2mat(instr,'7lCERES2 RolllCERESlarcsec','8lCERES2 PitchlCERESl 

arcsec' ) ; 

instr=str2mat(instr,'9lCERES2 YawlCERESlarcsec'); 

instr=str2mat(instr,'lOIMISR RolllMISRlarcsec','lllMISR PitchlMISRlarcsec'); 

instr=str2mat(instr,'12~MISR YawlMISRlarcsec'); 

instr=str2mat(instr,'l3~MODIS RolllMODISlarcsec','14lMODIS PitchlMODISl 

arcsec' ) ; 

instr=str2mat(instr,'15tMODIS YawlMODISlarcsec'); 

instr=str2mat(instr,'l6lMOPITT RolllMOPITTlarcsec','l7lMOPITT 

PitchJMOPITTJarcsec'); 

instr=str2mat(instr,'l8lMOPITT YawlMOPITTlarcsec'); 

instr=str2mat(instr,'l9lSWIR RolllASTERlarcsecf,'2OISWIR PitchlASTERl 

I 

arcsec' ) ; 

instr=str2mat (instr, '21 

instr=str2mat (instr, '22 

instr=str2mat (instr, '24 

instr=str2mat (instr, '25 

arcsec' ) ; 

instr=str2mat (instr, '27 

% 

SWIR YawlASTERlarcsec'); 

TIR RolllASTERlarcsec','23lTIR PitchlASTERlarcsec'); 

TIR YawlASTERlarcsec'); 

VNIR RolllASTERlarcsec','26lVNIR PitchlASTERl 

VNIR YawlASTERlarcsec'); 

distdata.m 

function [dist,w,dt,cnames,dnames,instdat, . . . 

%function [dist,w,dt,cnarnes,dnames,instdat, . . . mappingl=distdata(casenum,tdflag) 

mappingl=distdata(casenum,tdflag) 

I % 

45 
% Author: Sean P. Kenny 

% NASA Langley Research Center 

% Spacecraft Controls Branch 

% Created: 2/14/94 

% 

if nargin == 0 

casenun= 0 ; 

tdflag='yes' ; % This will not affect the 

9------------------------------------------------ 

% analysis, just the amount 

% of data generated (time spent) 

% here. 

elseif nargin == 1 

end 

% 

% 

% 

% Individual Instrument Disturbances: 

% 

% Defines labels for pull-down menus, also labels 

% for jitter tables, and time history plots. 

% 

% Note: 

% 

% A GUI menu item may be disabled by including a 

% preceding asterisk in the string variable, e.g., 

% s23='* High Gain Antenna', will be displayed, 

% but cannot be selected with the mouse. This feature 

% pertains to GUI mode ONLY ! Batch mode will allow 

% the selection of all entries. 

% 

% 

% 

sl='TIR repoint'; 

s2='TIR calibrate'; 

s3='TIR scan' ; 

s4='TIR chopper'; 

s5='TIR cryocooler LDE'; 

s6='MODIS scan mirror'; 

s7='MODIS static imbalance'; 

s8='MODIS dynamic imbalance'; 

s9='MOPITT mirror scan'; 

slO='MOPITT cryocooler LDE'; 

sll='MOPITT pressure modulated cells'; 

sl2='Reaction Wheel Assembly case 1'; 

s13='* Reaction Wheel Assembly case 2'; 

sl4='Solar Array Drive'; 

sl5='Solar Array Thermal Snap'; 

% 

% 

% 

% Combine individual cases into a matrix form using 

% function "stramat". 

% Note "str2mat" allows a maximum of 10 arguments per 

tdflag='yes'; 

46 
% call, therefore, multiple calls may be required. 

% Each individual case defined above represents a 

% row entry within the "dnames" string matrix. 

% 

dnames=str2mat (sl, s2,s3, s4, s5, s6, s7, s8, s9, s10) ; 

dnames=str2mat(dnames,sll,s12,sl3,~14,sl5); 

% 

% 

%-------------------------------------------------- 

% 

% 

% Disturbance Category Labels 

% (labels for top-level menu items on pop-up figure) 

% 

ssl='ASTER-TIR'; 

SS~='MODIS'; 

SS~='MOPITT'; 

ss4='Misc. Disturbances'; 

% 

% Combine Category Labels into a string matrix: 

% 

cnames=str2mat(ssl,ss2,ss3,ss4); 

% 

% 

% 

% Setup mapping between category labels and 

% disturbance case numbers. 

% 

% instdat [i] corresponds to the ith row in "cnames", 

% e.g., the vector instdat5 contains all case numbers 

% that are associated with the fifth row in "cnames". 

% The elements of the instdat[i] vector are the row 

% indices within the "dnames" string matrix. For 

% example, if the 4th, 5th, and 10th row entries in 

% "dnames" correspond to the category in the 5th row 

% of "cnames", then instdat5= [4,5,10] . % 

% The vector variable "mapping" is a pointer that 

% defines the number of cases in each category, e.g., 

% mapping(l)=8; implies that there are eight 

% disturbance cases associated with the first 

% category. 

% 

% 

instdatl= [l, 2,3,4,51 ; 

mapping= [ 3 ; 

linst=length (instdatl) ; 

mapping=[mapping,linstl; 

linst=length(instdat2); 

mapping= [mapping, linst I ; 

linst=length(instdat3); 

mapping=[mapping,linstl; 

instdat2=[6,7,81; 

instdat3= [9,10,111 ; 

47 
instdat4=[12,13,14,15]; 

linst=length(instdat4); 

mapping=[mapping,linstl; 

% 

instdat=[instdatl,instdat2,instdat3,instdat4]; 

% 

.................................................... 

% 

% Based upon menu selection, create the proper 

% disturbance input vector(s). 

% 

% 

% TIR Mirror Repointing 

% 

if (casenum == 1) 

% 326990 ==> scanner 

igrid= [3269901 ; 

idir=[4]; 

inurn= [l] ; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifacl; 

% get torque/force profiles for only time-domain 

if strcmp(tdflag(l), 'y') 

[dt,torquel = tirl; 

w( :, 1) =torque' ; 

end 

% 

% TIR Mirror Calibration 

% 

elseif (casenum == 2) 

% 326944 ==> chopper 

igrid= [3269901 ; 

idir= [ 4 1 ; 

inurn= [l] ; 

ifac=ones (size (inum) ; 

dist=[igrid;idir;inum;ifacl; 

if strcmp(tdflag(l), 'y') 

[dt,torquel = tir2; 

w ( : ,1) =torque' ; 

end 

% 

% TIR Scanner 

% 

elseif (casenum == 3) 

% 326990 ==> scanner 

igrid=[326990 326990 326990 326990 326990 3269903; 

idir=[l 2 3 4 5 61; 

inurn= [l: 61 ; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifacJ; 

if strcmp(tdflag(l), 'y') 

[dt,torque] = tirscanl; 

w( :, 1) =torque' ; 

[dt,torquel = tirscan2; 

w( :, 2) =torque' ; 

48 
[dt,torquel = tirscan3; 

w( :, 3) =torque' ; 

[dt, torque] = tirscan4; 

w( :, 4) =torque' ; 

[dt,torquel = tirscan5; 

w( :, 5) =torque' ; 

t [dt,torquel = tirscan6; 

w(:,6)=torque'; 

end 

% 

% TIR Chopper 

% 

elseif (casenum == 4) 

% 326944 ==> chopper 

igrid=[326944 3269441; 

idir=[l 21; 

inum=[l:21; 

ifac=ones (size(inum) ) ; 

dist=[igrid;idir;inum;ifac]; 

if strcmp(tdflag(l), 'y') 

[dt,torquel = tirchopl; 

w( :, 1) =torque' ; 

[dt,torquel = tirchop2; 

w ( : ,2 ) =torque ' ; 

I 

I 

end 

% 

% TIR Compressor/Displacer "Low Distortion Electronics" (LDE) 

% 

elseif (casenum == 5) 

% 326992 ==> compressor 

% 326993 ==> displacer 

igrid= [326992 326992 326992 326992 326992 326993 326993 326993 326993 3269931 ; 

idir=[l 2 4 5 6 2 14 5 61; 

inum=[l:lOl; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifac]; 

if strcmp(tdflag(l), 'y') 

[dt,torquel = tircal; 

w( :, 1) =torque' ; 

[dt , torque] = tirca2 ; 

w( : ,2) =torque' ; 

[dt, torque] = tirca3; 

w ( : ,3 ) =torque ; 

[dt, torque] = tirca4 ; 

w( :, 4) =torque' ; 

[dt, torque] = tirca5; 

w( :, 5) =torque' ; 

[dt, torque] = tirdal; 

w( :, 6) =torque' ; 

[dt, torque] = tirda2; 

w(:, 7) =torque' ; 

[dt,torquel = tirda3; 

w ( : ,8) =torque' ; 

[dt, torque] = tirda4; 

w ( : ,9) =torque' ; 

49 
[dt,torque] = tirda5; 

w( :, 10) =torque‘ ; 

end 

% 

% 

% MODIS scan mirror 

% 

elseif (casenum == 6) 

% 3601 ==> averaged interface 

% 361203 ==> scan mirror center 

% 361342 ==> scan mirror motor/encoder 

% 355349 ==> solar door 8/12/93 spk 

igrid= [361342] ; 

idir= [ 41 ; 

inum= [11 ; 

ifac=ones (size (inum) ; 

dist=[igrid;idir;inum;ifacl; 

if strcmp(tdflag(l), ‘y’) 

[dt,torquel = modisl; 

w( :, 1) =torque‘ ; 

end 

% 

% MODIS static imbalance 

% 

elseif (casenum == 7) 

% 361342 ==> scan mirror motor/encoder 

igrid= [361342 3613421 ; 

idir= [2 31 ; 

inum=[l:21; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifacl; 

if strcmp(tdflag(l), ‘y’) 

[dt,forl,for21 = modis2; 

w( :, 1) =forl’ ; 

w ( : ,2 ) =for2 ’ ; 

end 

% 

% MODIS dynamic imbalance 

% 

elseif (casenum == 8) 

% 361342 ==> scan mirror motor/encoder 

igrid= [361342 3613421 ; 

idir=[5 61; 

inum=[l:21; 

ifac=ones (size (inum) ; 

dist=[igrid;idir;inum;ifac]; 

if strcmp(tdflag(l1, ‘y’) 

[dt,torl,tor21 = modis3; 

w(:,l)=torl’; 

w( : ,2) =tor2‘ ; 

end 

% 

% MOPITT mirror scan 

% 

elseif (casenum == 9) 

I 50 
% 396400 ==> scan motor 1 

% 396403 ==> scan motor 2 

% 3608 ==> Avg. interface 

igrid= [396400] ; 

idir= [4] ; 

inum= [ll ; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifacl; 

if strcmp(tdflag(1) , 'y') 

[dt, torque] = mopitt; 

w( :, 1) =torque' ; 

end 

% 

% MOPITT Compressor/Displacer "Low Distortion 

% Electronics" (LDE) 

% 

elseif (casenum == 10) 

% 396416 ==> compressor 

% 396417 ==> displacer 

igrid=[396416 396416 396416 396417 396417 3964171; 

idir=[2 1 5 2 1 51; 

inum=[l:6]; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inu;ifacl; 

if strcmp(tdflag(l), 'y') 

[dt,torquel = mopittcl; 

w(:, 1) =torque' ; 

[dt,torquel = mopittc2; 

w( :, 2) =torque' ; 

[dt, torque] = mopittc3; 

w ( : ,3 ) =torque' ; 

[dt,torquel = mopittdl; 

w( :, 4) =torque' ; 

[dt,torquel = mopittd2; 

w( :, 5) =torque' ; 

[dt,torquel = mopittd3; 

w( : ,6) =torque' ; 

end 

% 

% MOPITT pressure modulated cell (PMC) 

% 

elseif (casenum == 11) 

% 396412 ==> PMC #1 

% 396413 ==> PMC #2 

igrid=[396412 3964131; 

idir=[l 13 ; 

inum=[1:21; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inu;ifacl; 

if strcmp(tdflag(l), 'y') 

[dt,pmcl,pmc21 = mopmc; 

w(:, 1) =pmcl' ; 

w( : ,2) =pmc2' ; 

end 

% 

51 
% 

% Reaction Wheel Assembly (RWA) Imbalance: Case 1 

% 

% ** static imbalance in wheel #1 ** 

% 

elseif (casenum == 12) 

% 50600 ==> RWA averaged interface 

% 155003 ==> RWA 1 (farthest from C.G.) 

igrid=[155003 155003 1550031; 

idir=[l 2 31; 

inum=[l:3]; 

ifac=ones (size (inum) ) ; 

dist=[igrid;idir;inum;ifac]; 

if strcmp(tdflag(l), 'y') 

[ dt , rwax , rway , rwaz ] = rwal ; 

w( :, 1) =rwax' ; 

w ( : ,2 ) =rway ' ; 

w( :, 3) =rwaz' ; 

end 

% 

% Reaction Wheel Assembly (RWA) Imbalance: Case 2 

% 

elseif (casenum == 13) 

igrid=[155003 155003 1550031; 

idir=[l 2 31; 

inum=[l:31; 

ifac=ones(size(inum)); 

dist=[igrid;idir;inum;ifac]; 

[ dt , rwax, rway , rwaz 3 = rwa2 ; 

w ( : ,1) =rwax' ; 

w( :, 2) =rway' ; 

w ( : ,3 ) =rwaz ' ; 

% 

% Solar Array Harmonic Drive 

% 

elseif (casenum == 14) 

% 69090 ==> solar array drive (SAD) 

igrid= [ 690901 ; 

idir= [51 ; 

inum= [13 ; 

ifac=ones(size(inum)); 

dist=[igrid;idir;inum;ifac]; 

if strcmp(tdflag(l), 'y') 

[at, torque] = sadhd; 

w( :, 1) =torque' ; 

end 

% 

% Solar Array Thermal Snap 

% 

elseif (casenum == 15) 

% 69090 ==> SAD 

% 60024 ==> SA 

igrid= [69090 60024 600241 ; 

idir=[4 1 31 ; 

inum=[l:3]; 

I 52 
ifac=ones(size(inum)); 

dist=[igrid;idir;inum;i.fac]; 

if strcmp(tdflag(l), ‘y’) 

[dt, torque] = sal; 

w( :, 1) =torque‘ ; 

[dt, torque] = sa2; 

w ( : ,2 ) =torque’ ; 

[dt, torque] = sa3; 

w( :, 3) =torque‘ ; 

I 

, 

end 

I % 

end 

% I 

% End distdata.m 

1 

l 

formece .In 

function [aacs,bacs,cacs,dacsl=formscs 

% 

% function [aacs,bacs, cacs,dacs]=formscs 

% 

% Purpose: To form the continuous-time spacecraft 

% control system (SCS) for the space platform 

% 

% Currently, this function forms the attitude 

% control system for the EOS-AM-1 Spacecraft. 

% 

% 

% output variables: 

% 

% aacs : the SCS state matrix (continuous) 

% bacs : the SCS input influence matrix (continuous) 

% cacs : the SCS output influence matrix 

% 

% Author: P. G. Maghami 

% Spacecraft Controls Branch 

% NASA Langley Research Center 

% December, 1992 

% 

% Modified: March, 1994 

% 

.................................................... 

kf=0.25005; 

third-order Butterworth filter 

af=l .O; 

bf=1.2600; 

cf =O .7938; 

df=kf; 

numf =kf ; denf = [ af , bf , c f , df 3 ; 

% wide-band notch filter 

an=0.52335; 

bn=0.19678; 

cn=l . 0 ; ~ 

53 
kn=0.57408; 

numn=[an,bn,cnl ;denn=[an,kn,cnl; 

% rate gyro 

kg=l . 0 ; 

~g=12.5664; 

Zg=O.7071; 

numg=[kg*wg*wgl ;deng=[1.0,2.0*zg*wg,wg*wgl; 

%zero order hold 

taw=0.512; 

%numh=taw;denh=[0.125*taw*taw,taw,1.001; 

numh=l.OO;denh=[O.l25*taw*taw, taw,1.00]; 

%delay 

numd=[0.125*taw*taw,taw,1.001; 

dend=[0.125*taw*taw,taw,l.001; 

% 

krp=[4284.6;6696.4;8322.51; 

kri=[30.604;40.761;105.681; 

% 

% rate loop compensator-roll 

numrr=[krp(l) ,kri(l) 1 ;denrr=[1.00,0.001; 

% 

% rate loop compensator-pitch 

numrp= [krp (2 ) , kri (2) ] ; denrp= [l . 00,O. 00 1 ; 

% 

% rate loop compensator-yaw 

numry=[krp(3) ,kri(3) l;denry=[1.00,0.001; 

% 

kp=[0.051604;0.049064;0.047159]; 

ki=[1.5199e-4;1.6984e-4;3.30lle-41; 

% 

% position loop compensator-roll 

numpr= kp ( 1 , ki ( 1 ) 1 ; denpr= [ 1 . 0 0,O . 0 0 3 ; 

% 

% position loop compensator-pitch 

numpp= [ kp (2 , ki (2 1 ; denpp= [l . 00,O. 00 3 ; 

% 

% position loop compensator-yaw 

numpy= [ kp ( 3 , ki ( 3 1 ; denpy= [ 1.0 0,O. 0 0 1 ; 

% 

% rate loop total compensation 

% 

% 

% transform (numg, deng) to state-space 

% 

[ a1 , bl , cl , dl 1 = t f 2 ss (numg , deng) ; 

% 

% 

% transform the position-loop combined TFs to 

% state-space 

% 

[apl, bpl, cpl, dpll =tf2ss (numpr, denpr) ; 

[ap2,bp2,cp2,dp2l=tf2ss(numpp,denpp); 

[ap3,bp3,cp3,dp3l=tf2ss(numpy,denpy); 

% 

% 

I 54 
% combine the position loop and rate loop filters 

% 

[acl,bcl,ccl,dcll= ... 

[ac2,bc2,cc2,dc23= ... 

[ac3,bc3,cc3,dc3]= ... 

% 

cc 1=CC 1 ( 1, : ) +CC~ ( 2 , : ) ; dcl =del( 1, : ) +del ( 2, : ) ; 

CC~=CC~ (1,: ) +CC~ (2, : ) ;dc2=dc2 (1, : ) +dc2 (2, : ) ; 

CC~ =CC~ ( 1, : ) +CC~ ( 2, : ) ; dc3 =dc3 ( 1, : ) +dc3 ( 2, : ) ; 

% 

% combine the butterworth filter and the notch filter 

% 

[numl, den11 =series (numf, denf, numn, denn) ; 

% 

% combine the rate loop compensator in series 

% with the notch filter 

% 

[nun3 1, den3 1 3 =series (numrr , denrr , numl , denl ) ; 

[num32, den32 3 =series (numrp, denrp, numl , denl ) ; 

[ num3 3 , den3 3 1 =series (numry , denry , numl , denl ) ; 

% 

% add the zero order hold in series 

% 

[num41, den41 3 =series (num31, den31, numh, denh) ; 

[num42, den42 3 =series (num32, den32, numh, denh) ; 

[num43, den43 I =series (num33, den33, numh, denh) ; 

% 

% add the time delay in series 

% 

[numinr, deninrl =series (num41, den41, numd, dend) ; 

[numinp,deninpl=series(num42,den42,numd,dend); 

[numiny,deninyl=series(num43,den43,numdldend); 

% 

% transform the rate loop TFs to state-space 

% 

[arl , brl , crl , drl I =t f 2 ss (numinr , deninr ) ; 

[ar2, br2, cr2, dr2 3 =tf2ss (numinp, deninp) ; 

[ar3,br3,cr3,dr33=tf2ss(numiny,deniny); 

% 

% 

% Form the SCS state-space model 

% 

% 

[aacsl, bacsl, cacsl, dacsl I = . . . 

[aacs2,bacs2,cacs2,dacs2]= ... 

[aacs3,bacs3,cacs3,dacs33= ... 

% 

[aacs,bacs,cacs,dacsl =append(aacsl,bacsl, . . . 

append ( apl , bpl , cpl , dpl , a1 , bl , cl , dl ) ; 

append (ap2, bp2, cp2, dp2, al, bl, cl, dl) ; 

append (ap3, bp3, cp3, dp3, al, bl, cl, dl) ; 

, 

series(acl,bcl,ccl,dcl,arl,brl, cr1,drl) ; 

series (ac2, bc2, cc2, dc2, ar2, br2, cr2, dr2 ) ; 

series (ac3, bc3 I cc3, dc3 , ar3 I br3, cr3, dr3 ) : 

cacsl,dacsl,aacs2,bacs2,cacs2,dacs2); 

55 
[aacs, bacs, cacs, dacs 3 =append (aacs, bacs, . . . 

% 

% apply the scale factor KW of the reaction wheels 

% (units in lb-in/ssc) 

% 

kw=O .22*12.00; 

cacs=cacs*kw; 

% 

cacs,dacs,aacs3,bacs3,cacs3,dacs3); 
Appendix B 

S-Function Representation of Earth Observing System EOS-AM-1 Attitude Control System 

The following listing is an example of an S-function representation of an attitude control system. This example is 

based on the Earth Observing System EOS-AM-1 spacecraft and is distributed with PLATSIM. The user may want to 

use this example as a template for writing the S-function routines for the spacecraft that the user wishes to analyze. 

6tiction.m 

function [yout]=stiction(x,u, t, flag) 

% 

% Purpose: A MATLAB S-function that defines the 

% EOS-AM-1 attitude control system with the reaction 

% wheel models included. The reaction wheel friction 

% nonlinearities and stiction are modeled. However, 

% an uncontrolled model of the wheel is used (no 

% wheel speed controller). 

% 

% Inputs: Standard MATLAB S-function inputs. 

% 

% Outputs: Standard MATLAB S-function outputs. 

% 

% Author: Peiman G. Maghami 

% Guidance and Control Branch 

% NASA Langley Research Center 

% Hampton, VA 23681-0001 

% 

% Created: September, 1995 

% Modified: March, 1996 

% 

..................................................... 

global PLAT-ac PLAT-bc PLAT-cc PLAT-nc 

% 

if f lag==O 

% 

% if flag=O, the number of the continuous states, 

% discrete states, outputs,and inputs are required. 

% 

end 

% 

% 

% call "formscs.m" the first time to generate the 

% ACS system matrices 

% 

% The first "nc" states correspond to the states of 

% the linear ACS controller. 

% The states "nc+l" to "nc+3" represent the reaction 

% wheel speeds. 

% 

if exist('PLAT-ac')-=l 

[PLAT-ac,PLAT-bc,PLAT~cc~PLAT-dcl=formscs; 

nc=size (PLAT-ac, 1) ; 

end 

sizes=[51,0,6,6,0,03 ; 

57 
% 

% compute the required torques 

% 

uc=PLAT-cc*x(l:nc) ; 

% 

% compute the reaction wheel drag torques 

% 

ws=x(nc+l:nc+3); 

tdrag=0.0232215-0.0209812*exp(-0.0035787*abs(ws) ); 

i zws=f ind (x (nc+l : nc+3 ) == 0 ) ; 

inzws=find(x(nc+l:nc+3)-=0) ; 

tdrag (inzws) =12*sign (ws (inzws) ) . *tdrag (inzws) ; 

tdrag(izws)=12*sign(uc(izws) ) .*tdrag(izws) ; 

% 

if flag==l 

% 

% if flag=l, the derivatives of the continuous-time 

% variables are required. 

% 

yout=zeros (size (x) ) ; 

% 

% compute controller state derivatives 

% 

ydot=PLAT-ac*x(l:nc)+PLAT-bc*u; 

% 

% compute reaction wheel accelerations 

% 

% 

% 

% if a wheel is under stiction, zero out the wheel 

% accelerations 

% 

wdot=(1/(12*0.103))*(uc-tdrag); 

for i=1:3 

if abs(uc(i))<=12*(0.0232215-0.0209812) & abs(x(nc+i))<l.OOe-l2; 

end 

wdot (i) =O; 

end 

% 

yout= [ydot;wdot] ; 

% 

elseif flag==2 

% 

% if flag=2, the system outputs are required. 

% 

% The first three outputs are the reaction torques 

% and the next three outputs are the requested 

% torques. 

% 

yout=zeros(6,1); 

% 

% compute reaction torques 

% 

% 

for i=1:3 

58 
% if a wheel is under stiction, set the reaction 

% torque to zero. 

% 

if abs(uc(i))<=12*(0.0232215-0.0209812) & abs(x(nc+i))<l.OOe-l2; 

yout (i)=O; 

else 

yout(i)=(uc(i)-tdrag(i)); 

end 

end 

I % 

yout (4 : 6) =UC (1 : 3 ) ; 

end 

59 
Appendix C 

Solution Integrity Checking File 

The following listing is an example of solution integrity checking. This file corresponds to the example given in the 

Solution Check File on page 10. The user may want to use this example as a template for writing a solution integrity 

checking file for the spacecraft that the user wishes to analyze. 1 

1 

I solchk .m 

i 

function [hout,z2,u2,isolok]=solchk(zl,ul,z2,u2,h) 

% 

% function [hout,z2,u2,isolok]=solchk(zl,ul,z2,u2,h) 

% 

% purpose: Generally, to determine if a user-defined 

% solution discontinuity condition has occurred in the 

% nonlinear control system during the last 

% integration update, and take action as necessary 

% to reset the integration step size or to redefine 

% the controller states and outputs. This particular 

% file is written to handle the discontinuities that 

% are brought on due to the reaction wheel stiction 

% for the EOS-AM-1 spacecraft. 

% 

% 

% input variables: 

% 

% zl : last controller state vector 

% ul : last controller output vector 

% 22 : current controller state vector 

% u2 : current controller output vector 

% h : integration step size 

% 

% output variables: 

% 

% hout : new integration step size to be tried by 

% the integration algorithm. 

% 22 : updated current controller state vector 

% u2 : updated current controller output vector 

% isolok : an integer scalar. If isolok=l, the 

% current solution is accepted, otherwise, the 

% solution is rejected and the integration is 

% to be performed again with hout. 

% 

% 

% Author: Peiman G. Maghami 

% Guidance and Control Branch 

% NASA Langley Research Center 

% 

% 

..................................................... 

global PLAT-flag 

% 

I 

I % Created : March, 1995 

61 
% if PLAT-flag(i 

% condition with 

% condition 

% if PLAT-flag(i 

% condition with 

% condition 

% 

=0, wheel no. "i" is in non-stiction 

potential for entering stiction 

=1, wheel no. "i" is in stiction 

potential for leaving stiction 

% nwheels : number of reaction wheels 

% 

nwheels=3; 

% 

% nc : the position of the wheel speed variables in 

% the nonlinear controller state vector 

nc=[49,50,511; 

% 

% nrt : the position of the reaction torque levels of 

% the wheels in the nonlinear controller output 

% vector 

% 

nrt=[1,2,31; 

% 

% nat : the position of the applied torque levels to 

% the wheels in the nonlinear controller output 

% vector 

% 

nat= [4,5,61 ; 

% 

% define the stiction torque 

% 

tstic=12*(0.0232215-0.0209812); 

% 

% define minimum step for the cross-over from one 

% condition to the next 

% 

hmin=l.OOe-5*h; 

% 

% initialize the wheels flags. If the init 

% speed is zero, assume stiction condition 

PLAT-flag(i)=l; otherwise, set PLAT-flag(i 

% 

if exist('PLAT-flag')-=l 

for i=l:nwheel 

if zl (nc (i) ) ==0 

else 

end 

PLAT-flag (i) =l; 

PLAT-flag (i) =O; 

end 

end 

% 

% loop around the number of reaction wheels 

% 

for i=l:nwheel 

% 

hout (i) =h; 

a1 wheel 

and set 

=o. 

62 
if PLAT-flag (i) ==O 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

check wheel speed zero crossing 

if (zl(nc(i))*z2(nc(i)))<=O 

compute estimated location of the wheel speed zero 

crossing 

if (22 (nc (i) ) -zl (nc (i) ) ) -=O 

wc=-zl (nc(i)) *h/ (22 (nc(i)) -zl(nc(i))); 

else 

wc=h; 

end 

compute estimated requested torque (3 wc 

uc=ul(nt(i) )+( (u2(nt(i))-ul(nt(i)))/h)*wc; 

if estimated requested torque @ wc is less than the 

stiction torque, stiction has occurred. 

if abs (uc) <tstic 

if stiction has occurred at the end of the time 

interval, set the appropriate flag and accept the 

solution 

if wc==h 

PLAT-f lag ( i ) =1; 

isoloki (i)=l; 

if the stiction condition is estimated to have 

occurred at a time between hmin and h-hmin, reject 

the solution, and retry the last step with step 

size set at 0.9*wc. 

elseif wc>=hmin & wc<(h-hmin) 

isoloki (i) =O; 

hout ( i ) =wc* 0.9 ; 

if the stiction condition is estimated to have 

occurred at a time between 0 

and hmin, assume the cross-over from non-stiction 

to stiction has taken place; 

accept the solution, and zero out the wheel speed 

and reaction torque 

elseif wc<hmin &i wc>O 

PLAT-f lag ( i ) =l; 

isoloki (i) =l; 

hout (i) =wc; 

z2=21; 

22 (nc (i) ) =O; 

u2=ul; 

u2(nrt(i))=O; 

63 
% 

% if the stiction condition is estimated to have 

% occurred at a time between h-hmin and h, assume 

% the cross-over from non-stiction to stiction has 

% taken place; accept the solution, and zero out the 

% wheel speed and reaction torque 

% 

elseif wc>=h-hmin 

PLAT-f lag (i ) =l; 

isoloki (i)=l; 

22 (nc (i) ) =O; 

u2 (nrt (i) )=O; 

end 

isoloki (i) =l; 

else 

end 

isoloki (i) =l; 

else 

end 

% 

elseif PLAT-flag(i)==l 

% 

% check the requested torque levels 

% 

% 

% compute estimated location of the requested torque 

% crossing the stiction torque 

% 

if abs (u2 (nat (i) ) ) >=tstic 

if (u2 (nat (i) ) -ul (nat (i) ) ) -=0 

t c= ( sign (u2 (nat ( i ) ) ) * t s t ic -ul (nat ( i ) ) ) . . . *h/ (u2 (nat (i) ) -ul (nat (i) ) ) ; 

else 

end 

tc=h; 

% 

% if non-stiction condition has occurred at the end 

% of the time interval, set the appropriate flag and 

% accept the solution 

% 

if tc==h 

PLAT-f lag (i) =O ; 

isoloki(i)=l; 

% 

% if the non-stiction condition is estimated to have 

% occurred at a time between hmin and h-hmin, reject 

% the solution, and retry the last step with step 

% size set at 0.9*tc. 

% 

elseif tc>=hmin & tc<(h-hmin) 

isoloki (i) =O; 

hout (i)=tc*0.9; 

% 

% if the non-stiction condition is estimated to have 

% occurred at a time between 0 and hmin, assume the 

64 
% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

% 

cross-over from stiction to non-stiction has taken 

place; accept the solution, and zero out the wheel 

speed and reaction torque, and set the applied 

torque to tstic 

elseif tc<hmin & tc>O 

PLAT-f lag ( i ) =O ; 

isoloki (i) =l; 

hout ( i ) = tc ; 

z2=z1; 

22 (nc (i) ) =O; 

u2 =ul ; 

u2(nrt(i))=O; 

u2 (nat (i) )=sign(ul (nat (i) ) ) *tstic; 

if the non-stiction condition is estimated to have 

occurred at a time between h-hmin and h, assume the 

cross-over from stiction to non-stiction has taken 

place; accept the solution, and zero out the wheel 

speed and reaction torque, and set the applied 

torque to tstic 

elseif tc>=h-hmin 

PLAT-f lag (i) =O; 

isoloki(i)=l; 

22 (nc (i) ) =O; 

u2 (nrt (i) ) =O; 

u2 (nat (i) )=sign(ul (nat (i) ) ) *tstic; 

end 

isoloki (i)=l; 

else 

end 

end if-loop on PLAT-flag 

end 

end loop on i 

end 

% 

% 

% 

% 

% 

1 % 

% 

% 

% 

, % 

% 

I % 

I % 

Determine the new step size to be taken by the 

integration. If no changes in the condition of any 

of the wheels are observed, e.g., any wheel that 

was in stiction remains in stiction, or any wheel 

that was not in stiction condition remain outside 

the stiction region, the solution is accepted 

(isolok is set to 1) and the new step size is the 

same as the old one. Otherwise, the solution is 

rejected (isolok is set to 01, and the recommended 

new step size is set to the minimum of the step 

sizes for the each of three wheels. 

hout =min (h, min (hout ) ) ; 

isolok=min(isoloki); 

% 

65 
Appendix D 

Time Domain Output and Frequency Domain Output for Earth Observing System EOS-AM-1 

Example 

Time Domain Output for EOS-AM-1 

As an example, suppose that PLATSIM runs using the default values of all execution time parameters and the example data distributed with the PLATSIM software, which is based on the EOS-AM-1 spacecraft. Suppose further that the 

disturbance scenario selected is “MODIS static imbalance”; then the following files are generated by PLATSIM: 

, 

MODIS-static-imbalance-1-time.mat 

MODIS-static-imbalance-time.mat 

CERES litch-1-time.eps 

CERES 1 -Pitch-2-time.eps 

CERES 1-Roll-1-time.eps 

CERES l-Roll-2-time.eps 

CERES 1 -Yaw-l-time.eps 

CERES l-Yaw-2-time.eps 

CERES2-Pitch- 1 -time.eps 

CERES2Pitch-2-time.eps 

CERES 2-Roll- 1 -time.eps 

CERES2-Roll-2-time.eps 

CERES2-Yaw-l-time.eps 

CERES2-Yaw-2-time.eps 

MODIS-Pitch-1-time.eps 

MODIS-Pitch-2-time.eps 

MODIS-Roll-l-time.eps 

MODIS-Roll-2-time.eps 

MODIS-Yaw-1 -time.eps 

MODIS-Yaw-2-time.eps 

NAVBASE-Pitch- 1 -time.eps 

NAVBASE-Pitch-2-time.eps 

NAVBASE-Roll-l-time.eps 

NAVBASE-RoU-2-time.eps 

NAVBASE-Yaw-1 -time.eps 

NAVBASE-Yaw-2-time.eps 

TIR-Pitch- 1-time.eps 

TIR-Pitch-2-time.eps 

TIR-Roll-l-time.eps 

TIR-Roll-2-time.eps 

TIR-Yaw- 1 -time.eps 

TIR-Yaw-2-time.eps 

MODIS-static-imbalance-1 jitr.out 

MODIS-static-imbalance~2~itr.out 

MODIS-static-imbalanceJitr.out 

MODIS-static-imbalance-2-time.mat 

MISR-Pitch-1 -time.eps 

MISR-Pitch-2-time.eps 

MISR-Roll-ltime.eps 

MISR-Roll-2-time.eps 

MISR-Yaw-1 time.eps 

MISR-Yaw-2time.eps 

MOPITT-Pitch-1 -time.eps 

MOPIlT-Pitch-2-time.eps 

MOPIlT-Roll-l-time.eps 

MOPIlT-Roll-2-time.eps 

MOPIlT-Yaw-l-time.eps 

MOPIlT-Yaw-2-time.eps 

S WIR-Pitch- 1 -time .eps 

SWIR-Pitch-2-time.eps 

SWIR-Roll-1 -time.eps 

SWIR-Roll-2-time.eps 

SWIR-Yaw-l-time.eps 

SWIR-Yaw2-time.eps 

VNIR-Pitch-1 -time.eps 

VNIR-Pitch-2time.eps 

VNIR-Roll-1 -time.eps 

VNlR-Roll-2-time.eps 

VNIR-Yaw-ltime.eps 

VNIR-Yaw-2-time.eps 

MODIS-static-imbalance-1jitr.ps 

MODIS-static-irnbalance_2jitr.p~ 

MOD1S-static-imbalancejitr.ps 

The reduced time histories for the EOS-AM-1 instruments, namely, CERES1, CERES2, MISR, MODIS, MOPI’IT, 

NAVBASE, SWIR, TIR, and VNIR, are provided in an encapsulated PostScript form in the corresponding files with 

extension “.eps” for roll, pitch, and yaw axes. For example, the file CERES1-Roll-1-time . eps provides the roll 

time history for the CERES1 instrument due to the first MODIS static imbalance disturbance element (vector), and 

VNIR-Yaw-2-time.eps provides the yaw time history for VNIR instrument due to the second MODIS static 

imbalance disturbance element (vector). 

67 
A typical time history output as encapsulated in file MISR-Roll-2-time. eps is shown in figure D1 . This 

time history was generated using the 703-mode model of the EOS-AM-1 spacecraft being distributed 

PLATSIM software. 

1.0 

, I I I I I I I 1 1 

with the 

0 100 200 300 400 500 600 700 800 900 1000 

Time, sec 

Figure D1. Example of time history plot. Time response for disturbance sequence MODIS static imbalance (2); 29 Apr 1994. 

I Files MODIS-static-imbalance-1-time.mat and MODIS-static-imbalance-2-time.mat are 

MATLAB binary files which include the reduced time history data for all EOS-AM- 1 instruments and the corresponding 

jitter values (in variables JITTER1 and JITTER2) for the first and the second MODIS static imbalance disturbance 

elements (vectors), respectively. File MODIS-stat ic-imbalance-t ime.mat is a MATLAB binary file which has 

the overall jitter values (in variable JITTER). Files MODIS-stat ic-imbalance-1-j itr.out and 

MODIS-static-imbalance-2-j itr.out are ASCII files which contain the jitter values, in a tabular form, 

for the first and the second MODIS static imbalance disturbance elements (vectors), respectively. File 

MODIS-static-imbalance-jitr.out is an ASCII file containing the total jitter values in a tabular 

form, obtained through the direct summation of jitter values in files MODIS-static-imbalance-1-t ime.mat 

and MODI S-s t a t i c-imbalance-2-t ime.mat . The jitter data written to file 

MODIS-static-imbalance-1-j itr.out looks as follows: 

I 
Disturbance Source: MODIS static imbalance( 1) 

Window 

NAVBASE Roll 

NAVBASE Pitch 

NAVBASE Yaw 

CERES1 Roll 

CERES1 Pitch 

CERES1 Yaw 

CERES2 Roll 

CERES2 Pitch 

CERES2 Yaw 

MISR Roll 

MISR Pitch 

MISR Yaw 

MODIS Roll 

MODIS Pitch 

MODIS Yaw 

MOPITT Roll 

MOPI’IT Pitch 

MOPITT Yaw 

SWIR Roll 

SWIR Pitch 

SWIR Yaw 

TIR Roll 

TIR Pitch 

TIR Yaw 

VNIR Roll 

VNIR Pitch 

VNIR Yaw 

RUN DATE: 29-Apr-94 

1.00 1.80 9.00 55.00 420.00 480.00 1OOO.00 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 OS5 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

3.19 3.82 7.55 12.50 12.50 12.50 12.50 

0.42 0.55 1.40 2.20 2.20 2.20 2.20 

3.97 4.96 14.19 26.88 26.88 26.88 26.88 

Files MODIS-s t at ic-imbalance-1-j it r.ps, MODIS-s t at ic-imbalance-2-1 it r.ps, and 

MODIS-static-imbalance-j itr.ps are equivalent to their “.out” counterpart, except that they are in 

PostScript form. 

69 
Frequency Domain Output for EOS-AM-] 

As an example, suppose that PLATSIM runs using the default values of all execution time parameters, except 

tdf lag = ‘n’ (which selects frequency domain analysis). Suppose also that PLATSIM runs using the example data 

distributed with the PLATSIM software which is based on the EOS-AM-1 spacecraft. Suppose further that the disturbance scenario selected is “MODIS static imbalance”; then the following files are generated by PLATSIM: 

MODIS-static-imbalance-freq 

CERES 1-Pitch-1-freq.eps 

CERES I-Pitch-2-freq.eps 

CERES 1-Roll-l-freq.eps 

CERES 1 -Roll-2-freq.eps 

CERES 1-Yaw-l-freq.eps 

CERES 1 -Yaw-2-freq.eps 

CERES2-Pitch- 1-freq.eps 

CERES2-Pitc h-2-freq.eps 

CERES2-Roll- 1 -freq.eps 

CERES2-Roll-2-freq.eps 

CERES2-Yaw-1 -freq.eps 

CERES2-Yaw-2-freq.eps 

MODIS-Pitch-1-freq.eps 

MODIS-Pitch-2-freq.eps 

MODIS-Roll-1 -freq.eps 

MODIS-Roll-2-freq.eps 

MODIS-Yaw-l-freq.eps 

MODIS-Yaw-2-freq.eps 

NAVBASE-Pitch-1 -freq.eps 

NAVBASE-Pitch-2-freq.eps 

NAVBASE-Roll-1 -freq.eps 

NAVBASE-Roll-2-freq.eps 

NAVBASE-Yaw-l-freq.eps 

NAVBASE-Yaw-2-freq.eps 

TIR-Pitch- 1 -freq.eps 

TIR-Pitch-2-freq.eps 

TIR-Roll-l-freq.eps 

TIR-Roll-2-freq.eps 

“IF-Yaw-1 -freq.eps 

TIR-Yaw-2-freq.eps 

.mat 

MISR-Pitch-1 -freq.eps 

MISR-Pitch-2-freq.eps 

MISR-Roll-1 -freq.eps 

MISR-Roll-2-freq.eps 

MISR-Yaw-l -freq.eps 

MISR-Yaw-2-freq.eps 

MOPITl-Pitch- 1-freq.eps 

MOPITT-Pitch-2-freq.eps 

MOPITT-Roll- 1 -freq.eps 

MOPITl-Roll-2-freq.eps 

MOPITl-Yaw- 1-freq.eps 

MOPITT-Yaw-2-freq.eps 

S WIR-Pitch-1 -freq.eps 

SWIR-Pitch-2-freq.eps 

SWIR-Roll-l-freq.eps 

SWIR-Roll-2-freq.eps 

SWIR-Yaw- 1 -freq.eps 

SWIR-Yaw2-freq.eps 

VNIR-Pitch- 1-freq.eps 

VMR-Pitch-2-freq.eps 

VNIR-Roll-1 -freq.eps 

VNIR-Roll-2-freq.eps 

VNIR-Yaw- 1 -freq.eps 

VNIR-Yaw-2-freq.eps 

The Bode plots for the EOS-AM-1 instruments, namely, CERES1, CERES2, MISR, MODIS, MOPI’IT, 

NAVBASE, SWIR, TIR, and VNIR, are provided in an encapsulated PostScript form in the corresponding files with 

extension “.eps” for roll, pitch, and yaw axes. For example, the file CERES1-Roll-1-f req.eps provides the Bode 

plot for the roll response of the CERES 1 instrument due to the first MODIS static imbalance disturbance element (vector), and VNIR-Yaw-2-t ime.eps provides the Bode plot for the yaw response of the VNIR instrument due to the second MODIS static imbalance disturbance element (vector). A Bode plot output would look as in figure D2 on page 71. 

This Bode plot was generated by using the 703-mode model being distributed with the PLATSIM software. 

I File MODIS-static-imbalance-f req.mat is a MATLAB binary file containing the results of the frequency 

domain calculation in the form indicated in “Frequency response matrix” on page 37. 
100 

0- 

% 

0 -100 

-200 I I I I I 

lo-* lo-' 1 oo 10' 1 o2 1 o3 1 o4 

I I I I I 

- 

3 

U 

$0 

c 

a 

Frequency, radsec 

I 

1 I I 

1 o-2 lo-' 1 oo 10' lo2 1 o3 1 o4 

Frequency, radsec 

Figure D2. Example of Bode plot. Frequency response at MISR roll, arcsec. Disturbance: MODIS static imbalance (2); 29 APR 1994. 

71 
References 4. Giesy, D. P.: Efficient Calculation of a Jitter/Stability Metric. 

J. Spacec: & Rockets, vol. 34, no. 4, July-Aug. 1997, 

1. MATLAB Reference Guide. The Mathworks, Inc., 1993. pp. 549-557. 

2. Asrar, Ghassem; and Dokken, David Jon, eds.: 1993 Earth 

Observing System Reference Handbook. NASA NP-202.1993. 

3. Maghami, Penman; Kenny, Sean P.; and Giesy, Daniel P.: 

PLATSIM: An EfJicient Linear Simulation and Analysis Package for Large-Order Flexible Systems. NASA TP-3519, 1995. 

5. Maghami, P. G.; and Giesy, D. P.: Efficient Computation of 

Closed-Loop Frequency Response for Large-Order Flexible 

Systems. J. Guid., Control, & Dyn., vol. 19, no. 4, July 1996, 

pp. 780-786. 

72 
4. TITLE AND SUBTITLE 

PLATSIM: A Simulation and Analysis Package for Large-Order Flexiblc 

Systems (Version 2.0) 

Peimar-G. Maghami, Sean P. Kenny, and Daniel P. Giesy 

7. PERFORMING ORG ANlZATlON NAME(S) AND ADDRESS(ES) 

NASA Langley Research Center 

Hampton, VA 23681-2199 

9. SWNSORINGiMONITORING AGENCY NAME(S) AND ADDRESS(ES) 

National Aeronautics and Space Administration 

Washington, DC 20546-0001 

11. SUPPLEMENTARY NOTES 

5. FUNDING NUMBERS I 

8. PERFORMING ORGANIZATION 

REPORT NUMBER 

L- 17608 

12a. DlSTRlBUTlONlAVAlLABlLITY STATEMENT 

Unclassified-Unlimited 

Subject Category 18 

Availability: NASA CAS1 (301) 621-0390 

10. SPONSORINGiM0NnT)RING 

AGENCY REPORT NUMBER 

12b. DISTRIBUTION CODE 

NASA TM-4790 

14. SUBJECT TERMS 

PLATSIM; Time domain analysis; Frequency domain analysis; Jitter analysis; Linear 

control; Nonlinear control; Flexible structures; Large-order systems 

17. SECURITY CLASSIFICATION 18. SECURITY CLASSIFICATION 19. SECURITY CLASSIFICATION 

OF REPORT OF THIS PAGE OF ABSTRACT 

Unclassified Unclassified Unclassified 

15. NUMBER OF PAGES 

16. PRICE CODE 

80 

A05 

20. LIMITATION 

OF ABSTRACT