1 |
4748b215
|
hbourbou
|
-- This file has been generated by CoCoSim2.
|
2 |
|
|
|
3 |
|
|
-- Compiler: Lustre compiler 2 (ToLustre.m)
|
4 |
|
|
-- Time: 03-Dec-2018 22:32:51
|
5 |
|
|
(*
|
6 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar/ForEach1
|
7 |
|
|
*)
|
8 |
|
|
node ForEach1_18618_006(In1_1 : real;
|
9 |
|
|
__time_step : real;
|
10 |
|
|
__nb_step : int;)
|
11 |
|
|
returns(Out1_1 : real;);
|
12 |
|
|
var A_1 : real;
|
13 |
|
|
A_2 : real;
|
14 |
|
|
A_3 : real;
|
15 |
|
|
A_4 : real;
|
16 |
|
|
B_1 : real;
|
17 |
|
|
B_2 : real;
|
18 |
|
|
C_1 : real;
|
19 |
|
|
C_2 : real;
|
20 |
|
|
D_1 : real;
|
21 |
|
|
FinalSum_1 : real;
|
22 |
|
|
Product_1 : real;
|
23 |
|
|
Product1_1 : real;
|
24 |
|
|
Product2_1 : real;
|
25 |
|
|
Product2_2 : real;
|
26 |
|
|
Product3_1 : real;
|
27 |
|
|
Product3_2 : real;
|
28 |
|
|
Sum1_1 : real;
|
29 |
|
|
Sum1_2 : real;
|
30 |
|
|
X0_1 : real;
|
31 |
|
|
X0_2 : real;
|
32 |
|
|
let
|
33 |
|
|
A_1 = -0.500000000000000;
|
34 |
|
|
A_2 = 1.000000000000000;
|
35 |
|
|
A_3 = -0.200000000000000;
|
36 |
|
|
A_4 = 0.000000000000000;
|
37 |
|
|
B_1 = 1.000000000000000;
|
38 |
|
|
B_2 = 0.000000000000000;
|
39 |
|
|
C_1 = 1.500000000000000;
|
40 |
|
|
C_2 = 2.800000000000000;
|
41 |
|
|
D_1 = 1.000000000000000;
|
42 |
|
|
FinalSum_1 = 0.0 + Product1_1 + Product_1;
|
43 |
|
|
Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2);
|
44 |
|
|
Product1_1 = 1.0 * D_1 * In1_1;
|
45 |
|
|
Product2_1 = 1.0 * B_1 * In1_1;
|
46 |
|
|
Product2_2 = 1.0 * B_2 * In1_1;
|
47 |
|
|
Product3_1 = 0.0 + (A_1 * X0_1) + (A_3 * X0_2);
|
48 |
|
|
Product3_2 = 0.0 + (A_2 * X0_1) + (A_4 * X0_2);
|
49 |
|
|
Sum1_1 = 0.0 + Product3_1 + Product2_1;
|
50 |
|
|
Sum1_2 = 0.0 + Product3_2 + Product2_2;
|
51 |
|
|
X0_1 = (0.000000000000000 -> (pre Sum1_1));
|
52 |
|
|
X0_2 = (0.000000000000000 -> (pre Sum1_2));
|
53 |
|
|
Out1_1 = FinalSum_1;
|
54 |
|
|
tel
|
55 |
|
|
|
56 |
|
|
(*
|
57 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar/ForEach2
|
58 |
|
|
*)
|
59 |
|
|
node ForEach2_18657_006(In1_1 : real;
|
60 |
|
|
__time_step : real;
|
61 |
|
|
__nb_step : int;)
|
62 |
|
|
returns(Out1_1 : real;);
|
63 |
|
|
var A_1 : real;
|
64 |
|
|
A_2 : real;
|
65 |
|
|
A_3 : real;
|
66 |
|
|
A_4 : real;
|
67 |
|
|
B_1 : real;
|
68 |
|
|
B_2 : real;
|
69 |
|
|
C_1 : real;
|
70 |
|
|
C_2 : real;
|
71 |
|
|
D_1 : real;
|
72 |
|
|
FinalSum_1 : real;
|
73 |
|
|
Product_1 : real;
|
74 |
|
|
Product1_1 : real;
|
75 |
|
|
Product2_1 : real;
|
76 |
|
|
Product2_2 : real;
|
77 |
|
|
Product3_1 : real;
|
78 |
|
|
Product3_2 : real;
|
79 |
|
|
Sum1_1 : real;
|
80 |
|
|
Sum1_2 : real;
|
81 |
|
|
X0_1 : real;
|
82 |
|
|
X0_2 : real;
|
83 |
|
|
let
|
84 |
|
|
A_1 = -0.500000000000000;
|
85 |
|
|
A_2 = 1.000000000000000;
|
86 |
|
|
A_3 = -0.200000000000000;
|
87 |
|
|
A_4 = 0.000000000000000;
|
88 |
|
|
B_1 = 1.000000000000000;
|
89 |
|
|
B_2 = 0.000000000000000;
|
90 |
|
|
C_1 = 1.500000000000000;
|
91 |
|
|
C_2 = 2.800000000000000;
|
92 |
|
|
D_1 = 1.000000000000000;
|
93 |
|
|
FinalSum_1 = 0.0 + Product1_1 + Product_1;
|
94 |
|
|
Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2);
|
95 |
|
|
Product1_1 = 1.0 * D_1 * In1_1;
|
96 |
|
|
Product2_1 = 1.0 * B_1 * In1_1;
|
97 |
|
|
Product2_2 = 1.0 * B_2 * In1_1;
|
98 |
|
|
Product3_1 = 0.0 + (A_1 * X0_1) + (A_3 * X0_2);
|
99 |
|
|
Product3_2 = 0.0 + (A_2 * X0_1) + (A_4 * X0_2);
|
100 |
|
|
Sum1_1 = 0.0 + Product3_1 + Product2_1;
|
101 |
|
|
Sum1_2 = 0.0 + Product3_2 + Product2_2;
|
102 |
|
|
X0_1 = (0.000000000000000 -> (pre Sum1_1));
|
103 |
|
|
X0_2 = (0.000000000000000 -> (pre Sum1_2));
|
104 |
|
|
Out1_1 = FinalSum_1;
|
105 |
|
|
tel
|
106 |
|
|
|
107 |
|
|
(*
|
108 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar
|
109 |
|
|
*)
|
110 |
|
|
node DTFScalar_289_049(In1_1 : real;
|
111 |
|
|
In1_2 : real;
|
112 |
|
|
__time_step : real;
|
113 |
|
|
__nb_step : int;)
|
114 |
|
|
returns(Out1_1 : real;
|
115 |
|
|
Out1_2 : real;);
|
116 |
|
|
var Concatenate_1_1 : real;
|
117 |
|
|
Concatenate_1_2 : real;
|
118 |
|
|
ForEach1_1 : real;
|
119 |
|
|
ForEach2_1 : real;
|
120 |
|
|
Selector_1_In1_1 : real;
|
121 |
|
|
Selector_2_In1_1 : real;
|
122 |
|
|
let
|
123 |
|
|
Concatenate_1_1 = ForEach1_1;
|
124 |
|
|
Concatenate_1_2 = ForEach2_1;
|
125 |
|
|
ForEach1_1 = ForEach1_18618_006(Selector_1_In1_1, __time_step, __nb_step);
|
126 |
|
|
ForEach2_1 = ForEach2_18657_006(Selector_2_In1_1, __time_step, __nb_step);
|
127 |
|
|
Selector_1_In1_1 = In1_1;
|
128 |
|
|
Selector_2_In1_1 = In1_2;
|
129 |
|
|
Out1_1 = Concatenate_1_1;
|
130 |
|
|
Out1_2 = Concatenate_1_2;
|
131 |
|
|
tel
|
132 |
|
|
|
133 |
|
|
(*
|
134 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn
|
135 |
|
|
*)
|
136 |
|
|
node DiscreteTransferFcn_119_477(U_1 : real;
|
137 |
|
|
U_2 : real;
|
138 |
|
|
__time_step : real;
|
139 |
|
|
__nb_step : int;)
|
140 |
|
|
returns(Y_1 : real;
|
141 |
|
|
Y_2 : real;);
|
142 |
|
|
var DTFScalar_1 : real;
|
143 |
|
|
DTFScalar_2 : real;
|
144 |
|
|
Reshape_1 : real;
|
145 |
|
|
Reshape_2 : real;
|
146 |
|
|
ReverseReshape_1 : real;
|
147 |
|
|
ReverseReshape_2 : real;
|
148 |
|
|
let
|
149 |
|
|
(DTFScalar_1, DTFScalar_2) = DTFScalar_289_049(Reshape_1, Reshape_2, __time_step, __nb_step);
|
150 |
|
|
Reshape_1 = U_1;
|
151 |
|
|
Reshape_2 = U_2;
|
152 |
|
|
ReverseReshape_1 = DTFScalar_1;
|
153 |
|
|
ReverseReshape_2 = DTFScalar_2;
|
154 |
|
|
Y_1 = ReverseReshape_1;
|
155 |
|
|
Y_2 = ReverseReshape_2;
|
156 |
|
|
tel
|
157 |
|
|
|
158 |
|
|
(*
|
159 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar/ForEach1
|
160 |
|
|
*)
|
161 |
|
|
node ForEach1_125_039(In1_1 : real;
|
162 |
|
|
__time_step : real;
|
163 |
|
|
__nb_step : int;)
|
164 |
|
|
returns(Out1_1 : real;);
|
165 |
|
|
var A_1 : real;
|
166 |
|
|
A_2 : real;
|
167 |
|
|
A_3 : real;
|
168 |
|
|
A_4 : real;
|
169 |
|
|
B_1 : real;
|
170 |
|
|
B_2 : real;
|
171 |
|
|
C_1 : real;
|
172 |
|
|
C_2 : real;
|
173 |
|
|
D_1 : real;
|
174 |
|
|
FinalSum_1 : real;
|
175 |
|
|
Product_1 : real;
|
176 |
|
|
Product1_1 : real;
|
177 |
|
|
Product2_1 : real;
|
178 |
|
|
Product2_2 : real;
|
179 |
|
|
Product3_1 : real;
|
180 |
|
|
Product3_2 : real;
|
181 |
|
|
Sum1_1 : real;
|
182 |
|
|
Sum1_2 : real;
|
183 |
|
|
X0_1 : real;
|
184 |
|
|
X0_2 : real;
|
185 |
|
|
let
|
186 |
|
|
A_1 = -0.500000000000000;
|
187 |
|
|
A_2 = 1.000000000000000;
|
188 |
|
|
A_3 = -0.200000000000000;
|
189 |
|
|
A_4 = 0.000000000000000;
|
190 |
|
|
B_1 = 1.000000000000000;
|
191 |
|
|
B_2 = 0.000000000000000;
|
192 |
|
|
C_1 = 1.500000000000000;
|
193 |
|
|
C_2 = 2.800000000000000;
|
194 |
|
|
D_1 = 1.000000000000000;
|
195 |
|
|
FinalSum_1 = 0.0 + Product1_1 + Product_1;
|
196 |
|
|
Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2);
|
197 |
|
|
Product1_1 = 1.0 * D_1 * In1_1;
|
198 |
|
|
Product2_1 = 1.0 * B_1 * In1_1;
|
199 |
|
|
Product2_2 = 1.0 * B_2 * In1_1;
|
200 |
|
|
Product3_1 = 0.0 + (A_1 * X0_1) + (A_3 * X0_2);
|
201 |
|
|
Product3_2 = 0.0 + (A_2 * X0_1) + (A_4 * X0_2);
|
202 |
|
|
Sum1_1 = 0.0 + Product3_1 + Product2_1;
|
203 |
|
|
Sum1_2 = 0.0 + Product3_2 + Product2_2;
|
204 |
|
|
X0_1 = (0.000000000000000 -> (pre Sum1_1));
|
205 |
|
|
X0_2 = (0.000000000000000 -> (pre Sum1_2));
|
206 |
|
|
Out1_1 = FinalSum_1;
|
207 |
|
|
tel
|
208 |
|
|
|
209 |
|
|
(*
|
210 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar/ForEach2
|
211 |
|
|
*)
|
212 |
|
|
node ForEach2_155_053(In1_1 : real;
|
213 |
|
|
__time_step : real;
|
214 |
|
|
__nb_step : int;)
|
215 |
|
|
returns(Out1_1 : real;);
|
216 |
|
|
var A_1 : real;
|
217 |
|
|
A_2 : real;
|
218 |
|
|
A_3 : real;
|
219 |
|
|
A_4 : real;
|
220 |
|
|
B_1 : real;
|
221 |
|
|
B_2 : real;
|
222 |
|
|
C_1 : real;
|
223 |
|
|
C_2 : real;
|
224 |
|
|
D_1 : real;
|
225 |
|
|
FinalSum_1 : real;
|
226 |
|
|
Product_1 : real;
|
227 |
|
|
Product1_1 : real;
|
228 |
|
|
Product2_1 : real;
|
229 |
|
|
Product2_2 : real;
|
230 |
|
|
Product3_1 : real;
|
231 |
|
|
Product3_2 : real;
|
232 |
|
|
Sum1_1 : real;
|
233 |
|
|
Sum1_2 : real;
|
234 |
|
|
X0_1 : real;
|
235 |
|
|
X0_2 : real;
|
236 |
|
|
let
|
237 |
|
|
A_1 = -0.500000000000000;
|
238 |
|
|
A_2 = 1.000000000000000;
|
239 |
|
|
A_3 = -0.200000000000000;
|
240 |
|
|
A_4 = 0.000000000000000;
|
241 |
|
|
B_1 = 1.000000000000000;
|
242 |
|
|
B_2 = 0.000000000000000;
|
243 |
|
|
C_1 = 1.500000000000000;
|
244 |
|
|
C_2 = 2.800000000000000;
|
245 |
|
|
D_1 = 1.000000000000000;
|
246 |
|
|
FinalSum_1 = 0.0 + Product1_1 + Product_1;
|
247 |
|
|
Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2);
|
248 |
|
|
Product1_1 = 1.0 * D_1 * In1_1;
|
249 |
|
|
Product2_1 = 1.0 * B_1 * In1_1;
|
250 |
|
|
Product2_2 = 1.0 * B_2 * In1_1;
|
251 |
|
|
Product3_1 = 0.0 + (A_1 * X0_1) + (A_3 * X0_2);
|
252 |
|
|
Product3_2 = 0.0 + (A_2 * X0_1) + (A_4 * X0_2);
|
253 |
|
|
Sum1_1 = 0.0 + Product3_1 + Product2_1;
|
254 |
|
|
Sum1_2 = 0.0 + Product3_2 + Product2_2;
|
255 |
|
|
X0_1 = (0.000000000000000 -> (pre Sum1_1));
|
256 |
|
|
X0_2 = (0.000000000000000 -> (pre Sum1_2));
|
257 |
|
|
Out1_1 = FinalSum_1;
|
258 |
|
|
tel
|
259 |
|
|
|
260 |
|
|
(*
|
261 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar
|
262 |
|
|
*)
|
263 |
|
|
node DTFScalar_122_695(In1_1 : real;
|
264 |
|
|
In1_2 : real;
|
265 |
|
|
__time_step : real;
|
266 |
|
|
__nb_step : int;)
|
267 |
|
|
returns(Out1_1 : real;
|
268 |
|
|
Out1_2 : real;);
|
269 |
|
|
var Concatenate_1_1 : real;
|
270 |
|
|
Concatenate_1_2 : real;
|
271 |
|
|
ForEach1_1 : real;
|
272 |
|
|
ForEach2_1 : real;
|
273 |
|
|
Selector_1_In1_1 : real;
|
274 |
|
|
Selector_2_In1_1 : real;
|
275 |
|
|
let
|
276 |
|
|
Concatenate_1_1 = ForEach1_1;
|
277 |
|
|
Concatenate_1_2 = ForEach2_1;
|
278 |
|
|
ForEach1_1 = ForEach1_125_039(Selector_1_In1_1, __time_step, __nb_step);
|
279 |
|
|
ForEach2_1 = ForEach2_155_053(Selector_2_In1_1, __time_step, __nb_step);
|
280 |
|
|
Selector_1_In1_1 = In1_1;
|
281 |
|
|
Selector_2_In1_1 = In1_2;
|
282 |
|
|
Out1_1 = Concatenate_1_1;
|
283 |
|
|
Out1_2 = Concatenate_1_2;
|
284 |
|
|
tel
|
285 |
|
|
|
286 |
|
|
(*
|
287 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP/DiscreteTransferFcn1
|
288 |
|
|
*)
|
289 |
|
|
node DiscreteTransferFcn1_120_050(U_1 : real;
|
290 |
|
|
U_2 : real;
|
291 |
|
|
__time_step : real;
|
292 |
|
|
__nb_step : int;)
|
293 |
|
|
returns(Y_1 : real;
|
294 |
|
|
Y_2 : real;);
|
295 |
|
|
var DTFScalar_1 : real;
|
296 |
|
|
DTFScalar_2 : real;
|
297 |
|
|
Reshape_1 : real;
|
298 |
|
|
Reshape_2 : real;
|
299 |
|
|
ReverseReshape_1 : real;
|
300 |
|
|
ReverseReshape_2 : real;
|
301 |
|
|
let
|
302 |
|
|
(DTFScalar_1, DTFScalar_2) = DTFScalar_122_695(Reshape_1, Reshape_2, __time_step, __nb_step);
|
303 |
|
|
Reshape_1 = U_1;
|
304 |
|
|
Reshape_2 = U_2;
|
305 |
|
|
ReverseReshape_1 = DTFScalar_1;
|
306 |
|
|
ReverseReshape_2 = DTFScalar_2;
|
307 |
|
|
Y_1 = ReverseReshape_1;
|
308 |
|
|
Y_2 = ReverseReshape_2;
|
309 |
|
|
tel
|
310 |
|
|
|
311 |
|
|
(*
|
312 |
|
|
Original block name: DiscreteTransferFcn_1_orig_vs_preprocessed_PP
|
313 |
|
|
*)
|
314 |
|
|
node DiscreteTransferFcn_1_orig_vs_preprocessed_PP(_virtual : bool;)
|
315 |
|
|
returns(Out1_1 : real;
|
316 |
|
|
Out1_2 : real;
|
317 |
|
|
Out2_1 : real;
|
318 |
|
|
Out2_2 : real;);
|
319 |
|
|
var Constant_1 : real;
|
320 |
|
|
Constant_2 : real;
|
321 |
|
|
DiscreteTransferFcn_1 : real;
|
322 |
|
|
DiscreteTransferFcn_2 : real;
|
323 |
|
|
DiscreteTransferFcn1_1 : real;
|
324 |
|
|
DiscreteTransferFcn1_2 : real;
|
325 |
|
|
__time_step : real;
|
326 |
|
|
__nb_step : int;
|
327 |
|
|
let
|
328 |
|
|
Constant_1 = 3.500000000000000;
|
329 |
|
|
Constant_2 = 1.200000000000000;
|
330 |
|
|
(DiscreteTransferFcn_1, DiscreteTransferFcn_2) = DiscreteTransferFcn_119_477(Constant_1, Constant_2, __time_step, __nb_step);
|
331 |
|
|
(DiscreteTransferFcn1_1, DiscreteTransferFcn1_2) = DiscreteTransferFcn1_120_050(Constant_1, Constant_2, __time_step, __nb_step);
|
332 |
|
|
Out1_1 = DiscreteTransferFcn_1;
|
333 |
|
|
Out1_2 = DiscreteTransferFcn_2;
|
334 |
|
|
Out2_1 = DiscreteTransferFcn1_1;
|
335 |
|
|
Out2_2 = DiscreteTransferFcn1_2;
|
336 |
|
|
__time_step = (0.0 -> ((pre __time_step) + 0.100000000000000));
|
337 |
|
|
__nb_step = (0 -> ((pre __nb_step) + 1));
|
338 |
|
|
tel
|