Model { Name "CLosed_loop_buck_PID2" Version 7.7 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.41" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" MaxMDLFileLineLength 120 Created "Wed Mar 14 23:59:06 2007" Creator "Lubin" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "More" ModifiedDateFormat "%" LastModifiedDate "Mon Feb 10 12:33:17 2014" RTWModifiedTimeStamp 313934258 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on CovForceBlockReductionOff on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" CovExternalEMLEnable off ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 1000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.11.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.11.0" StartTime "0.0" StopTime "0.2" AbsTol "auto" FixedStep "0.0000001" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "SingleTasking" ConcurrentTasks off Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 3 Version "1.11.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SignalLoggingSaveFormat "ModelDataLogs" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.11.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off UseIntDivNetSlope off UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off StrengthReduction off ExpressionFolding on BooleansAsBitfields off BitfieldContainerType "uint_T" EnableMemcpy on MemcpyThreshold 64 PassReuseOutputArgsAs "Structure reference" ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode on LifeSpan "1" MaxStackSize "Inherit from target" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off AccelParallelForEachSubsystem on } Simulink.DebuggingCC { $ObjectID 5 Version "1.11.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "none" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "warning" FixptConstUnderflowMsg "none" FixptConstOverflowMsg "none" FixptConstPrecisionLossMsg "none" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" SimStateInterfaceChecksumMismatchMsg "warning" SimStateOlderReleaseMsg "error" InitInArrayFormatMsg "warning" StrictBusMsg "Warning" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" LoggingUnavailableSignals "error" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.11.0" Array { Type "Cell" Dimension 2 Cell "ProdHWDeviceType" Cell "ProdEqTarget" PropName "DisabledProps" } ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 16 ProdBitPerLong 32 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 16 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "LittleEndian" ProdWordSize 16 ProdShiftRightIntArith on ProdHWDeviceType "16-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetBitPerFloat 32 TargetBitPerDouble 64 TargetBitPerPointer 32 TargetLargestAtomicInteger "Char" TargetLargestAtomicFloat "None" TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "32-bit Generic" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.11.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" EnableParallelModelReferenceBuilds off ParallelModelReferenceErrorOnInvalidPool on ParallelModelReferenceMATLABWorkerInit "None" ModelReferenceNumInstancesAllowed "Multi" PropagateVarSize "Infer from blocks in model" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off PropagateSignalLabelsOutOfModel off SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { $ObjectID 8 Version "1.11.0" SFSimEnableDebug on SFSimOverflowDetection on SFSimEcho on SimBlas on SimCtrlC on SimExtrinsic on SimIntegrity on SimUseLocalCustomCode off SimParseCustomCode on SimBuildMode "sf_incremental_build" } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 9 Version "1.11.0" Array { Type "Cell" Dimension 1 Cell "TargetLang" PropName "DisabledProps" } SystemTargetFile "dspic.tlc" GenCodeOnly off MakeCommand "make_CreateMPLAB" GenerateMakefile on TemplateMakefile "dspic_pic30_gcc.tmf" PostCodeGenCommand "dsPIC_Compile()" Description "Embedded Target for Microchip dsPIC (real-time)" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "dspic_make_rtw_hook" ConfigAtBuild off RTWUseLocalCustomCode off RTWUseSimCustomCode off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off GenerateSLWebview off GenerateCodeMetricsReport off RTWCompilerOptimization "Off" CheckMdlBeforeBuild "Off" CustomRebuildMode "OnUpdate" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.11.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses off IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off MATLABFcnDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrFcnArg "rt$I$N$M" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off InsertPolySpaceComments off SimulinkBlockComments on MATLABSourceComments off EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off UseSimReservedNames off } Simulink.STFCustomTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Version "1.11.0" Array { Type "Cell" Dimension 6 Cell "GenerateSampleERTMain" Cell "MatFileLogging" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" FunctionExecutionProfile off CodeExecutionProfiling off ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite off SupportComplex off PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant on AutosarCompliant off SystemTargetFile "dspic.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 12 Version "1.11.0" Array { Type "Cell" Dimension 9 Cell "GenerateSampleERTMain" Cell "GenerateErtSFunction" Cell "MatFileLogging" Cell "GRTInterface" Cell "ERTCustomFileTemplate" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" FunctionExecutionProfile off CodeExecutionProfiling off ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite off SupportComplex off PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant on AutosarCompliant off GenerateErtSFunction off CreateSILPILBlock "None" CodeExecutionProfileVariable "executionProfile" GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_serial_win32_comm" ExtModeIntrfLevel "Level1" InlinedParameterPlacement "NonHierarchical" TargetOS "BareBoardExample" MultiInstanceErrorCode "Error" RateGroupingCode on RootIOFormat "Individual arguments" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off RTWCAPIRootIO off ERTSrcFileBannerTemplate "dsPIC_code_template.cgt" ERTHdrFileBannerTemplate "dsPIC_code_template.cgt" ERTDataSrcFileTemplate "dsPIC_code_template.cgt" ERTDataHdrFileTemplate "dsPIC_code_template.cgt" ERTCustomFileTemplate "dsPIC_main.tlc" CoverageDialogOpen "off" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" ERTFilePackagingFormat "Modular" DataReferenceFile "global.h" GRTInterface off PreserveExpressionOrder off PreserveIfCondition off ConvertIfToSwitch off PreserveExternInFcnDecls on EnableUserReplacementTypes off Array { Type "Struct" Dimension 1 MATStruct { double "" single "" int32 "" int16 "" int8 "" uint32 "" uint16 "" uint8 "" boolean "" int "" uint "" char "" } PropName "ReplacementTypes" } MemSecPackage "--- None ---" MemSecDataConstants "Default" MemSecDataIO "Default" MemSecDataInternal "Default" MemSecDataParameters "Default" MemSecFuncInitTerm "Default" MemSecFuncExecute "Default" MemSecFuncSharedUtil "Default" } PropName "Components" } CustomProperty { DataType "string" Name "GMAKE_PLACE" Value "C:\\PROGRA~1\\MATLAB\\R2011a\\bin\\win64\\gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mcpu=24fJ128GA010 -O3 -fschedule-insns -fschedule-insns2" } CustomProperty { DataType "string" Name "LDFLAGS" Value " -Xlinker -t -Xlinker --report-mem -Xlinker -Map=../untitled.map -Xlinker --heap=0 -Xlinker -cref" } CustomProperty { DataType "string" Name "LDPICTYPE" Value " -Xlinker --script=C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\support\\PIC24F\\gld\\p24fJ128GA010.gld" } CustomProperty { DataType "string" Name "LDLIBPIC" Value " C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\lib\\libpic30-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\lib\\PIC24F\\libp" "PIC24Fxxx-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\lib\\libc-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\lib\\libm-coff" ".a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value " -I C:\\PROGRA~2\\MICROC~1\\MPLABC~2\\include" } CustomProperty { DataType "string" Name "PIC_REF" Value "24fJ128GA010" } CustomProperty { DataType "string" Name "GCC1" Value "pic30-gcc" } CustomProperty { DataType "string" Name "AR1" Value "pic30-ar -r" } CustomProperty { DataType "string" Name "BIN2HEX" Value "pic30-bin2hex" } } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 " CurrentDlgPage "Solver" ConfigPrmDlgPosition [ 243, 69, 1123, 699 ] } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on BlockRotation 0 BlockMirror off } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Arial" FontSize 9 FontWeight "normal" FontAngle "normal" } BlockParameterDefaults { Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" LockScale off SampleTime "inf" FramePeriod "inf" PreserveConstantTs off } Block { BlockType DataTypeConversion OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Inherit via back propagation" LockScale off ConvertRealWorld "Real World Value (RWV)" RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType DiscreteTransferFcn Numerator "[1]" Denominator "[1 0.5]" InputProcessing "Elements as channels (sample based)" InitialStates "0" SampleTime "1" a0EqualsOne off NumCoefMin "[]" NumCoefMax "[]" DenCoefMin "[]" DenCoefMax "[]" OutMin "[]" OutMax "[]" StateDataTypeStr "Inherit: Same as input" NumCoefDataTypeStr "Inherit: Inherit via internal rule" DenCoefDataTypeStr "Inherit: Inherit via internal rule" NumProductDataTypeStr "Inherit: Inherit via internal rule" DenProductDataTypeStr "Inherit: Inherit via internal rule" NumAccumDataTypeStr "Inherit: Inherit via internal rule" DenAccumDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow off StateMustResolveToSignalObject off RTWStateStorageClass "Auto" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Inport Port "1" OutputFunctionCall off OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: auto" LockScale off BusOutputAsStruct off PortDimensions "-1" VarSizeSig "Inherit" SampleTime "-1" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchInputForFeedbackSignals off Interpolate on } Block { BlockType Outport Port "1" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: auto" LockScale off BusOutputAsStruct off PortDimensions "-1" VarSizeSig "Inherit" SampleTime "-1" SignalType "auto" SamplingMode "auto" SourceOfInitialOutputValue "Dialog" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Saturate UpperLimitSource "Dialog" UpperLimit "0.5" LowerLimitSource "Dialog" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" Variant off GeneratePreprocessorConditionals off } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } } System { Name "CLosed_loop_buck_PID2" Location [2, 82, 1348, 725] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "89" ReportName "simulink-default.rpt" SIDHighWatermark "535" Block { BlockType Reference Name "ADC Input" SID "142" Tag "dsPIC_ADC" Ports [0, 1] Position [20, 192, 100, 248] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Peripheral I//O/ADC Input" SourceType "dsPIC : ADC10" ADC_TYPE "10 bits" ADC_MODE "Continuous sampling & get last channel value" NbrSampleStep "1" VoltRefpopup "AVdd - AVss" OutFormatBitspopup "0000 00dd dddd dddd : Integer" InterruptPriority "6" ANCHANNELS "[3]" MaxName "ANmax = 1023" Rin "1e2" ADCS "4" SAMC "1" Temperature "25" DMAChannel "7" SampleTime "1/10000" Status "OK | Tsmp=1.563e-007 | T/Channel=2.031e-006 | Tall=2.031e-006" SSRC "Low to High transition on INT0 pin" } Block { BlockType Reference Name "Configure Model \nfor dsPIC" SID "2" Ports [] Position [165, 24, 277, 80] ForegroundColor "blue" BackgroundColor "yellow" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC" SourceType "" } Block { BlockType Constant Name "Constant" SID "79" Position [565, 345, 620, 375] Value "OC2max" OutDataTypeStr "uint16" } Block { BlockType Constant Name "Constant2" SID "80" Position [145, 275, 200, 305] NamePlacement "alternate" Value "775" OutDataTypeStr "uint16" SampleTime "1/10000" } Block { BlockType Reference Name "Master" SID "8" Tag "dsPIC_MASTER" Ports [] Position [30, 27, 139, 78] BackgroundColor "lightBlue" Priority "1" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "24fJ128GA010" fcy "16000000" Quartz_33f "8e6" PLLActive_33f on fcyDesired_33f "0" tmr1 "[1 1 -25]" tmr1Info "Time Step : 1.25e-007 ; Error : -25% PR1=1" tmr2345 "[1 0 0 0]" tmr2345cfg "[-1 -1 -1 -1]" IOautoConf on typePort "[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 " "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " " 0 0 0 0 0 0 ]" TRIS "[ 65535 65535 65535 65533 65535 65535 65535 ]" ADPCFG "0" MasterBusyPort "None" MasterOverloadPort "None" FOSC "Quartz (XT - HS)" ClockSwitchMonitor "Both disabled" TempProtection_33f "TEMP_ON" FPBOR "" PWRT "disable" MCLR "" ICD "ICS_PGD1" JTAGEN "JTAGEN_OFF" PowerSave off OverrideFcy off NewFcy "1e6" PR2345 "[65535 65535 65535 65535]" } Block { BlockType Reference Name "Output Compare" SID "84" Tag "dsPIC_PWM_out" Ports [2] Position [710, 279, 805, 386] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Peripheral I//O/Output Compare" SourceType "Output Capture Peripheral" IntPriority "1" CHANNEL "[2]" Channel_UP_Down_Periode "[5]" MaxChannel "[2e-005]" MaxName " ' OC2max ' " Precision "[8.3129]" Timer "[2]" Status "OK" SafeMarge "[0]" PortLetter "[68]" PortNumber "[1]" MaxValues "[319]" } Block { BlockType SubSystem Name "PID Auto Tuned" SID "431" Ports [2, 3] Position [250, 183, 390, 327] BackgroundColor "orange" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "PID Auto Tuned" Location [2, 82, 1348, 725] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "ADC input" SID "432" Position [100, 283, 130, 297] IconDisplay "Port number" } Block { BlockType Inport Name "Vref" SID "433" Position [360, 363, 390, 377] BlockMirror on NamePlacement "alternate" Port "2" IconDisplay "Port number" } Block { BlockType SubSystem Name "ADC filter" SID "529" Ports [1, 1] Position [190, 264, 270, 316] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "ADC filter" Location [22, 239, 432, 327] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "In1" SID "530" Position [25, 38, 55, 52] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "531" Position [80, 35, 135, 55] RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion5" SID "532" Position [275, 35, 330, 55] OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DiscreteTransferFcn Name "Low Pass 10Hz" SID "533" Position [160, 27, 240, 63] Numerator "[.01478 .01478]" Denominator "[1 -.9701]" SampleTime "-1" } Block { BlockType Outport Name "Out1" SID "534" Position [355, 38, 385, 52] IconDisplay "Port number" } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Low Pass 10Hz" DstPort 1 } Line { SrcBlock "Low Pass 10Hz" SrcPort 1 DstBlock "Data Type Conversion5" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Data Type Conversion5" SrcPort 1 DstBlock "Out1" DstPort 1 } } } Block { BlockType Reference Name "Discrete PID\n Controller" SID "525" Ports [1, 1] Position [415, 273, 480, 307] BackgroundColor "orange" LibraryVersion "1.236" SourceBlock "simulink/Continuous/PID Controller" SourceType "PID 1dof" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" GeneratePreprocessorConditionals off Controller "PID" TimeDomain "Discrete-time" SampleTime "1/10000" IntegratorMethod "Forward Euler" FilterMethod "Forward Euler" Form "Parallel" P "0.634971329771802" I "160.765194841517" D "0.000367278724120311" N "13291.0514556826" InitialConditionSource "internal" InitialConditionForIntegrator "0" InitialConditionForFilter "0" ExternalReset "none" IgnoreLimit off ZeroCross on LimitOutput off UpperSaturationLimit "319" LowerSaturationLimit "0" LinearizeAsGain off AntiWindupMode "none" Kb "1" TrackingMode off Kt "1" RndMeth "Floor" SaturateOnIntegerOverflow on LockScale on PParamMin "[]" PParamMax "[]" PParamDataTypeStr "double" IParamMin "[]" IParamMax "[]" IParamDataTypeStr "double" DParamMin "[]" DParamMax "[]" DParamDataTypeStr "double" NParamMin "[]" NParamMax "[]" NParamDataTypeStr "double" KbParamMin "[]" KbParamMax "[]" KbParamDataTypeStr "Inherit: Inherit via internal rule" KtParamMin "[]" KtParamMax "[]" KtParamDataTypeStr "Inherit: Inherit via internal rule" POutMin "[]" POutMax "[]" POutDataTypeStr "double" IOutMin "[]" IOutMax "[]" IOutDataTypeStr "double" DOutMin "[]" DOutMax "[]" DOutDataTypeStr "double" NOutMin "[]" NOutMax "[]" NOutDataTypeStr "double" KbOutMin "[]" KbOutMax "[]" KbOutDataTypeStr "Inherit: Inherit via internal rule" KtOutMin "[]" KtOutMax "[]" KtOutDataTypeStr "Inherit: Inherit via internal rule" IntegratorOutMin "[]" IntegratorOutMax "[]" IntegratorOutDataTypeStr "double" FilterOutMin "[]" FilterOutMax "[]" FilterOutDataTypeStr "double" SumOutMin "[]" SumOutMax "[]" SumOutDataTypeStr "double" SumI1OutMin "[]" SumI1OutMax "[]" SumI1OutDataTypeStr "Inherit: Inherit via internal rule" SumI2OutMin "[]" SumI2OutMax "[]" SumI2OutDataTypeStr "Inherit: Inherit via internal rule" SumI3OutMin "[]" SumI3OutMax "[]" SumI3OutDataTypeStr "Inherit: Inherit via internal rule" SumDOutMin "[]" SumDOutMax "[]" SumDOutDataTypeStr "double" SumAccumDataTypeStr "double" SumI1AccumDataTypeStr "Inherit: Inherit via internal rule" SumI2AccumDataTypeStr "Inherit: Inherit via internal rule" SumI3AccumDataTypeStr "Inherit: Inherit via internal rule" SumDAccumDataTypeStr "double" SaturationOutMin "[]" SaturationOutMax "[]" SaturationOutDataTypeStr "Inherit: Same as input" IntegratorContinuousStateAttributes "''" IntegratorStateMustResolveToSignalObject off IntegratorRTWStateStorageClass "Auto" FilterContinuousStateAttributes "''" FilterStateMustResolveToSignalObject off FilterRTWStateStorageClass "Auto" } Block { BlockType Gain Name "Gain1" SID "526" Position [510, 266, 580, 314] NamePlacement "alternate" Gain "1/319" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "double" SaturateOnIntegerOverflow off SampleTime "1/10000" } Block { BlockType Gain Name "Gain2" SID "481" Position [695, 201, 765, 249] NamePlacement "alternate" Gain "OC2max" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "double" SaturateOnIntegerOverflow off SampleTime "1/10000" } Block { BlockType Saturate Name "Saturation1" SID "501" Ports [1, 1] Position [620, 275, 645, 305] NamePlacement "alternate" InputPortMap "u0" UpperLimit "0.99" LowerLimit "0" LinearizeAsGain off SampleTime "1/10000" OutDataTypeStr "double" } Block { BlockType Scope Name "Scope1" SID "528" Ports [1] Position [630, 354, 660, 386] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "0.018" SaveName "ScopeData4" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope4" SID "527" Ports [1] Position [530, 354, 560, 386] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "0.018" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Sum Name "Sum" SID "450" Ports [2, 1] Position [325, 280, 345, 300] ShowName off IconShape "round" Inputs "|-+" InputSameDT off OutDataTypeStr "int16" SaturateOnIntegerOverflow off SampleTime "1/20000" } Block { BlockType Reference Name "TX Output Multiplexed\nfor Matlab / Labview" SID "535" Tag "dsPIC_TX_Multiplexed" Ports [1] Position [360, 422, 530, 468] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Serial PORT/TX Output Multiplexed\nfor Matlab // Labview" SourceType "send structured data frame to Matlab / Labview" UART "2" CleverSpreadingChk on CleverSpreading "1" CHANNEL "[0]" CHANNELBLOCKED "[]" CHANNELBLOCKED_BITEWISE "0" Status "OK" } Block { BlockType Outport Name "Error" SID "452" Position [275, 183, 305, 197] BlockMirror on IconDisplay "Port number" } Block { BlockType Outport Name "Duty Raw" SID "453" Position [770, 283, 800, 297] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Duty Voltage" SID "454" Position [790, 218, 820, 232] Port "3" IconDisplay "Port number" } Line { Labels [0, 0] SrcBlock "Gain2" SrcPort 1 DstBlock "Duty Voltage" DstPort 1 } Line { SrcBlock "ADC input" SrcPort 1 DstBlock "ADC filter" DstPort 1 } Line { SrcBlock "Vref" SrcPort 1 Points [-20, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 Points [35, 0] Branch { Points [0, -100] DstBlock "Error" DstPort 1 } Branch { DstBlock "Discrete PID\n Controller" DstPort 1 } } Line { SrcBlock "Discrete PID\n Controller" SrcPort 1 Points [5, 0] Branch { DstBlock "Gain1" DstPort 1 } Branch { Points [0, 80] DstBlock "Scope4" DstPort 1 } } Line { SrcBlock "Saturation1" SrcPort 1 Points [30, 0] Branch { DstBlock "Duty Raw" DstPort 1 } Branch { DstBlock "Gain2" DstPort 1 } } Line { SrcBlock "Gain1" SrcPort 1 Points [10, 0] Branch { DstBlock "Saturation1" DstPort 1 } Branch { Points [0, 80] DstBlock "Scope1" DstPort 1 } } Line { SrcBlock "ADC filter" SrcPort 1 Points [20, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, 155] DstBlock "TX Output Multiplexed\nfor Matlab / Labview" DstPort 1 } } Annotation { Name "e[n]" Position [366, 272] } } } Block { BlockType Saturate Name "Saturation1" SID "85" Ports [1, 1] Position [560, 290, 585, 320] InputPortMap "u0" UpperLimit "160" LowerLimit "10" LinearizeAsGain off OutDataTypeStr "uint16" } Block { BlockType Scope Name "Scope1" SID "87" Ports [1] Position [695, 214, 725, 246] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } YMin "72.5" YMax "112.5" SaveName "ScopeData1" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope4" SID "129" Ports [1] Position [460, 239, 490, 271] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "0.018" SaveName "ScopeData2" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope5" SID "89" Ports [1] Position [460, 189, 490, 221] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "0.018" SaveName "ScopeData3" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Scope Name "Scope9" SID "130" Ports [1] Position [535, 214, 565, 246] Floating off Location [5, 48, 1371, 737] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%" } TimeRange "0.018" SaveName "ScopeData9" DataFormat "StructureWithTime" SampleTime "0" } Block { BlockType Reference Name "UART Configuration" SID "48" Tag "dsPIC_config_UART" Ports [] Position [310, 29, 425, 82] BackgroundColor "lightBlue" Priority "2" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Serial PORT/UART Configuration" SourceType "Configure UART" UART "2" proposed_BAUD "19200" BAUD "19200" ALT_TX_RX off InterruptTxWhen "When Transmit Buffer is empty" TXInterruptPri "7" TxBufferSize "32" TXEN on InterruptRxWhen "When Receive Buffer is full (contain 4 characters)" RXInterruptPri "1" RxBufferSize "32" DoNotImplementRxInterrupt off DoNotImplementTxInterrupt off UxBRG "51" Info "UxBRG = 51 || Real Baud : 19231 || % error : 0.16026 || max 0.00019231 Bytes / Step" RealBaud "0" ERROR "0.16026" BYTES_STEP "0.00019231" } Block { BlockType Reference Name "dbl-click to open\nGraphical interface" SID "49" Ports [] Position [457, 30, 535, 63] BackgroundColor "cyan" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Serial PORT/dbl-click to open\nGraphical interface" SourceType "" Nothing "0" } Line { SrcBlock "Constant2" SrcPort 1 DstBlock "PID Auto Tuned" DstPort 2 } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Output Compare" DstPort 2 } Line { SrcBlock "Saturation1" SrcPort 1 Points [25, 0] Branch { Points [0, -75] DstBlock "Scope1" DstPort 1 } Branch { DstBlock "Output Compare" DstPort 1 } } Line { SrcBlock "PID Auto Tuned" SrcPort 3 Points [110, 0] Branch { DstBlock "Saturation1" DstPort 1 } Branch { Points [0, -75] DstBlock "Scope9" DstPort 1 } } Line { SrcBlock "PID Auto Tuned" SrcPort 1 DstBlock "Scope5" DstPort 1 } Line { SrcBlock "PID Auto Tuned" SrcPort 2 DstBlock "Scope4" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 1 DstBlock "PID Auto Tuned" DstPort 1 } } }