1

 This file has been generated by MATLAB Sim2PreludeLustre

2

#open <math>

3

#open "blocs_rosace"

4


5


6

const Ts_h = 0.0200000000;

7

const Ts_K1 = 0.0200000000;

8

const Ts_K2 = 0.0200000000;

9

const Ts_f_Va = 0.0100000000;

10

const Ts_f_az = 0.0100000000;

11

const Ts_f_q = 0.0100000000;

12

const Ts_f_Vz = 0.0100000000;

13

const Ts_f_h = 0.0200000000;

14

const dt = 0.0050000000;

15

const dt_de = 0.0050000000;

16

const dt_dx = 0.0050000000;

17

const rho0 = 1.2250000000;

18

const g0 = 9.8066500000;

19

const T0_0 = 288.1500000000;

20

const T0_h = 0.0065000000;

21

const Rs = 287.0500000000;

22

const mass = 57837.5000000000;

23

const I_y = 3781272.0000000000;

24

const S = 122.6000000000;

25

const cbar = 4.2900000000;

26

const CD_0 = 0.0160000000;

27

const CD_alpha = 2.5000000000;

28

const CD_deltae = 0.0500000000;

29

const CL_alpha = 5.5000000000;

30

const CL_deltae = 0.1930000000;

31

const alpha_0 = 0.0500000000;

32

const Cm_0 = 0.0400000000;

33

const Cm_alpha = 0.8300000000;

34

const Cm_deltae = 1.5000000000;

35

const Cm_q = 30.0000000000;

36

const h_eq = 10000.0000000000;

37

const Va_eq = 230.0000000000;

38

const delta_x_eq = 1.5868660795;

39

const delta_e_eq = 0.0120096157;

40

const alpha_eq = 0.0264858477;

41

const theta_eq = 0.0264858477;

42

const Kp_h = 0.1014048000;

43

const Ki_h = 0.0048288000;

44

const Vz_c = 2.5000000000;

45

const h_switch = 50.0000000000;

46

const K1_intVa = 0.0498026107;

47

const K1_Va = 0.4868130844;

48

const K1_Vz = 0.0776030955;

49

const K1_q = 21.6923833763;

50

const K2_intVz = 0.0006273428;

51

const K2_Vz = 0.0032528367;

52

const K2_q = 0.3760714469;

53

const K2_az = 0.0015669074;

54

const T_final = 600.0000000000;

55

const h_c = 10000.0000000000;

56

const Va_c = 230.0000000000;

57


58


59


60

node Elevator_DT_Integrator (in1_1, in1_2 :real)

61

returns (out1_1 ,out1_2 :real)

62

var

63

x1_1: real;

64

x1_2:real;

65

let

66

out1_1= x1_1;

67

out1_2= x1_2;

68

x1_1 = 0.0120096157 > (0.0050000000*pre in1_1 + pre x1_1) ;

69

x1_2 = 0.0000000000 > (0.0050000000*pre in1_2 + pre x1_2) ;

70


71

tel

72


73

node Elevator_Gain (in1_1 :real)

74

returns (out1_1 :real)

75

let

76

out1_1 = 0.0000000000;

77

tel

78


79

node Elevator_Gain1 (in1_1 :real)

80

returns (out1_1 ,out1_2 :real)

81

let

82

out1_1 = 0.0000000000;

83

out1_2 = (625.0000000000*in1_1);

84

tel

85


86

node Elevator_Gain2 (in1_1, in1_2 :real)

87

returns (out1_1 ,out1_2 :real)

88

let

89

out1_1 = (in1_2);

90

out1_2 = (625.0000000000*in1_142.5000000000*in1_2);

91

tel

92


93

node Elevator_Gain3 (in1_1, in1_2 :real)

94

returns (out1_1 :real)

95

let

96

out1_1 = (in1_1);

97

tel

98


99

node verif_blocks_behaviour2_Elevator (y1_1delta_e_c : real)

100

returns ( y1_1Elevator : real)

101

var

102

y1_1DT_Integrator ,y1_2DT_Integrator :real;

103

y1_1Gain :real;

104

y1_1Gain1 ,y1_2Gain1 :real;

105

y1_1Gain2 ,y1_2Gain2 :real;

106

y1_1Gain3 :real;

107

y1_1Sum ,y1_2Sum :real;

108

y1_1Sum1 :real;

109

x1_1, x1_2: real;

110

let

111

(y1_1DT_Integrator ,y1_2DT_Integrator) = ((*!/inlining/: true; *)Elevator_DT_Integrator( y1_1Sum, y1_2Sum));

112

 y1_1DT_Integrator= x1_1;

113

 y1_2DT_Integrator= x1_2;

114

 x1_1 = 0.0120096157 > (0.0050000000*pre y1_1Sum + pre x1_1) ;

115

 x1_2 = 0.0000000000 > (0.0050000000*pre y1_2Sum + pre x1_2) ;

116

(y1_1Gain) = Elevator_Gain( y1_1delta_e_c);

117

(y1_1Gain1 ,y1_2Gain1) = Elevator_Gain1( y1_1delta_e_c);

118

(y1_1Gain2 ,y1_2Gain2) = Elevator_Gain2( y1_1DT_Integrator, y1_2DT_Integrator);

119

(y1_1Gain3) = Elevator_Gain3( y1_1DT_Integrator, y1_2DT_Integrator);

120

 y1_1Sum = y1_1Gain1 + (0.0000000000 fby y1_1Gain2) ;

121

 y1_2Sum = y1_2Gain1 + (7.5060097828 fby y1_2Gain2) ;

122

y1_1Sum = y1_1Gain1 + y1_1Gain2 ;

123

y1_2Sum = y1_2Gain1 + y1_2Gain2 ;

124

y1_1Elevator = y1_1Sum1;

125

y1_1Sum1 = y1_1Gain + y1_1Gain3 ;

126

tel

127

