📄 second_adc_dt.mdl
字号:
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
InitialConditionMode "State and output"
SampleTime "1"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow off
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
IgnoreLimit off
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
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
SampleTime "-1"
}
Block {
BlockType RateTransition
Integrity on
Deterministic on
X0 "0"
OutPortSampleTime "-1"
}
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"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType Signum
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
FixptAsFi off
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Courier New"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Courier New"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "second_adc_dt"
Location [168, 150, 1188, 798]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator1"
Ports [1, 1]
Position [245, 194, 280, 226]
IntegratorMethod "Integration: Forward Euler"
ExternalReset "none"
InitialConditionSource "internal"
SampleTime "ts"
IgnoreLimit off
ICPrevOutput "DiscIntNeverNeededParam"
ICPrevScaledInput "DiscIntNeverNeededParam"
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator2"
Ports [1, 1]
Position [410, 194, 445, 226]
IntegratorMethod "Integration: Forward Euler"
ExternalReset "none"
InitialConditionSource "internal"
SampleTime "ts"
IgnoreLimit off
ICPrevOutput "DiscIntNeverNeededParam"
ICPrevScaledInput "DiscIntNeverNeededParam"
}
Block {
BlockType Reference
Name "FIR\nDecimation"
Ports [1, 1]
Position [650, 184, 715, 236]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag0"
SourceBlock "dspmlti4/FIR\nDecimation"
SourceType "FIR Decimation"
h "b"
D "Ndec"
framing "Maintain input frame size"
outputBufInitCond "0"
additionalParams off
allowOverrides on
firstCoeffMode "Same word length as input"
firstCoeffWordLength "16"
firstCoeffFracLength "15"
outputMode "Same as accumulator"
outputWordLength "16"
outputFracLength "15"
accumMode "Inherit via internal rule"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Inherit via internal rule"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Gain
Name "Gain"
Position [200, 195, 225, 225]
Gain "K1"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [360, 195, 390, 225]
Gain "K2"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType RateTransition
Name "Rate Transition"
Position [570, 189, 610, 231]
}
Block {
BlockType Scope
Name "Scope"
Ports [5]
Position [555, 114, 585, 146]
Location [71, 184, 1095, 876]
Open off
NumInputPorts "5"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
}
YMin "-5~-5~-5~-5~-5"
YMax "5~5~5~5~5"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Signum
Name "Sign"
Position [470, 195, 500, 225]
}
Block {
BlockType Reference
Name "Sine Wave"
Ports [0, 1]
Position [75, 188, 120, 232]
SourceBlock "dspsrcs4/Sine Wave"
SourceType "Sine Wave"
Amplitude "Amp"
Frequency "ft"
Phase "0"
SampleMode "Discrete"
OutComplex "Real"
CompMethod "Trigonometric fcn"
TableSize "Speed"
SampleTime "ts"
SamplesPerFrame "1"
additionalParams off
allowOverrides on
dataType "double"
wordLen "16"
udDataType "sfix(16)"
fracBitsMode "Best precision"
numFracBits "15"
ResetState "Restart at time zero"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [320, 200, 340, 220]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [155, 200, 175, 220]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [610, 285, 670, 315]
VariableName "out"
MaxDataPoints "Inf"
SampleTime "ts"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [755, 195, 815, 225]
VariableName "out_f"
MaxDataPoints "Inf"
SampleTime "ts"
SaveFormat "Array"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Sum4"
DstPort 1
}
Branch {
Points [0, -90]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [15, 0]
Branch {
Points [10, 0]
Branch {
Points [0, 90]
DstBlock "To Workspace"
DstPort 1
}
Branch {
DstBlock "Rate Transition"
DstPort 1
}
}
Branch {
Points [0, 55; -205, 0]
Branch {
Points [-165, 0]
DstBlock "Sum4"
DstPort 2
}
Branch {
DstBlock "Sum1"
DstPort 2
}
}
}
Branch {
Points [0, -75]
DstBlock "Scope"
DstPort 4
}
}
Line {
SrcBlock "Discrete-Time\nIntegrator1"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -80]
DstBlock "Scope"
DstPort 3
}
Branch {
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum4"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -85]
DstBlock "Scope"
DstPort 2
}
Branch {
DstBlock "Gain"
DstPort 1
}
}
Line {
SrcBlock "FIR\nDecimation"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [0, -45; -190, 0]
DstBlock "Scope"
DstPort 5
}
}
Line {
SrcBlock "Rate Transition"
SrcPort 1
DstBlock "FIR\nDecimation"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Discrete-Time\nIntegrator1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Discrete-Time\nIntegrator2"
SrcPort 1
DstBlock "Sign"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Discrete-Time\nIntegrator2"
DstPort 1
}
}
}
MatData {
NumRecords 1
DataRecord {
Tag DataTag0
Data " %)30 . < 8 ( 0 % "
"\" $ ! 0 . 0 8 ( ! % \" $ "
", 0 0 # $9)4D1E8TEN=&5R< "
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -