/* * VFControl.h * * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * Code generation for model "VFControl". * * Model version : 1.1 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 * C++ source code generated on : Wed Oct 16 11:33:22 2024 * * Target selection: speedgoat.tlc * Note: GRT includes extra infrastructure and instrumentation for prototyping * Embedded hardware selection: Intel->x86-64 (Linux 64) * Code generation objectives: Unspecified * Validation result: Not run */ #ifndef VFControl_h_ #define VFControl_h_ #include "rtwtypes.h" #include "simstruc.h" #include "fixedpoint.h" #include "sg_fpga_io30x_setup_util.h" #include "sg_fpga_io31x_io32x_setup_util.h" #include "sg_fpga_io33x_setup_util.h" #include "sg_fpga_io36x_setup_util.h" #include "sg_fpga_io39x_setup_util.h" #include "sg_fpga_io3xx_scatter_gather_dma.h" #include "sg_common.h" #include "sg_printf.h" #include "VFControl_types.h" #include "PWMGenerator.h" #include #include "rtGetNaN.h" #include #include "VFControl_cal.h" extern "C" { #include "rt_nonfinite.h" } /* Macros for accessing real-time model data structure */ #ifndef rtmGetContTimeOutputInconsistentWithStateAtMajorStepFlag #define rtmGetContTimeOutputInconsistentWithStateAtMajorStepFlag(rtm) ((rtm)->CTOutputIncnstWithState) #endif #ifndef rtmSetContTimeOutputInconsistentWithStateAtMajorStepFlag #define rtmSetContTimeOutputInconsistentWithStateAtMajorStepFlag(rtm, val) ((rtm)->CTOutputIncnstWithState = (val)) #endif #ifndef rtmGetDerivCacheNeedsReset #define rtmGetDerivCacheNeedsReset(rtm) ((rtm)->derivCacheNeedsReset) #endif #ifndef rtmSetDerivCacheNeedsReset #define rtmSetDerivCacheNeedsReset(rtm, val) ((rtm)->derivCacheNeedsReset = (val)) #endif #ifndef rtmGetFinalTime #define rtmGetFinalTime(rtm) ((rtm)->Timing.tFinal) #endif #ifndef rtmGetSampleHitArray #define rtmGetSampleHitArray(rtm) ((rtm)->Timing.sampleHitArray) #endif #ifndef rtmGetStepSize #define rtmGetStepSize(rtm) ((rtm)->Timing.stepSize) #endif #ifndef rtmGetZCCacheNeedsReset #define rtmGetZCCacheNeedsReset(rtm) ((rtm)->zCCacheNeedsReset) #endif #ifndef rtmSetZCCacheNeedsReset #define rtmSetZCCacheNeedsReset(rtm, val) ((rtm)->zCCacheNeedsReset = (val)) #endif #ifndef rtmGet_TimeOfLastOutput #define rtmGet_TimeOfLastOutput(rtm) ((rtm)->Timing.timeOfLastOutput) #endif #ifndef rtmCounterLimit #define rtmCounterLimit(rtm, idx) ((rtm)->Timing.TaskCounters.cLimit[(idx)]) #endif #ifndef rtmGetErrorStatus #define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) #endif #ifndef rtmSetErrorStatus #define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) #endif #ifndef rtmGetErrorStatusPointer #define rtmGetErrorStatusPointer(rtm) ((const char_T **)(&((rtm)->errorStatus))) #endif #ifndef rtmStepTask #define rtmStepTask(rtm, idx) ((rtm)->Timing.TaskCounters.TID[(idx)] == 0) #endif #ifndef rtmGetStopRequested #define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag) #endif #ifndef rtmSetStopRequested #define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val)) #endif #ifndef rtmGetStopRequestedPtr #define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag)) #endif #ifndef rtmGetT #define rtmGetT(rtm) (rtmGetTPtr((rtm))[0]) #endif #ifndef rtmGetTFinal #define rtmGetTFinal(rtm) ((rtm)->Timing.tFinal) #endif #ifndef rtmGetTPtr #define rtmGetTPtr(rtm) ((rtm)->Timing.t) #endif #ifndef rtmGetTStart #define rtmGetTStart(rtm) ((rtm)->Timing.tStart) #endif #ifndef rtmTaskCounter #define rtmTaskCounter(rtm, idx) ((rtm)->Timing.TaskCounters.TID[(idx)]) #endif #ifndef rtmGetTimeOfLastOutput #define rtmGetTimeOfLastOutput(rtm) ((rtm)->Timing.timeOfLastOutput) #endif /* Block signals (default storage) */ struct B_VFControl_T { real_T xk1[4]; /* '/fluxes' */ real_T Gain[4]; /* '/Gain' */ real_T fluxes[4]; /* '/fluxes' */ real_T Sum2[4]; /* '/Sum2' */ real_T Linv[16]; /* '/Switch' */ real_T Product3[4]; /* '/Product3' */ real_T Rotoranglethetam; /* '/Rotor angle thetam' */ real_T wm_delay; /* '/wm_delay' */ real_T F2; /* '/F2' */ real_T wm_predict; /* '/wm_predict' */ real_T Sum1; /* '/Sum1' */ real_T MultiportSwitch[4]; /* '/Multiport Switch' */ real_T MultiportSwitch_p[2]; /* '/Multiport Switch' */ real_T MultiportSwitch1[2]; /* '/Multiport Switch1' */ real_T ib[4]; /* '/ib' */ real_T GainVr_Vs1[2]; /* '/Gain Vr_Vs1' */ real_T StateSpace_o1[14]; /* '/State-Space' */ real_T StateSpace_o2[6]; /* '/State-Space' */ real_T iqsids[2]; /* '/1-1' */ real_T Mult1[2]; /* '/Mult1' */ real_T Sum2_k; /* '/Sum2' */ real_T Switch2; /* '/Switch2' */ real_T GainVr_Vs[2]; /* '/Gain Vr_Vs' */ real_T u_Vb[4]; /* '/1_Vb' */ real_T MultiportSwitch1_f[2]; /* '/Multiport Switch1' */ real_T MultiportSwitch_p2[2]; /* '/Multiport Switch' */ real_T voltages[4]; /* '/voltages' */ real_T DigitalClock; /* '/Digital Clock' */ real_T IC[4]; /* '/IC' */ real_T Sum2_l; /* '/Sum2' */ real_T Sum3; /* '/Sum3' */ real_T unitconversion[19]; /* '/unit conversion' */ real_T up; /* '/1\p' */ real_T wTethr[3]; /* '/1\p1' */ real_T Unitconversion; /* '/Unit conversion' */ real_T F; /* '/F' */ real_T Sum; /* '/Sum' */ real_T u_2H; /* '/1_2H' */ real_T Rotorspeedwm; /* '/Rotor speed(wm)' */ real_T web_psb; /* '/web_psb' */ real_T DigitalClock_k; /* '/Digital Clock' */ real_T LookUpTable; /* '/Look-Up Table' */ real_T Toff; /* '/Step1' */ real_T Ton; /* '/Step' */ real_T DiscreteTimeIntegrator1; /* '/Discrete-Time Integrator1' */ real_T UnitDelay1; /* '/Unit Delay1' */ real_T Switch2_d; /* '/Switch2' */ real_T Switch3; /* '/Switch3' */ real_T Switch2_a; /* '/Switch2' */ real_T Sum3_e; /* '/Sum3' */ real_T Switch1; /* '/Switch1' */ real_T Switch5[3]; /* '/Switch5' */ real_T t; /* '/t' */ real_T Gain_p; /* '/Gain' */ real_T Product; /* '/Product' */ real_T DiscreteTimeIntegrator; /* '/Discrete-Time Integrator' */ real_T Sum_n; /* '/Sum' */ real_T Gain3; /* '/Gain3' */ real_T Switch3_o; /* '/Switch3' */ real_T Sum2_j[3]; /* '/Sum2' */ real_T Switch1_a[3]; /* '/Switch1' */ real_T Switch5_b[3]; /* '/Switch5' */ real_T Sum7[3]; /* '/Sum7' */ real_T TrigonometricFunction1[3]; /* '/Trigonometric Function1' */ real_T Product2[3]; /* '/Product2' */ real_T Ton_e; /* '/Step' */ real_T Toff_e; /* '/Step1' */ real_T Sum4; /* '/Sum4' */ real_T DataTypeConversion; /* '/Data Type Conversion' */ real_T Gain1; /* '/Gain1' */ real_T Gain3_f; /* '/Gain3' */ real_T Sum1_m; /* '/Sum1' */ real_T MultiportSwitch_h[3]; /* '/Multiport Switch' */ real_T Sum_j[3]; /* '/Sum' */ real_T TrigonometricFunction1_d[3]; /* '/Trigonometric Function1' */ real_T Product1[3]; /* '/Product1' */ real_T Gain1_m; /* '/Gain1' */ real_T Gain3_a; /* '/Gain3' */ real_T Sum1_m3; /* '/Sum1' */ real_T MultiportSwitch_n[3]; /* '/Multiport Switch' */ real_T Sum_i[3]; /* '/Sum' */ real_T TrigonometricFunction1_c[3]; /* '/Trigonometric Function1' */ real_T Product1_i[3]; /* '/Product1' */ real_T Sum4_o[3]; /* '/Sum4' */ real_T Sum8[3]; /* '/Sum8' */ real_T Clock; /* '/Clock' */ real_T Add1; /* '/Add1' */ real_T MathFunction; /* '/Math Function' */ real_T uib1; /* '/1\ib1' */ real_T uDLookupTable; /* '/1-D Lookup Table' */ real_T Add3; /* '/Add3' */ real_T Model_o1; /* '/Model' */ real_T Model_o2; /* '/Model' */ real_T Model_o3; /* '/Model' */ real_T DigitalClock_m; /* '/Digital Clock' */ real_T Add1_e; /* '/Add1' */ real_T MathFunction_l; /* '/Math Function' */ real_T uib1_h; /* '/1\ib1' */ real_T uDLookupTable_b; /* '/1-D Lookup Table' */ real_T Add3_h; /* '/Add3' */ real_T Model1_o1; /* '/Model1' */ real_T Model1_o2; /* '/Model1' */ real_T Model1_o3; /* '/Model1' */ real_T DigitalClock_ms; /* '/Digital Clock' */ real_T Add1_l; /* '/Add1' */ real_T MathFunction_o; /* '/Math Function' */ real_T uib1_e; /* '/1\ib1' */ real_T uDLookupTable_bk; /* '/1-D Lookup Table' */ real_T Add3_n; /* '/Add3' */ real_T Model2_o1; /* '/Model2' */ real_T Model2_o2; /* '/Model2' */ real_T Model2_o3; /* '/Model2' */ real_T TransportDelay; /* '/Transport Delay' */ real_T TransportDelay_i; /* '/Transport Delay' */ real_T TransportDelay_n; /* '/Transport Delay' */ real_T Switch; /* '/Switch' */ real_T Saturation[6]; /* '/Saturation' */ real_T DataTypeConversion_p[6]; /* '/Data Type Conversion' */ real_T DataTypeConversion1; /* '/Data Type Conversion1' */ real_T Product4[6]; /* '/Product4' */ real_T DataTypeConversion_f; /* '/Data Type Conversion' */ real_T Switch_e; /* '/Switch' */ real_T DataTypeConversion_l; /* '/Data Type Conversion' */ real_T Switch_k; /* '/Switch' */ real_T DataTypeConversion_h; /* '/Data Type Conversion' */ real_T Switch_i; /* '/Switch' */ real_T DataTypeConversion_k; /* '/Data Type Conversion' */ real_T Switch_a; /* '/Switch' */ real_T DataTypeConversion_i; /* '/Data Type Conversion' */ real_T Switch_a4; /* '/Switch' */ real_T DataTypeConversion_c; /* '/Data Type Conversion' */ real_T Product_n; /* '/Product' */ real_T Product_b; /* '/Product' */ real_T Product_l; /* '/Product' */ real_T Switch4; /* '/Switch4' */ real_T Gain2; /* '/Gain2' */ real_T Sum1_o; /* '/Sum1' */ real_T Gain3_m[3]; /* '/Gain3' */ real_T wtrad; /* '/Math Function' */ real_T Switch_c; /* '/Switch' */ real_T donotdeletethisgain; /* '/do not delete this gain' */ real_T donotdeletethisgain_k; /* '/do not delete this gain' */ real_T donotdeletethisgain_o; /* '/do not delete this gain' */ real_T Kv1[3]; /* '/Kv1' */ real_T donotdeletethisgain_kv; /* '/do not delete this gain' */ real_T donotdeletethisgain_b; /* '/do not delete this gain' */ real_T donotdeletethisgain_h; /* '/do not delete this gain' */ real_T Kv[3]; /* '/Kv' */ real_T UnitDelay; /* '/Unit Delay' */ real_T uRsw; /* '/1//Rsw' */ real_T uRsw_n; /* '/1//Rsw' */ real_T uRsw_i; /* '/1//Rsw' */ real_T uRsw_g; /* '/1//Rsw' */ real_T uRsw_c; /* '/1//Rsw' */ real_T uRsw_k; /* '/1//Rsw' */ real_T Switch1_j; /* '/Switch1' */ real_T MultiportSwitch1_b; /* '/Multiport Switch1' */ real_T Gain1_f; /* '/Gain1' */ real_T Product1_f; /* '/Product1' */ real_T TrigonometricFunction1_l; /* '/Trigonometric Function1' */ real_T Mod; /* '/Product' */ real_T Step; /* '/Product2' */ real_T Gain4; /* '/Gain4' */ real_T Gain3_n; /* '/Gain3' */ real_T Sum2_lw[3]; /* '/Sum2' */ real_T Constant[2]; /* '/Constant' */ real_T Gain3_e; /* '/Gain3' */ real_T TrigonometricFunction_o1; /* '/Trigonometric Function' */ real_T TrigonometricFunction_o2; /* '/Trigonometric Function' */ real_T W34wr[16]; /* '/W(3,4)=-wr' */ real_T W43wr[16]; /* '/W(4,3)=wr' */ real_T Constant_e[2]; /* '/Constant' */ real_T Gain1_e; /* '/Gain1' */ real_T TrigonometricFunction_o1_d; /* '/Trigonometric Function' */ real_T TrigonometricFunction_o2_j; /* '/Trigonometric Function' */ real_T W12wr[16]; /* '/W(1,2)=wr' */ real_T W21wr[16]; /* '/W(2,1)=-wr' */ real_T DigitalClock_kx; /* '/Digital Clock' */ real_T wewr; /* '/Sum' */ real_T Gain2_k; /* '/Gain2' */ real_T th; /* '/web_psb' */ real_T beta; /* '/Sum1' */ real_T TrigonometricFunction_o1_dn; /* '/Trigonometric Function' */ real_T TrigonometricFunction_o2_k; /* '/Trigonometric Function' */ real_T TrigonometricFunction1_o1; /* '/Trigonometric Function1' */ real_T TrigonometricFunction1_o2; /* '/Trigonometric Function1' */ real_T W341wr[16]; /* '/W(3,4)=1-wr' */ real_T W43wr1[16]; /* '/W(4,3)=wr-1' */ real_T ira; /* '/ira' */ real_T irb; /* '/irb' */ real_T isa; /* '/isa' */ real_T isb; /* '/isb' */ real_T ira_g; /* '/ira' */ real_T irb_g; /* '/irb' */ real_T isa_a; /* '/isa' */ real_T isb_f; /* '/isb' */ real_T ira_p; /* '/ira' */ real_T irb_n; /* '/irb' */ real_T isa_m; /* '/isa' */ real_T isb_p; /* '/isb' */ real_T vdr; /* '/vdr' */ real_T vds; /* '/vds' */ real_T vqr; /* '/vqr' */ real_T vqs; /* '/vqs' */ real_T vdr_p; /* '/vdr' */ real_T vds_i; /* '/vds' */ real_T vqr_l; /* '/vqr' */ real_T vqs_i; /* '/vqs' */ real_T vdr_l; /* '/vdr' */ real_T vds_f; /* '/vds' */ real_T vqr_j; /* '/vqr' */ real_T vqs_l; /* '/vqs' */ real_T ukuk1[4]; /* '/sum' */ real_T RLinv[16]; /* '/Switch1' */ real_T MultiportSwitch1_l[16]; /* '/Multiport Switch1' */ real_T A[16]; /* '/Sum1' */ real_T wbaseTs2[16]; /* '/wbase*Ts//2' */ real_T Sum1_k[16]; /* '/Sum1' */ real_T inversion[16]; /* '/inversion' */ real_T wbaseTs2_c[16]; /* '/wbase*Ts//2 ' */ real_T Product1_d[4]; /* '/Product1' */ real_T Sum5[16]; /* '/Sum5' */ real_T Product4_k[16]; /* '/Product4' */ real_T Product2_o[4]; /* '/Product2' */ real_T xk[4]; /* '/Ad*x(k-1) + Bd*( u(k-1) + u(k))' */ real_T Delay; /* '/Delay' */ real_T TmpSignalConversionAtMathFuncti[3]; real_T MathFunction_p[3]; /* '/Math Function' */ real_T Sum2_i; /* '/Sum2' */ real_T MathFunction1; /* '/Math Function1' */ real_T Product2_m[2]; /* '/Product2' */ real_T Product_c[2]; /* '/Product' */ real_T phimq; /* '/Sum2' */ real_T Product1_j[2]; /* '/Product1' */ real_T phimd; /* '/Sum1' */ real_T Phisat; /* '/Math Function' */ real_T Isat; /* '/1-D Lookup Table' */ real_T Switch_g; /* '/Switch' */ real_T Lminrows13col13[16]; /* '/Lm in rows[1,3] & col[1,3]' */ real_T Lminrows24col24[16]; /* '/Lm in rows[2,4] & col[2,4]' */ real_T Sum2_e[16]; /* '/Sum2' */ real_T Linv_h[16]; /* '/inversion' */ real_T RLinv_m[16]; /* '/Product1' */ real_T Lm; /* '/Product' */ boolean_T RelationalOperator3; /* '/Relational Operator3' */ boolean_T Amplitude; /* '/Relational Operator' */ boolean_T LogicalOperator1; /* '/Logical Operator1' */ boolean_T DataTypeConversion2; /* '/Data Type Conversion2' */ boolean_T LogicalOperator1_l; /* '/Logical Operator1' */ boolean_T RelationalOperator1; /* '/Relational Operator1' */ boolean_T DataTypeConversion1_f; /* '/Data Type Conversion1' */ boolean_T LogicalOperator; /* '/Logical Operator' */ boolean_T RelationalOperator3_f; /* '/Relational Operator3' */ boolean_T Phase; /* '/Relational Operator1' */ boolean_T LogicalOperator1_b; /* '/Logical Operator1' */ boolean_T DataTypeConversion1_j; /* '/Data Type Conversion1' */ boolean_T DataTypeConversion2_m; /* '/Data Type Conversion2' */ boolean_T LogicalOperator_l; /* '/Logical Operator' */ boolean_T Compare; /* '/Compare' */ boolean_T Frequency; /* '/Relational Operator2' */ boolean_T RelationalOperator; /* '/Relational Operator' */ }; /* Block states (default storage) for system '' */ struct DW_VFControl_T { real_T fluxes_DSTATE[4]; /* '/fluxes' */ real_T fluxes_DSTATE_l[4]; /* '/fluxes' */ real_T Rotoranglethetam_DSTATE; /* '/Rotor angle thetam' */ real_T wm_delay_DSTATE; /* '/wm_delay' */ real_T wm_predict_DSTATE; /* '/wm_predict' */ real_T voltages_DSTATE[4]; /* '/voltages' */ real_T Rotorspeedwm_DSTATE; /* '/Rotor speed(wm)' */ real_T DiscreteTimeIntegrator1_DSTATE;/* '/Discrete-Time Integrator1' */ real_T UnitDelay1_DSTATE; /* '/Unit Delay1' */ real_T DiscreteTimeIntegrator_DSTATE;/* '/Discrete-Time Integrator' */ real_T UnitDelay_DSTATE; /* '/Unit Delay' */ real_T Delay_DSTATE; /* '/Delay' */ real_T inversion_DWORK1[16]; /* '/inversion' */ real_T inversion_DWORK3[16]; /* '/inversion' */ real_T inversion_DWORK4[16]; /* '/inversion' */ real_T inversion_DWORK4_k[16]; /* '/inversion' */ struct { real_T modelTStart; real_T TUbufferArea[2048]; } TransportDelay_RWORK; /* '/Transport Delay' */ struct { real_T modelTStart; real_T TUbufferArea[2048]; } TransportDelay_RWORK_d; /* '/Transport Delay' */ struct { real_T modelTStart; real_T TUbufferArea[2048]; } TransportDelay_RWORK_m; /* '/Transport Delay' */ struct { void *AS; void *BS; void *CS; void *DS; void *DX_COL; void *BD_COL; void *TMP1; void *TMP2; void *XTMP; void *SWITCH_STATUS; void *SWITCH_STATUS_INIT; void *SW_CHG; void *G_STATE; void *USWLAST; void *XKM12; void *XKP12; void *XLAST; void *ULAST; void *IDX_SW_CHG; void *Y_SWITCH; void *SWITCH_TYPES; void *IDX_OUT_SW; void *SWITCH_TOPO_SAVED_IDX; void *SWITCH_MAP; } StateSpace_PWORK; /* '/State-Space' */ struct { void *LoggedData[3]; } DebugPWM_PWORK; /* '/Debug PWM' */ struct { void *LoggedData[4]; } DebugfaseA_PWORK; /* '/Debug fase A' */ struct { void *LoggedData[4]; } DebugfaseB_PWORK; /* '/Debug fase B' */ struct { void *LoggedData[4]; } DebugfaseC_PWORK; /* '/Debug fase C' */ struct { void *TUbufferPtrs[2]; } TransportDelay_PWORK; /* '/Transport Delay' */ struct { void *TUbufferPtrs[2]; } TransportDelay_PWORK_m; /* '/Transport Delay' */ struct { void *TUbufferPtrs[2]; } TransportDelay_PWORK_f; /* '/Transport Delay' */ void *Digitaloutput1_PWORK[2]; /* '/Digital output1' */ void *Digitaloutput2_PWORK[2]; /* '/Digital output2' */ struct { void *LoggedData[2]; } Corrientetensinmotorideal_PWORK; /* '/Corriente//tensión motor ideal' */ struct { void *USERIO_P_IND; void *PROG_SPACE_P_IND; void *CONFIG_REGISTER_P_IND; void *CONDITIONING_MODULE_IO3xx_2x_P_IND; void *DEVICENAME_P_IND; void *DMA_CONTROLLER_P_IND; } Setup_PWORK; /* '/Setup' */ int32_T inversion_DWORK2[4]; /* '/inversion' */ uint32_T m_bpIndex; /* '/1-D Lookup Table' */ uint32_T m_bpIndex_e; /* '/1-D Lookup Table' */ uint32_T m_bpIndex_p; /* '/1-D Lookup Table' */ uint32_T m_bpIndex_b; /* '/1-D Lookup Table' */ int_T StateSpace_IWORK[11]; /* '/State-Space' */ struct { int_T Tail; int_T Head; int_T Last; int_T CircularBufSize; } TransportDelay_IWORK; /* '/Transport Delay' */ struct { int_T Tail; int_T Head; int_T Last; int_T CircularBufSize; } TransportDelay_IWORK_g; /* '/Transport Delay' */ struct { int_T Tail; int_T Head; int_T Last; int_T CircularBufSize; } TransportDelay_IWORK_m; /* '/Transport Delay' */ struct { int_T MODULEARCHITECTURE_I_IND; } Setup_IWORK; /* '/Setup' */ int8_T sinthrcosthr1_SubsysRanBC; /* '/sin(thr),cos(thr)1' */ int8_T sinthrcosthr_SubsysRanBC; /* '/sin(thr),cos(thr)' */ int8_T sinbetacosbetasinthcosth_Subsys; /* '/sin(beta),cos(beta),sin(th),cos(th)' */ int8_T Synchronousreferenceframe_Subsy;/* '/Synchronous reference frame' */ int8_T Stationaryreferenceframe_Subsys;/* '/Stationary reference frame' */ int8_T Rotorreferenceframe_SubsysRanBC;/* '/Rotor reference frame' */ int8_T Synchronousreferenceframe_Sub_k;/* '/Synchronous reference frame' */ int8_T Stationaryreferenceframe_Subs_n;/* '/Stationary reference frame' */ int8_T Rotorreferenceframe_SubsysRan_i;/* '/Rotor reference frame' */ int8_T Saturation_SubsysRanBC; /* '/Saturation' */ uint8_T Rotorspeedwm_SYSTEM_ENABLE; /* '/Rotor speed(wm)' */ boolean_T sinthrcosthr1_MODE; /* '/sin(thr),cos(thr)1' */ boolean_T sinthrcosthr_MODE; /* '/sin(thr),cos(thr)' */ boolean_T Synchronousreferenceframe_MODE;/* '/Synchronous reference frame' */ boolean_T Stationaryreferenceframe_MODE;/* '/Stationary reference frame' */ boolean_T Rotorreferenceframe_MODE; /* '/Rotor reference frame' */ boolean_T Synchronousreferenceframe_MOD_l;/* '/Synchronous reference frame' */ boolean_T Stationaryreferenceframe_MODE_p;/* '/Stationary reference frame' */ boolean_T Rotorreferenceframe_MODE_m;/* '/Rotor reference frame' */ MdlrefDW_PWMGenerator_T Model_InstanceData;/* '/Model' */ MdlrefDW_PWMGenerator_T Model1_InstanceData;/* '/Model1' */ MdlrefDW_PWMGenerator_T Model2_InstanceData;/* '/Model2' */ }; /* Real-time Model Data Structure */ struct tag_RTM_VFControl_T { struct SimStruct_tag * *childSfunctions; const char_T *errorStatus; SS_SimMode simMode; RTWSolverInfo solverInfo; RTWSolverInfo *solverInfoPtr; void *sfcnInfo; /* * NonInlinedSFcns: * The following substructure contains information regarding * non-inlined s-functions used in the model. */ struct { RTWSfcnInfo sfcnInfo; time_T *taskTimePtrs[3]; SimStruct childSFunctions[2]; SimStruct *childSFunctionPtrs[2]; struct _ssBlkInfo2 blkInfo2[2]; struct _ssSFcnModelMethods2 methods2[2]; struct _ssSFcnModelMethods3 methods3[2]; struct _ssSFcnModelMethods4 methods4[2]; struct _ssStatesInfo2 statesInfo2[2]; ssPeriodicStatesInfo periodicStatesInfo[2]; struct _ssPortInfo2 inputOutputPortInfo2[2]; struct { time_T sfcnPeriod[1]; time_T sfcnOffset[1]; int_T sfcnTsMap[1]; struct _ssPortInputs inputPortInfo[3]; struct _ssInPortUnit inputPortUnits[3]; struct _ssInPortCoSimAttribute inputPortCoSimAttribute[3]; uint_T attribs[6]; mxArray *params[6]; struct _ssDWorkRecord dWork[1]; struct _ssDWorkAuxRecord dWorkAux[1]; } Sfcn0; struct { time_T sfcnPeriod[1]; time_T sfcnOffset[1]; int_T sfcnTsMap[1]; struct _ssPortInputs inputPortInfo[3]; struct _ssInPortUnit inputPortUnits[3]; struct _ssInPortCoSimAttribute inputPortCoSimAttribute[3]; uint_T attribs[6]; mxArray *params[6]; struct _ssDWorkRecord dWork[1]; struct _ssDWorkAuxRecord dWorkAux[1]; } Sfcn1; } NonInlinedSFcns; boolean_T zCCacheNeedsReset; boolean_T derivCacheNeedsReset; boolean_T CTOutputIncnstWithState; /* * Sizes: * The following substructure contains sizes information * for many of the model attributes such as inputs, outputs, * dwork, sample times, etc. */ struct { uint32_T options; int_T numContStates; int_T numU; int_T numY; int_T numSampTimes; int_T numBlocks; int_T numBlockIO; int_T numBlockPrms; int_T numDwork; int_T numSFcnPrms; int_T numSFcns; int_T numIports; int_T numOports; int_T numNonSampZCs; int_T sysDirFeedThru; int_T rtwGenSfcn; } Sizes; /* * Timing: * The following substructure contains information regarding * the timing information for the model. */ struct { time_T stepSize; uint32_T clockTick0; uint32_T clockTickH0; time_T stepSize0; uint32_T clockTick1; uint32_T clockTickH1; time_T stepSize1; uint32_T clockTick2; uint32_T clockTickH2; struct { uint32_T TID[3]; uint32_T cLimit[3]; } TaskCounters; time_T tStart; time_T tFinal; time_T timeOfLastOutput; SimTimeStep simTimeStep; boolean_T stopRequestedFlag; time_T *sampleTimes; time_T *offsetTimes; int_T *sampleTimeTaskIDPtr; int_T *sampleHits; int_T *perTaskSampleHits; time_T *t; time_T sampleTimesArray[3]; time_T offsetTimesArray[3]; int_T sampleTimeTaskIDArray[3]; int_T sampleHitArray[3]; int_T perTaskSampleHitsArray[9]; time_T tArray[3]; } Timing; }; /* Block signals (default storage) */ #ifdef __cplusplus extern "C" { #endif extern struct B_VFControl_T VFControl_B; #ifdef __cplusplus } #endif /* Block states (default storage) */ extern struct DW_VFControl_T VFControl_DW; #ifdef __cplusplus extern "C" { #endif /* Model entry point functions */ extern void VFControl_initialize(void); extern void VFControl_step0(void); extern void VFControl_step2(void); extern void VFControl_terminate(void); #ifdef __cplusplus } #endif /* Real-time Model object */ #ifdef __cplusplus extern "C" { #endif extern RT_MODEL_VFControl_T *const VFControl_M; #ifdef __cplusplus } #endif /*- * The generated code includes comments that allow you to trace directly * back to the appropriate location in the model. The basic format * is /block_name, where system is the system number (uniquely * assigned by Simulink) and block_name is the name of the block. * * Use the MATLAB hilite_system command to trace the generated code back * to the model. For example, * * hilite_system('') - opens system 3 * hilite_system('/Kp') - opens and selects block Kp which resides in S3 * * Here is the system hierarchy for this model * * '' : 'VFControl' * '' : 'VFControl/Asynchronous Machine SI Units' * '' : 'VFControl/DC Voltage Source' * '' : 'VFControl/Inversión A' * '' : 'VFControl/Inversión B' * '' : 'VFControl/Inversión C' * '' : 'VFControl/Three-Phase Programmable Generator' * '' : 'VFControl/Three-Phase V-I Measurement' * '' : 'VFControl/Triangle Generator' * '' : 'VFControl/Triangle Generator1' * '' : 'VFControl/Triangle Generator2' * '' : 'VFControl/Two-Level Converter1' * '' : 'VFControl/powergui' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model' * '' : 'VFControl/Asynchronous Machine SI Units/Measurements' * '' : 'VFControl/Asynchronous Machine SI Units/Mechanical model' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/abc to dq transformation' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/dq to abc transformation' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/sin,cos' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Electromagnetic Torque' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Flux Prediction' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Saturation' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/phiqd_SR' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Saturation/Laq=Lad' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Saturation/Matrix L' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/Saturation/phimqd' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/Asynchronous Machine State-space model/phiqd_SR/Subsystem' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/abc to dq transformation/Rotor reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/abc to dq transformation/Stationary reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/abc to dq transformation/Synchronous reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/abc to dq transformation/transit' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/dq to abc transformation/Rotor reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/dq to abc transformation/Stationary reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/dq to abc transformation/Synchronous reference frame' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/sin,cos/sin(beta),cos(beta),sin(th),cos(th)' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/sin,cos/sin(thr),cos(thr)' * '' : 'VFControl/Asynchronous Machine SI Units/Electrical model/sin,cos/sin(thr),cos(thr)1' * '' : 'VFControl/Asynchronous Machine SI Units/Mechanical model/Delay Prediction' * '' : 'VFControl/DC Voltage Source/Model' * '' : 'VFControl/Three-Phase Programmable Generator/Model' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Amplitude' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Frequency' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Harmonic Generation' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Measurements' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Phase' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Type of Variation selector' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Variation value (step ramp mod)' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Variation value (time table)' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Amplitude/Time-Amplitude pairs' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Amplitude/Variation on phase A only' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Harmonic Generation/Enable Harmonics' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Harmonic Generation/Harmonic A generation' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Harmonic Generation/Harmonic B generation' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Phase/Time-Phase pairs' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Phase/Variation on phase A only' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Variation value (step ramp mod)/Subsystem1' * '' : 'VFControl/Three-Phase Programmable Generator/Model/Variation value (time table)/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Mode I' * '' : 'VFControl/Three-Phase V-I Measurement/Mode V' * '' : 'VFControl/Three-Phase V-I Measurement/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I A:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I B:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I C:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U AB:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U BC:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U CA:' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I A:/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I B:/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/I C:/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U AB:/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U BC:/Model' * '' : 'VFControl/Three-Phase V-I Measurement/Model/U CA:/Model' * '' : 'VFControl/Triangle Generator/Model' * '' : 'VFControl/Triangle Generator1/Model' * '' : 'VFControl/Triangle Generator2/Model' * '' : 'VFControl/Two-Level Converter1/Model' * '' : 'VFControl/Two-Level Converter1/Model/Compare To Constant' * '' : 'VFControl/Two-Level Converter1/Model/Sw1' * '' : 'VFControl/Two-Level Converter1/Model/Sw2' * '' : 'VFControl/Two-Level Converter1/Model/Sw3' * '' : 'VFControl/Two-Level Converter1/Model/Sw4' * '' : 'VFControl/Two-Level Converter1/Model/Sw5' * '' : 'VFControl/Two-Level Converter1/Model/Sw6' * '' : 'VFControl/Two-Level Converter1/Model/Sw1/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw1/Model/Measurement list' * '' : 'VFControl/Two-Level Converter1/Model/Sw2/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw2/Model/Measurement list' * '' : 'VFControl/Two-Level Converter1/Model/Sw3/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw3/Model/Measurement list' * '' : 'VFControl/Two-Level Converter1/Model/Sw4/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw4/Model/Measurement list' * '' : 'VFControl/Two-Level Converter1/Model/Sw5/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw5/Model/Measurement list' * '' : 'VFControl/Two-Level Converter1/Model/Sw6/Model' * '' : 'VFControl/Two-Level Converter1/Model/Sw6/Model/Measurement list' * '' : 'VFControl/powergui/EquivalentModel1' * '' : 'VFControl/powergui/EquivalentModel1/Gates' * '' : 'VFControl/powergui/EquivalentModel1/Sources' * '' : 'VFControl/powergui/EquivalentModel1/Status' * '' : 'VFControl/powergui/EquivalentModel1/Yout' */ #endif /* VFControl_h_ */