📄 fxlimitcycle.mdl
字号:
Model {
Name "fxlimitcycle"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
PreSaveFcn ";fxptdlg('presave_cb',bdroot);"
CloseFcn ";fxptdlg('close_cb',bdroot);"
InitFcn ";fxptdlg('simInit_cb',bdroot);"
StartFcn ";fxptdlg('sim_cb',bdroot);"
StopFcn ";fxptdlg('store_cb',bdroot);"
Created "Sat May 04 19:52:31 2002"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "ewsgan"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Fri Dec 13 13:55:04 2002"
ModelVersionFormat "1.%<AutoIncrement:4>"
ConfigurationManager "None"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
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
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "FixedStepDiscrete"
SolverMode "Auto"
StartTime "0.0"
StopTime "0.055"
MaxOrder 5
MaxStep "auto"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "1/1000"
RelTol "1e-3"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints on
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on
BooleanDataType off
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
RTWOptions "-aEnforceIntegerDowncast=1 -aExtMode=0 -aExtModeTes"
"ting=0 -aFoldNonRolledExpr=1 -aForceParamTrailComments=0 -aGenerateComments=1"
" -aGenerateReport=0 -aIgnoreCustomStorageClasses=1 -aIncDataTypeInIds=0 -aInc"
"HierarchyInIds=0 -aInlineInvariantSignals=0 -aInlinedPrmAccess=\"Literals\" -"
"aLocalBlockOutputs=1 -aLogVarNameModifier=\"rt_\" -aMaxRTWIdLen=31 -aPrefixMo"
"delToSubsysFcnNames=1 -aRTWVerbose=1 -aRollThreshold=5 -aShowEliminatedStatem"
"ents=0"
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Scope
Floating off
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 "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
RTWStateStorageClass "Auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "fxlimitcycle"
Location [111, 81, 880, 373]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "150"
ReportName "simulink-default.rpt"
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [155, 35, 195, 75]
ShowAdditionalParam on
InputSameDT off
OutDataTypeMode "Specify via dialog"
OutDataType "sfrac(8)"
OutScaling "2^-2"
SaturateOnIntegerOverflow off
}
Block {
BlockType Scope
Name "Comparison 1"
Ports [1]
Position [445, 48, 475, 82]
Location [-108, 350, 920, 694]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.055"
YMin "0"
YMax "0.14"
DataFormat "StructureWithTime"
}
Block {
BlockType Constant
Name "Constant"
Position [15, 35, 55, 75]
Value "0.5"
ShowAdditionalParam on
OutDataTypeMode "Specify via dialog"
OutDataType "sfix(8)"
OutScaling "2^-7"
}
Block {
BlockType Reference
Name "FixPt to Dbl1"
Ports [1, 1]
Position [365, 21, 410, 59]
SourceBlock "fixpt_lib_4/Data Type/Gateway Out"
SourceType "Fixed-Point Gateway Out"
OutRealWorld "Real World Value"
OutBuiltInType "double"
RndMeth "Floor"
DoSatur off
}
Block {
BlockType Gain
Name "Gain"
Position [170, 125, 210, 165]
Orientation "left"
NamePlacement "alternate"
Gain "-0.75"
ShowAdditionalParam on
ParameterDataTypeMode "Specify via dialog"
ParameterDataType "sfrac(8)"
ParameterScalingMode "Use specified scaling"
ParameterScaling "2^-2"
OutDataTypeMode "Specify via dialog"
OutDataType "sfrac(8)"
OutScaling "2^-2"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [75, 34, 105, 76]
NamePlacement "alternate"
Gain "0.25"
ShowAdditionalParam on
ParameterDataTypeMode "Specify via dialog"
ParameterDataType "sfrac(8)"
ParameterScaling "2^-15"
OutDataTypeMode "Specify via dialog"
OutDataType "sfrac(8)"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [275, 30, 315, 70]
X0 "0.0"
SampleTime "-1"
}
Line {
SrcBlock "Add"
SrcPort 1
Points [30, 0; 0, -5]
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0; 0, 5]
Branch {
Points [15, 0]
DstBlock "FixPt to Dbl1"
DstPort 1
}
Branch {
Points [0, 90]
DstBlock "Gain"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [-35, 0; 0, -80]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "FixPt to Dbl1"
SrcPort 1
Points [15, 0]
DstBlock "Comparison 1"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, -10]
DstBlock "Add"
DstPort 1
}
Annotation {
Name "This exercise demonstrate the limit cycle effec"
"t\nThe exercise is an extension from the IIR filter example in Chapter 2, exc"
"ept that\nthe IIR filter is implemented as an HPF, by changing the coefficien"
"t to -0.75.\nAll the blocks are implemented in sfrac(8) precision.\nA constan"
"t voltage of 0.5 is input into the IIR filter, and the output oscillates bet"
"ween 0.062 to 0.078\nRemedy : The oscillation will stop if a higher precision"
" is used (such as Q.15)\nChange the coefficient back to 0.75. \nNote that a l"
"owpass filter will not result in any oscillation. WHy?\nThis is because the L"
"PF filtered out the limitcycle oscillation (~500Hz in this case)"
Position [256, 232]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -