1
|
|
2
|
node DynamicSaturation ( up_Out1_74 : real ; u_Out1_84 : real ; lo_Out1_94 : real )
|
3
|
returns ( y1_In1_136 : real ) ;
|
4
|
var LowerRelop1_Out1_100 : bool ;
|
5
|
Switch_Out1_109 : real ;
|
6
|
Switch2_Out1_118 : real ;
|
7
|
UpperRelop_Out1_124 : bool ;
|
8
|
LowerRelop1_In1_98 : real ;
|
9
|
LowerRelop1_In2_99 : real ;
|
10
|
Switch_In1_106 : real ;
|
11
|
Switch_In2_107 : bool ;
|
12
|
Switch_In3_108 : real ;
|
13
|
Switch2_In1_115 : real ;
|
14
|
Switch2_In2_116 : bool ;
|
15
|
Switch2_In3_117 : real ;
|
16
|
UpperRelop_In1_122 : real ;
|
17
|
UpperRelop_In2_123 : real ;
|
18
|
|
19
|
let
|
20
|
LowerRelop1_Out1_100 = LowerRelop1_In1_98 > LowerRelop1_In2_99;
|
21
|
Switch_Out1_109 = if Switch_In2_107 then Switch_In1_106 else Switch_In3_108;
|
22
|
Switch2_Out1_118 = if Switch2_In2_116 then Switch2_In1_115 else Switch2_In3_117;
|
23
|
UpperRelop_Out1_124 = UpperRelop_In1_122 < UpperRelop_In2_123;
|
24
|
Switch2_In1_115 = up_Out1_74;
|
25
|
LowerRelop1_In2_99 = up_Out1_74;
|
26
|
Switch_In3_108 = u_Out1_84;
|
27
|
LowerRelop1_In1_98 = u_Out1_84;
|
28
|
UpperRelop_In1_122 = u_Out1_84;
|
29
|
Switch_In1_106 = lo_Out1_94;
|
30
|
UpperRelop_In2_123 = lo_Out1_94;
|
31
|
Switch2_In3_117 = Switch_Out1_109;
|
32
|
y1_In1_136 = Switch2_Out1_118;
|
33
|
Switch2_In2_116 = LowerRelop1_Out1_100;
|
34
|
Switch_In2_107 = UpperRelop_Out1_124;
|
35
|
tel
|
36
|
|
37
|
node IntegratorReset(Fx : real ; ResetLevel : bool ; x0: real )
|
38
|
returns ( out : real ) ;
|
39
|
let
|
40
|
out = x0 -> if (ResetLevel) then x0 else (Fx*1.0) + pre (out);
|
41
|
tel
|
42
|
|
43
|
|
44
|
|
45
|
node FPAControl ( engage_Out1_15 : real ; gamcmd_Out1_25 : real ; gamma_Out1_35 : real ; thetadeg_Out1_45 : real ; VT_Out1_55 : real )
|
46
|
returns ( PitchCmd_In1_487 : real ; integratorreset_Out1_242 : real ) ;
|
47
|
var DynamicSaturation_Out1_64 : real ;
|
48
|
KIgamerr_Out1_161 : real ;
|
49
|
Kgamerr_Out1_170 : real ;
|
50
|
LogicalOperator_Out1_175 : bool ;
|
51
|
Mux_Out1_179_0 : real ;
|
52
|
Mux_Out1_179_1 : real ;
|
53
|
Mux1_Out1_183_0 : real ;
|
54
|
Mux1_Out1_183_1 : real ;
|
55
|
Product1_Out1_195 : real ;
|
56
|
Sum_Out1_205 : real ;
|
57
|
Sum1_Out1_215 : real ;
|
58
|
Sum2_Out1_225 : real ;
|
59
|
-- integratorreset_Out1_242 : real ;
|
60
|
kt2fps_Out1_466 : real ;
|
61
|
m1_Out1_475 : real ;
|
62
|
DynamicSaturation_In1_61 : real ;
|
63
|
DynamicSaturation_In2_62 : real ;
|
64
|
DynamicSaturation_In3_63 : real ;
|
65
|
FPAScope_In1_149 : real ;
|
66
|
FPAScope_In2_150_0 : real ;
|
67
|
FPAScope_In2_150_1 : real ;
|
68
|
FPAScope_In3_151_0 : real ;
|
69
|
FPAScope_In3_151_1 : real ;
|
70
|
FPAScope_In4_152 : real ;
|
71
|
KIgamerr_In1_160 : real ;
|
72
|
Kgamerr_In1_169 : real ;
|
73
|
LogicalOperator_In1_174 : bool ;
|
74
|
Mux_In1_177 : real ;
|
75
|
Mux_In2_178 : real ;
|
76
|
Mux1_In1_181 : real ;
|
77
|
Mux1_In2_182 : real ;
|
78
|
Product1_In2_194 : real ;
|
79
|
Sum_In1_203 : real ;
|
80
|
Sum_In2_204 : real ;
|
81
|
Sum1_In1_213 : real ;
|
82
|
Sum1_In2_214 : real ;
|
83
|
Sum2_In1_223 : real ;
|
84
|
Sum2_In2_224 : real ;
|
85
|
integratorreset_In1_239 : real ;
|
86
|
integratorreset_In2_240 : bool ;
|
87
|
integratorreset_In3_241 : real ;
|
88
|
kt2fps_In1_465 : real ;
|
89
|
m1_In1_474 : real ;
|
90
|
|
91
|
let
|
92
|
DynamicSaturation_Out1_64 = DynamicSaturation ( DynamicSaturation_In1_61 , DynamicSaturation_In2_62 , DynamicSaturation_In3_63 );
|
93
|
KIgamerr_Out1_161 = 1.0 * KIgamerr_In1_160;
|
94
|
Kgamerr_Out1_170 = 1.400000 * Kgamerr_In1_169;
|
95
|
LogicalOperator_Out1_175 = not LogicalOperator_In1_174;
|
96
|
Mux_Out1_179_0 = Mux_In1_177;
|
97
|
Mux_Out1_179_1 = Mux_In2_178;
|
98
|
Mux1_Out1_183_0 = Mux1_In1_181;
|
99
|
Mux1_Out1_183_1 = Mux1_In2_182;
|
100
|
Product1_Out1_195 = 276.738714 * Product1_In2_194;
|
101
|
Sum_Out1_205 = Sum_In1_203 + Sum_In2_204;
|
102
|
Sum1_Out1_215 = Sum1_In1_213 + - Sum1_In2_214;
|
103
|
Sum2_Out1_225 = Sum2_In1_223 + - Sum2_In2_224;
|
104
|
integratorreset_Out1_242 = IntegratorReset( integratorreset_In1_239 , integratorreset_In2_240 , integratorreset_In3_241 );
|
105
|
kt2fps_Out1_466 = 1.687800 * kt2fps_In1_465;
|
106
|
m1_Out1_475 = -1.0 * m1_In1_474;
|
107
|
PitchCmd_In1_487 = Sum1_Out1_215;
|
108
|
FPAScope_In4_152 = Sum1_Out1_215;
|
109
|
Sum1_In2_214 = Kgamerr_Out1_170;
|
110
|
Sum_In2_204 = Kgamerr_Out1_170;
|
111
|
Sum1_In1_213 = integratorreset_Out1_242;
|
112
|
Kgamerr_In1_169 = gamma_Out1_35;
|
113
|
Sum2_In2_224 = gamma_Out1_35;
|
114
|
Mux_In2_178 = gamma_Out1_35;
|
115
|
Sum_In1_203 = thetadeg_Out1_45;
|
116
|
integratorreset_In3_241 = Sum_Out1_205;
|
117
|
LogicalOperator_In1_174 = if engage_Out1_15 = 0.000000 then false else true;
|
118
|
FPAScope_In1_149 = engage_Out1_15;
|
119
|
integratorreset_In2_240 = LogicalOperator_Out1_175;
|
120
|
Product1_In2_194 = kt2fps_Out1_466;
|
121
|
m1_In1_474 = Product1_Out1_195;
|
122
|
DynamicSaturation_In1_61 = Product1_Out1_195;
|
123
|
kt2fps_In1_465 = VT_Out1_55;
|
124
|
integratorreset_In1_239 = DynamicSaturation_Out1_64;
|
125
|
Mux1_In2_182 = DynamicSaturation_Out1_64;
|
126
|
DynamicSaturation_In2_62 = KIgamerr_Out1_161;
|
127
|
DynamicSaturation_In3_63 = m1_Out1_475;
|
128
|
KIgamerr_In1_160 = Sum2_Out1_225;
|
129
|
Mux1_In1_181 = Sum2_Out1_225;
|
130
|
Sum2_In1_223 = gamcmd_Out1_25;
|
131
|
Mux_In1_177 = gamcmd_Out1_25;
|
132
|
FPAScope_In2_150_0 = Mux_Out1_179_0;
|
133
|
FPAScope_In2_150_1 = Mux_Out1_179_1;
|
134
|
FPAScope_In3_151_0 = Mux1_Out1_183_0;
|
135
|
FPAScope_In3_151_1 = Mux1_Out1_183_1;
|
136
|
tel
|
137
|
|
138
|
|
139
|
node top (gammaCmd : real ; gamma : real; VT : real)
|
140
|
returns ( PitchCmd : real; integrator : real; thetaDeg : real ) ;
|
141
|
var obs : bool;
|
142
|
|
143
|
prePitch : real;
|
144
|
alpha : real ;
|
145
|
let
|
146
|
|
147
|
|
148
|
PitchCmd , integrator = FPAControl(1.0 , gammaCmd , gamma , thetaDeg, VT);
|
149
|
|
150
|
prePitch = 5.0 -> pre(PitchCmd);
|
151
|
-- gamma = 0.0 -> pre(gamma) + (pre(PitchCmd) - pre(prePitch));
|
152
|
thetaDeg = 5.0 -> pre(PitchCmd);
|
153
|
|
154
|
|
155
|
-- alpha_0 = 3
|
156
|
assert prePitch = 3 -> prePitch = pre(PitchCmd);
|
157
|
|
158
|
-- immediate effect of pitch
|
159
|
assert thetaDeg = prePitch;
|
160
|
|
161
|
-- we can prove it with this assumption on gamma/alpha
|
162
|
assert gamma = prePitch / 1.4;
|
163
|
|
164
|
-- assert alpha = thetaDeg - pre(gamma);
|
165
|
-- assert gamma = 0.0 -> (gamma >= pre(gamma) + (alpha-3) * 2.0) and (gamma <= pre(gamma) + (alpha-3) * 20.0);
|
166
|
|
167
|
assert VT = 100.0;
|
168
|
|
169
|
assert gamma > -10.0 and gamma < 10.0;
|
170
|
assert thetaDeg > -10.0 and thetaDeg < 10.0;
|
171
|
assert true -> gammaCmd = pre (gammaCmd);
|
172
|
assert gammaCmd > -5.0 and gammaCmd < 5.0;
|
173
|
|
174
|
obs = true -> (gammaCmd = gamma)
|
175
|
or ((gammaCmd > gamma) and (PitchCmd > pre(prePitch)))
|
176
|
or ((gammaCmd < gamma) and (PitchCmd < pre(prePitch)));
|
177
|
|
178
|
--!MAIN : true;
|
179
|
--!PROPERTY: obs = true;
|
180
|
tel
|
181
|
|