PmsmSimUt_data.cpp 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. //
  2. // File: PmsmSimUt_data.cpp
  3. //
  4. // Code generated for Simulink model 'PmsmSimUt'.
  5. //
  6. // Model version : 1.18
  7. // Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
  8. // C/C++ source code generated on : Tue Aug 1 23:42:37 2023
  9. //
  10. // Target selection: ert.tlc
  11. // Embedded hardware selection: Intel->x86-64 (Windows64)
  12. // Code generation objectives: Unspecified
  13. // Validation result: Not run
  14. //
  15. #include "PmsmSimUt.h"
  16. #include "PmsmSimUt_private.h"
  17. // Block parameters (default storage)
  18. PmsmSimUtModelClass::P_PmsmSimUt_T PmsmSimUtModelClass::PmsmSimUt_P = {
  19. // Variable: Params
  20. // Referenced by:
  21. // '<Root>/Constant1'
  22. // '<Root>/Constant2'
  23. // '<Root>/Constant3'
  24. // '<Root>/Constant4'
  25. // '<Root>/Gain1'
  26. // '<S2>/Constant4'
  27. // '<S6>/Constant1'
  28. // '<S6>/Constant2'
  29. // '<S6>/Constant3'
  30. // '<S7>/Gain'
  31. // '<S15>/Gain'
  32. // '<S15>/Kp4'
  33. // '<S15>/Kp5'
  34. // '<S16>/Gain'
  35. // '<S16>/Kp4'
  36. // '<S16>/Kp5'
  37. // '<S17>/Constant'
  38. // '<S17>/Constant1'
  39. // '<S17>/Constant2'
  40. // '<S17>/Constant3'
  41. // '<S17>/Discrete-Time Integrator'
  42. // '<S17>/Gain'
  43. // '<S17>/Gain1'
  44. // '<S17>/Gain2'
  45. // '<S18>/Gain'
  46. // '<S18>/Gain1'
  47. // '<S20>/Gain'
  48. // '<S20>/Kp4'
  49. // '<S20>/Kp5'
  50. // '<S19>/Constant1'
  51. // '<S19>/Gain'
  52. // '<S19>/Gain1'
  53. {
  54. 0.0001,
  55. 1.0,
  56. 0.0,
  57. 1000.0,
  58. 0.1,
  59. 0.002,
  60. 0.25,
  61. 1.8,
  62. 0.25,
  63. 1.8,
  64. 0.0,
  65. 0.0008,
  66. 2.0,
  67. 0.00056,
  68. 8.1e-5,
  69. 8.1e-5,
  70. 0.0789
  71. },
  72. // Mask Parameter: AlphaBetaZerotodq0_Alignment
  73. // Referenced by: '<S1>/Constant'
  74. 1.0,
  75. // Mask Parameter: AlphaBetaZerotodq0_Alignment_e
  76. // Referenced by: '<S21>/Constant'
  77. 1.0,
  78. // Mask Parameter: Subsystem_Init
  79. // Referenced by: '<S20>/Discrete-Time Integrator'
  80. 0.0,
  81. // Mask Parameter: Subsystem1_Init
  82. // Referenced by: '<S16>/Discrete-Time Integrator'
  83. 0.0,
  84. // Mask Parameter: Subsystem_Init_c
  85. // Referenced by: '<S15>/Discrete-Time Integrator'
  86. 0.0,
  87. // Mask Parameter: CompareToConstant_const
  88. // Referenced by: '<S11>/Constant'
  89. 1.0,
  90. // Mask Parameter: CompareToConstant1_const
  91. // Referenced by: '<S12>/Constant'
  92. 2.0,
  93. // Mask Parameter: CompareToConstant_const_a
  94. // Referenced by: '<S23>/Constant'
  95. 1.0,
  96. // Mask Parameter: CompareToConstant1_const_o
  97. // Referenced by: '<S24>/Constant'
  98. 2.0,
  99. // Expression: [0,0]
  100. // Referenced by: '<S13>/dq'
  101. { 0.0, 0.0 },
  102. // Expression: [0,0]
  103. // Referenced by: '<S14>/dq'
  104. { 0.0, 0.0 },
  105. // Computed Parameter: Wm_Y0
  106. // Referenced by: '<S19>/Wm'
  107. 0.0,
  108. // Computed Parameter: DiscreteTimeIntegrator1_gainval
  109. // Referenced by: '<S19>/Discrete-Time Integrator1'
  110. 1.0,
  111. // Expression: 0
  112. // Referenced by: '<S19>/Discrete-Time Integrator1'
  113. 0.0,
  114. // Expression: pi/30
  115. // Referenced by: '<S18>/Gain3'
  116. 0.10471975511965977,
  117. // Computed Parameter: Iq_ref_Y0
  118. // Referenced by: '<S5>/Iq_ref'
  119. 0.0,
  120. // Computed Parameter: DiscreteTimeIntegrator_gainval
  121. // Referenced by: '<S20>/Discrete-Time Integrator'
  122. 1.0,
  123. // Expression: Limits(1)
  124. // Referenced by: '<S20>/Discrete-Time Integrator'
  125. 500.0,
  126. // Expression: Limits(2)
  127. // Referenced by: '<S20>/Discrete-Time Integrator'
  128. -500.0,
  129. // Expression: Limits(1)
  130. // Referenced by: '<S20>/Saturation2'
  131. 500.0,
  132. // Expression: Limits(2)
  133. // Referenced by: '<S20>/Saturation2'
  134. -500.0,
  135. // Expression: 0
  136. // Referenced by: '<Root>/Constant5'
  137. 0.0,
  138. // Expression: 1
  139. // Referenced by: '<Root>/Constant6'
  140. 1.0,
  141. // Expression: Limits(1)
  142. // Referenced by: '<S16>/Saturation2'
  143. 10000.0,
  144. // Expression: Limits(2)
  145. // Referenced by: '<S16>/Saturation2'
  146. -10000.0,
  147. // Expression: Limits(1)
  148. // Referenced by: '<S15>/Saturation2'
  149. 10000.0,
  150. // Expression: Limits(2)
  151. // Referenced by: '<S15>/Saturation2'
  152. -10000.0,
  153. // Expression: [0,0]
  154. // Referenced by: '<S25>/dq'
  155. { 0.0, 0.0 },
  156. // Expression: [0,0]
  157. // Referenced by: '<S26>/dq'
  158. { 0.0, 0.0 },
  159. // Computed Parameter: DiscreteTimeIntegrator_gainva_p
  160. // Referenced by: '<S18>/Discrete-Time Integrator'
  161. 1.0,
  162. // Expression: 0
  163. // Referenced by: '<S18>/Discrete-Time Integrator'
  164. 0.0,
  165. // Expression: 2*pi
  166. // Referenced by: '<S18>/Constant'
  167. 6.2831853071795862,
  168. // Computed Parameter: DiscreteTimeIntegrator1_gainv_b
  169. // Referenced by: '<S17>/Discrete-Time Integrator1'
  170. 1.0,
  171. // Expression: 0
  172. // Referenced by: '<S17>/Discrete-Time Integrator1'
  173. 0.0,
  174. // Computed Parameter: DiscreteTimeIntegrator_gainv_pq
  175. // Referenced by: '<S17>/Discrete-Time Integrator'
  176. 1.0,
  177. // Expression: 0
  178. // Referenced by: '<S10>/Constant'
  179. 0.0,
  180. // Expression: K1
  181. // Referenced by: '<S30>/K1'
  182. 1.0,
  183. // Expression: K2
  184. // Referenced by: '<S30>/K2'
  185. 1.0,
  186. // Expression: 0
  187. // Referenced by: '<Root>/Switch2'
  188. 0.0,
  189. // Expression: 0
  190. // Referenced by: '<S18>/Switch'
  191. 0.0,
  192. // Expression: 0
  193. // Referenced by: '<Root>/Switch3'
  194. 0.0,
  195. // Expression: -1
  196. // Referenced by: '<S6>/Gain1'
  197. -1.0,
  198. // Expression: 0
  199. // Referenced by: '<Root>/Switch5'
  200. 0.0,
  201. // Expression: 0
  202. // Referenced by: '<Root>/Switch4'
  203. 0.0,
  204. // Computed Parameter: DiscreteTimeIntegrator_gainva_b
  205. // Referenced by: '<S16>/Discrete-Time Integrator'
  206. 1.0,
  207. // Expression: Limits(1)
  208. // Referenced by: '<S16>/Discrete-Time Integrator'
  209. 10000.0,
  210. // Expression: Limits(2)
  211. // Referenced by: '<S16>/Discrete-Time Integrator'
  212. -10000.0,
  213. // Expression: 0
  214. // Referenced by: '<Root>/Switch1'
  215. 0.0,
  216. // Expression: 0
  217. // Referenced by: '<S7>/Memory'
  218. 0.0,
  219. // Expression: 10000
  220. // Referenced by: '<Root>/Saturation2'
  221. 10000.0,
  222. // Expression: -10000
  223. // Referenced by: '<Root>/Saturation2'
  224. -10000.0,
  225. // Computed Parameter: DiscreteTimeIntegrator_gainva_c
  226. // Referenced by: '<S15>/Discrete-Time Integrator'
  227. 1.0,
  228. // Expression: Limits(1)
  229. // Referenced by: '<S15>/Discrete-Time Integrator'
  230. 10000.0,
  231. // Expression: Limits(2)
  232. // Referenced by: '<S15>/Discrete-Time Integrator'
  233. -10000.0,
  234. // Expression: 0
  235. // Referenced by: '<Root>/Switch6'
  236. 0.0,
  237. // Expression: 0
  238. // Referenced by: '<S9>/Constant'
  239. 0.0,
  240. // Expression: K1
  241. // Referenced by: '<S28>/K1'
  242. 1.0,
  243. // Expression: K2
  244. // Referenced by: '<S28>/K2'
  245. 1.0,
  246. // Expression: [ 1 -1/2 -1/2; 0 sqrt(3)/2 -sqrt(3)/2; 1/2 1/2 1/2 ]
  247. // Referenced by: '<S22>/Gain3'
  248. { 1.0, 0.0, 0.5, -0.5, 0.8660254037844386, 0.5, -0.5, -0.8660254037844386, 0.5
  249. },
  250. // Expression: 2/3
  251. // Referenced by: '<S22>/Gain1'
  252. 0.66666666666666663,
  253. // Expression: 30/pi
  254. // Referenced by: '<S18>/Gain2'
  255. 9.5492965855137211,
  256. // Expression: -0.01
  257. // Referenced by: '<S7>/Dead Zone'
  258. -0.01,
  259. // Expression: 0.01
  260. // Referenced by: '<S7>/Dead Zone'
  261. 0.01,
  262. // Expression: 0.1
  263. // Referenced by: '<S7>/Relay1'
  264. 0.1,
  265. // Expression: 0
  266. // Referenced by: '<S7>/Relay1'
  267. 0.0,
  268. // Expression: 1000
  269. // Referenced by: '<S7>/Relay1'
  270. 1000.0,
  271. // Expression: 0
  272. // Referenced by: '<S7>/Relay1'
  273. 0.0,
  274. // Expression: 0
  275. // Referenced by: '<S7>/Relay2'
  276. 0.0,
  277. // Expression: -0.1
  278. // Referenced by: '<S7>/Relay2'
  279. -0.1,
  280. // Expression: 0
  281. // Referenced by: '<S7>/Relay2'
  282. 0.0,
  283. // Expression: -1000
  284. // Referenced by: '<S7>/Relay2'
  285. -1000.0,
  286. // Computed Parameter: ManualSwitch1_CurrentSetting
  287. // Referenced by: '<Root>/Manual Switch1'
  288. 0U
  289. };
  290. //
  291. // File trailer for generated code.
  292. //
  293. // [EOF]
  294. //