% Demo: EOS satellite in emergency mode
%
% This demo simulates an EOS satellite in emergency
% mode. The satellite is rotated about its y-axis
% by 55 deg and is spinning about its x-axis with
% a rate of 1 rpm
%
removeAll;
clearGraphic();
setSimEpoch(2000,3,21,12,0,0);
addEpoch('equinox',2000,3,21,12,0,0);
noon = 0;
six_am = -90;
addSatellite('EOS Sat',7171,0,98,six_am,0,0,'equinox');
%earthstation
earth0 = "Frankfurt";
addStation('Frankfurt', I_earth, 10, 50.05, 8.4, 0.1);
dtime = 4;
alphaleft = 55 *d2r;
t = 0:dtime:2000*dtime;
fleft0 = roty(alphaleft)*[0
1
0];
setSimTime(0);
setSimStepSize(dtime);
%
% Solar Panel: current(temperature, voltage) for a
% reference flux of 1353
z_matrix =
[ 026.7527.2527.7528.2528.7529.2529.7530.2530.7531.25
10012.3912.2312.1412.1411.9510.6410.5110.3310.14 9.94
9012.6712.5912.5012.3912.2611.7611.6811.3611.4811.36
8012.7712.7312.6812.6312.5712.3112.2712.2212.1712.11
7012.7812.7612.7412.7112.6812.5512.5312.5112.4812.45
6012.7412.7312.7212.7112.6912.6312.6212.6112.6012.68
5012.6812.6812.6712.6712.6612.6312.6312.6212.6212.91
4012.6112.6112.6112.6112.6012.5912.5912.7912.8813.18
3012.5312.5312.5312.5312.5312.5312.5712.6312.7312.72
2012.4612.4512.4512.4512.4512.4512.4512.4512.6512.45
1012.3812.3812.3812.3812.3812.3812.3812.3812.5812.38
012.3012.3012.3012.3012.3012.3012.3012.3012.4012.30
-1012.2212.2212.2212.2212.2212.2212.2212.2212.2212.22
-2012.1412.1412.1412.1412.1412.1412.1412.1412.1412.14
-3012.0612.0612.0612.0612.0612.0612.0612.0612.0612.06
-4011.9811.9811.9811.9811.9811.9811.9811.9811.9811.98
-5011.7011.8411.9011.9011.9011.9011.9011.9011.9011.90
-6011.3211.6211.7211.8211.8211.8211.8211.8211.8211.82
-7011.1411.2411.4411.6411.7411.7411.7411.7411.7411.74
-8010.9510.9511.3511.4511.6511.6511.6511.6511.6511.65];
j = 0;
templeft = 0;
solarflux = 1420;
alpha = 0.65;
epsilon = 0.81;
albedo = 0.3;
sigma = 5.67e-8;
capacity = 660;
qir = 0;
num_of_strings = 36;
eview = 0.045;
dt = 60;
gamma = 0;
reference_flux_si = 1353;
voltage = 28;
current = zeros(size(t));
for i=t,
j=j+1;
stepSim;
[d,r,a,e,v] = PlanetPosition();
gamma = i/30*pi;
fleft = rotx(gamma) * fleft0;
theta = fleft` * unitvector(a(2),e(2));
theta = theta*v(2);
theta = max(0,theta);
templeft = templeft+((((theta*solarflux*alpha)
+ (theta*solarflux*albedo*alpha*eview))
- (epsilon*(templeft^4)*sigma)+theta*qir)
* (dt/capacity));
current(j) = ((num_of_strings*theta)
*table(z_matrix,(templeft-273.15),voltage)
*((solarflux/reference_flux_si)/12));
endfor
average = sum(current*voltage)/prod(size(t));
erase
window('111');
plot(t,current*voltage,
t,ones(size(t))*average, 'grid');
title('6 a.m. Power in emergency mode')
ylabel('P [Watt]');
xlabel('t [sec]')