ConOpSys V2970  P004.07
ANVILEX control operating system
Function_Block_DFIG_Model.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Function_Block_DFIG_Model.h
3 //! @author ANVILEX GmbH
4 //! @version V1.0
5 //! @date 02.11.2021
6 //! @brief Functional block DFIG model header file.
7 //! @attention
8 //!
9 //! COPYRIGHT(C) 2018-2021 ANVILEX GmbH
10 //!
11 //! Redistribution and use in source and binary forms, with or without
12 //! modification, are permitted provided that the following conditions are met:
13 //!
14 //! 1. Redistributions of source code must retain the above copyright notice,
15 //! this list of conditions and the following disclaimer.
16 //!
17 //! 2. Redistributions in binary form must reproduce the above copyright notice,
18 //! this list of conditions and the following disclaimer in the documentation
19 //! and/or other materials provided with the distribution.
20 //!
21 //! 3. Neither the name of ANVILEX nor the names of its contributors may be
22 //! used to endorse or promote products derived from this software without
23 //! specific prior written permission.
24 //!
25 //! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 //! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 //! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 //! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 //! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 //! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 //! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 //! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 //! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 //! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 //! POSSIBILITY OF SUCH DAMAGE.
36 //------------------------------------------------------------------------------
37 
38 //------------------------------------------------------------------------------
39 // Protecting header files from mutual, recursive inclusion.
40 //------------------------------------------------------------------------------
41 
42 #pragma once
43 
44 //------------------------------------------------------------------------------
45 // Include standard libraries header files
46 //------------------------------------------------------------------------------
47 
48 //------------------------------------------------------------------------------
49 // Include thrid party header files
50 //------------------------------------------------------------------------------
51 
52 #include "DFIG_Model_To_Code.h"
53 #include "rtwtypes.h"
54 
55 //------------------------------------------------------------------------------
56 // Include ConOpSys header files
57 //------------------------------------------------------------------------------
58 
59 #include "Function_Block_Base.h"
60 
61 //------------------------------------------------------------------------------
62 // Include ConOpSys application header files
63 //------------------------------------------------------------------------------
64 
65 //------------------------------------------------------------------------------
66 // Macros
67 //------------------------------------------------------------------------------
68 
69 //------------------------------------------------------------------------------
70 //! @brief Functional block class declaration
71 //------------------------------------------------------------------------------
72 
74 {
75 
76  //----------------------------------------------------------------------------
77  // Public variables and methods
78  //----------------------------------------------------------------------------
79 
80  public:
81 
82  //--------------------------------------------------------------------------
83  // Constructor and destructor methods
84  //--------------------------------------------------------------------------
85 
86  //!-------------------------------------------------------------------------
87  //! @brief Function block class constructor method.
88  //! @note None
89  //! \par Override
90  //! Not allowed
91  //! @attention Don't call this method directly.
92  //--------------------------------------------------------------------------
93 
95 
96  //!-------------------------------------------------------------------------
97  //! @brief Function block class desstructor method.
98  //! @note None
99  //! \par Override
100  //! Not allowed
101  //! @attention Don't call this method directly.
102  //--------------------------------------------------------------------------
103 
105 
106  //--------------------------------------------------------------------------
107  // Function block data processing methods
108  //--------------------------------------------------------------------------
109 
110  //!-------------------------------------------------------------------------
111  //! @brief Functional block initialisation method.
112  //! @note None
113  //! \par Override
114  //! Not allowed
115  //! @attention None
116  //--------------------------------------------------------------------------
117 
118  virtual VOID Init();
119 
120  //!-------------------------------------------------------------------------
121  //! @brief Functional block execution method.
122  //! @note None
123  //! \par Override
124  //! Not allowed
125  //! @attention None
126  //--------------------------------------------------------------------------
127 
128  virtual VOID Execute();
129 
130  //--------------------------------------------------------------------------
131  // Function block parameters
132  //--------------------------------------------------------------------------
133 
134  //--------------------------------------------------------------------------
135  // Function block inputs
136  //--------------------------------------------------------------------------
137 
138  //! @brief Stator contactor control signal
140 
141  //! @brief Grid side inverter contactor control signal
143 
144  //! @brief First grid side inverter transistor PWM signal
146 
147  //! @brief Second grid side inverter transistor PWM signal
149 
150  //! @brief Third grid side inverter transistor PWM signal
152 
153  //! @brief Fourth grid side inverter transistor PWM signal
155 
156  //! @brief Fifth grid side inverter transistor PWM signal
158 
159  //! @brief Sixth grid side inverter transistor PWM signal
161 
162  //! @brief First rotor side inverter transistor PWM signal
164 
165  //! @brief Second rotor side inverter transistor PWM signal
167 
168  //! @brief Third rotor side inverter transistor PWM signal
170 
171  //! @brief Fourth rotor side inverter transistor PWM signal
173 
174  //! @brief Fifth rotor side inverter transistor PWM signal
176 
177  //! @brief Sixth rotor side inverter transistor PWM signal
179 
180  //! @brief First ballast resistor control signal
182 
183  //! @brief Second ballast resistor control signal
185 
186  //! @brief DC precharge control signal
188 
189  //! @brief Generator rotor speed
191 
192  //--------------------------------------------------------------------------
193  // Function block outputs
194  //--------------------------------------------------------------------------
195 
196  //! @brief Rotor angle
198 
199  //! @brief Stator side phase A grid current value
201 
202  //! @brief Stator side phase B grid current value
204 
205  //! @brief Stator side phase C grid current value
207 
208  //! @brief Stator side phase AB grid voltage value
210 
211  //! @brief Stator side phase BC grid voltage value
213 
214  //! @brief Stator side phase CA grid voltage value
216 
217  //! @brief Stator phase AB voltage value
219 
220  //! @brief Stator phase BC voltage value
222 
223  //! @brief Stator phase CA voltage value
225 
226  //! @brief Grid side inverter phase AB voltage value
228 
229  //! @brief Grid side inverter phase BC voltage value
231 
232  //! @brief Grid side inverter phase CA voltage value
234 
235  //! @brief Grid side inverter phase A current value
237 
238  //! @brief Grid side inverter phase B current value
240 
241  //! @brief Grid side inverter phase C current value
243 
244  //! @brief Direct current voltage value
246 
247  //! @brief Rotor side inverter phase A current value
249 
250  //! @brief Rotor side inverter phase B current value
252 
253  //! @brief Rotor side inverter phase C current value
255 
256  //----------------------------------------------------------------------------
257  // Protected variables and methods
258  //----------------------------------------------------------------------------
259 
260  protected:
261 
262  //----------------------------------------------------------------------------
263  // Private variables and methods
264  //----------------------------------------------------------------------------
265 
266  private:
267 
268  //!---------------------------------------------------------------------------
269  //! @brief Model step function.
270  //! @note None
271  //! @param None
272  //! @return None
273  //! \par Override
274  //! Not allowed
275  //! @attention None
276  //----------------------------------------------------------------------------
277 
278  void rt_OneStep(void);
279 
280  //----------------------------------------------------------------------------
281  // Private objects
282  //----------------------------------------------------------------------------
283 
284  //! @brief DFIG_Model_To_CodeModelClass object
286 
287 
288 };
289 
290 //------------------------------------------------------------------------------
291 // End of file
292 //------------------------------------------------------------------------------
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
Function block base class header file.
Definition: DFIG_Model_To_Code.h:401
Function block input connector class.
Definition: Block_Input_Connector.h:83
Function block output connector class.
Definition: Block_Output_Connector.h:59
Function block base class for device.
Definition: Function_Block_Base.h:96
Functional block class declaration.
Definition: Function_Block_DFIG_Model.h:74
TBlock_Output_Connector object_f64_DC_Voltage_Value
Direct current voltage value.
Definition: Function_Block_DFIG_Model.h:245
TBlock_Input_Connector object_bool_GSI_PWM_5_Control
Fifth grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:157
virtual VOID Init()
Functional block initialisation method.
Definition: Function_Block_DFIG_Model.cpp:233
TBlock_Input_Connector object_bool_Ballast_1_Control
First ballast resistor control signal.
Definition: Function_Block_DFIG_Model.h:181
TBlock_Output_Connector object_u16_Rotor_Angle
Rotor angle.
Definition: Function_Block_DFIG_Model.h:197
TBlock_Output_Connector object_f64_Grid_Stator_Phase_BC_Voltage_Value
Stator side phase BC grid voltage value.
Definition: Function_Block_DFIG_Model.h:212
TBlock_Input_Connector object_bool_SC_CTRL
Stator contactor control signal.
Definition: Function_Block_DFIG_Model.h:139
TBlock_Input_Connector object_bool_GSI_PWM_2_Control
Second grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:148
TBlock_Input_Connector object_bool_Ballast_2_Control
Second ballast resistor control signal.
Definition: Function_Block_DFIG_Model.h:184
TBlock_Output_Connector object_f64_GSI_Phase_BC_Voltage_Value
Grid side inverter phase BC voltage value.
Definition: Function_Block_DFIG_Model.h:230
TBlock_Output_Connector object_f64_Stator_Phase_CA_Voltage_Value
Stator phase CA voltage value.
Definition: Function_Block_DFIG_Model.h:224
TBlock_Input_Connector object_bool_GSI_CTRL
Grid side inverter contactor control signal.
Definition: Function_Block_DFIG_Model.h:142
TBlock_Output_Connector object_f64_RSI_Phase_C_Current_Value
Rotor side inverter phase C current value.
Definition: Function_Block_DFIG_Model.h:254
TBlock_Input_Connector object_bool_RSI_PWM_3_Control
Third rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:169
TFunction_Block_DFIG_Model()
Function block class constructor method.
Definition: Function_Block_DFIG_Model.cpp:64
TBlock_Output_Connector object_f64_Grid_Stator_Phase_A_Current_Value
Stator side phase A grid current value.
Definition: Function_Block_DFIG_Model.h:200
TBlock_Output_Connector object_f64_Grid_Stator_Phase_B_Current_Value
Stator side phase B grid current value.
Definition: Function_Block_DFIG_Model.h:203
TBlock_Output_Connector object_f64_Stator_Phase_AB_Voltage_Value
Stator phase AB voltage value.
Definition: Function_Block_DFIG_Model.h:218
TBlock_Input_Connector object_bool_RSI_PWM_4_Control
Fourth rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:172
TBlock_Input_Connector object_bool_RSI_PWM_1_Control
First rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:163
TBlock_Output_Connector object_f64_Stator_Phase_BC_Voltage_Value
Stator phase BC voltage value.
Definition: Function_Block_DFIG_Model.h:221
void rt_OneStep(void)
Model step function.
Definition: Function_Block_DFIG_Model.cpp:302
TBlock_Output_Connector object_f64_GSI_Phase_A_Current_Value
Grid side inverter phase A current value.
Definition: Function_Block_DFIG_Model.h:236
TBlock_Output_Connector object_f64_GSI_Phase_CA_Voltage_Value
Grid side inverter phase CA voltage value.
Definition: Function_Block_DFIG_Model.h:233
DFIG_Model_To_CodeModelClass rtObj
DFIG_Model_To_CodeModelClass object.
Definition: Function_Block_DFIG_Model.h:285
TBlock_Input_Connector object_bool_RSI_PWM_5_Control
Fifth rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:175
TBlock_Output_Connector object_f64_GSI_Phase_B_Current_Value
Grid side inverter phase B current value.
Definition: Function_Block_DFIG_Model.h:239
TBlock_Input_Connector object_bool_GSI_PWM_4_Control
Fourth grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:154
virtual VOID Execute()
Functional block execution method.
Definition: Function_Block_DFIG_Model.cpp:248
TBlock_Output_Connector object_f64_RSI_Phase_A_Current_Value
Rotor side inverter phase A current value.
Definition: Function_Block_DFIG_Model.h:248
~TFunction_Block_DFIG_Model()
Function block class desstructor method.
Definition: Function_Block_DFIG_Model.cpp:225
TBlock_Output_Connector object_f64_GSI_Phase_AB_Voltage_Value
Grid side inverter phase AB voltage value.
Definition: Function_Block_DFIG_Model.h:227
TBlock_Output_Connector object_f64_GSI_Phase_C_Current_Value
Grid side inverter phase C current value.
Definition: Function_Block_DFIG_Model.h:242
TBlock_Input_Connector object_bool_GSI_PWM_6_Control
Sixth grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:160
TBlock_Output_Connector object_f64_Grid_Stator_Phase_CA_Voltage_Value
Stator side phase CA grid voltage value.
Definition: Function_Block_DFIG_Model.h:215
TBlock_Input_Connector object_bool_RSI_PWM_6_Control
Sixth rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:178
TBlock_Input_Connector object_f64_Rotor_Speed
Generator rotor speed.
Definition: Function_Block_DFIG_Model.h:190
TBlock_Output_Connector object_f64_Grid_Stator_Phase_C_Current_Value
Stator side phase C grid current value.
Definition: Function_Block_DFIG_Model.h:206
TBlock_Output_Connector object_f64_RSI_Phase_B_Current_Value
Rotor side inverter phase B current value.
Definition: Function_Block_DFIG_Model.h:251
TBlock_Input_Connector object_bool_RSI_PWM_2_Control
Second rotor side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:166
TBlock_Input_Connector object_bool_GSI_PWM_3_Control
Third grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:151
TBlock_Input_Connector object_bool_GSI_PWM_1_Control
First grid side inverter transistor PWM signal.
Definition: Function_Block_DFIG_Model.h:145
TBlock_Input_Connector object_bool_DC_Precharge_Control
DC precharge control signal.
Definition: Function_Block_DFIG_Model.h:187
TBlock_Output_Connector object_f64_Grid_Stator_Phase_AB_Voltage_Value
Stator side phase AB grid voltage value.
Definition: Function_Block_DFIG_Model.h:209