📄 duolingjiance.mdl
字号:
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
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 Sin
SineType "Time based"
TimeSource "Use simulation time"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "duolingjiance"
Location [7, 195, 998, 539]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Abs
Name "Abs"
Position [550, 120, 580, 150]
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Analog\nFilter Design"
Ports [1, 1]
Position [225, 106, 280, 144]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Bandpass"
N "8"
Wlo "30"
Whi "100"
Rp "2"
Rs "40"
}
Block {
BlockType Reference
Name "Analog\nFilter Design1"
Ports [1, 1]
Position [625, 118, 675, 152]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Lowpass"
N "10"
Wlo "70"
Whi "80"
Rp "2"
Rs "40"
}
Block {
BlockType Constant
Name "Constant"
Position [285, 170, 315, 200]
Value "0"
}
Block {
BlockType Constant
Name "Constant1"
Position [635, 190, 665, 220]
Value "0.5"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [410, 123, 450, 147]
OutDataTypeMode "double"
ConvertRealWorld "Stored Integer (SI)"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Derivative
Name "Derivative"
Position [490, 120, 520, 150]
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [50, 108, 95, 142]
PulseType "Time based"
PulseWidth "50"
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator1"
Ports [0, 1]
Position [690, 248, 735, 282]
PulseType "Time based"
PulseWidth "50"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [345, 117, 375, 148]
InputSameDT off
LogicOutDataTypeMode "Specify via dialog"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [755, 127, 785, 158]
Operator ">"
InputSameDT off
LogicOutDataTypeMode "Boolean"
}
Block {
BlockType Reference
Name "Sample\nand Hold1"
Ports [1, 1, 0, 1]
Position [820, 204, 870, 246]
NamePlacement "alternate"
SourceBlock "dspsigops/Sample\nand Hold"
SourceType "Sample and Hold"
ShowPortLabels on
trig "Either edge"
initCond "0"
latchinput off
}
Block {
BlockType Scope
Name "Scope"
Ports [7]
Position [895, 44, 930, 166]
Floating off
Location [88, 180, 927, 671]
Open off
NumInputPorts "7"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
axes4 "%<SignalLabel>"
axes5 "%<SignalLabel>"
axes6 "%<SignalLabel>"
axes7 "%<SignalLabel>"
}
YMin "-5~-5~-5~-5~0~-5~-5"
YMax "5~5~5~5~5~5~5"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [230, 171, 260, 204]
Floating off
Location [178, 534, 771, 773]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-5~-5"
YMax "5~5"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [60, 195, 90, 225]
SineType "Time based"
Frequency "80"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave1"
Ports [0, 1]
Position [60, 55, 90, 85]
SineType "Time based"
Frequency "50"
SampleTime "0"
}
Block {
BlockType Switch
Name "Switch"
Position [155, 110, 185, 140]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
Points [20, 0; 0, 45]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Switch"
DstPort 2
}
Branch {
Points [0, 70]
DstBlock "Scope1"
DstPort 2
}
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [20, 0; 0, -75]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 55]
DstBlock "Scope1"
DstPort 1
}
Branch {
DstBlock "Analog\nFilter Design"
DstPort 1
}
}
Line {
SrcBlock "Analog\nFilter Design"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Relational\nOperator"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [5, 0; 0, -45]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Data Type Conversion"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Abs"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "Abs"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Analog\nFilter Design1"
DstPort 1
}
Branch {
Points [0, -30]
DstBlock "Scope"
DstPort 4
}
}
Line {
SrcBlock "Pulse\nGenerator1"
SrcPort 1
Points [105, 0]
DstBlock "Sample\nand Hold1"
DstPort trigger
}
Line {
SrcBlock "Analog\nFilter Design1"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "Relational\nOperator1"
DstPort 1
}
Branch {
Points [0, -15]
DstBlock "Scope"
DstPort 5
}
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [70, 0]
DstBlock "Relational\nOperator1"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator1"
SrcPort 1
Points [0, -10; 15, 0]
Branch {
DstBlock "Sample\nand Hold1"
DstPort 1
}
Branch {
DstBlock "Scope"
DstPort 6
}
}
Line {
SrcBlock "Sample\nand Hold1"
SrcPort 1
Points [0, -75]
DstBlock "Scope"
DstPort 7
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -