📄 iq.mdl
字号:
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 SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
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 Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
}
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 "iq"
Location [134, 150, 970, 739]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Reference
Name "1"
Ports [1, 1]
Position [405, 233, 485, 277]
SourceBlock "commutil2/Unipolar to\nBipolar\nConverter"
SourceType "Unipolar to Bipolar Converter"
ShowPortLabels on
M "4"
polarity "Positive"
}
Block {
BlockType Reference
Name "2"
Ports [1, 1]
Position [400, 298, 480, 342]
SourceBlock "commutil2/Unipolar to\nBipolar\nConverter"
SourceType "Unipolar to Bipolar Converter"
ShowPortLabels on
M "4"
polarity "Positive"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [700, 287, 730, 318]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [610, 246, 650, 284]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [615, 308, 650, 352]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Random Integer\nGenerator"
Ports [0, 1]
Position [110, 268, 190, 312]
SourceBlock "commrandsrc2/Random Integer\nGenerator"
SourceType "Random Integer Generator"
ShowPortLabels on
mul "4"
seed "12345"
Ts "0.001"
frameBased off
sampPerFrame "1"
orient off
outDataType "double"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [760, 289, 790, 321]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [685, 189, 715, 221]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [685, 369, 715, 401]
Floating off
Location [188, 390, 512, 629]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData2"
DataFormat "StructureWithTime"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [545, 260, 575, 290]
SineType "Time based"
Frequency "100"
Phase "pi/2"
SampleTime "0"
}
Block {
BlockType Sin
Name "Sine Wave1"
Ports [0, 1]
Position [545, 325, 575, 355]
SineType "Time based"
Frequency "100"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [1, 2]
Position [235, 224, 295, 351]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskHideContents off
System {
Name "Subsystem"
Location [61, 292, 631, 557]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 118, 55, 132]
IconDisplay "Port number"
}
Block {
BlockType Constant
Name "Constant"
Position [200, 140, 230, 170]
Value "0"
}
Block {
BlockType DiscretePulseGenerator
Name "Pulse\nGenerator"
Ports [0, 1]
Position [135, 83, 180, 117]
PulseType "Time based"
PulseWidth "50"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [455, 70, 475, 90]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [460, 180, 480, 200]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch"
Position [280, 74, 315, 126]
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch1"
Position [280, 189, 315, 241]
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [170, 28, 205, 62]
}
Block {
BlockType UnitDelay
Name "Unit Delay2"
Position [385, 173, 420, 207]
}
Block {
BlockType UnitDelay
Name "Unit Delay3"
Position [385, 63, 420, 97]
}
Block {
BlockType UnitDelay
Name "Unit Delay4"
Position [210, 83, 245, 117]
}
Block {
BlockType Outport
Name "Out1"
Position [505, 73, 535, 87]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Out2"
Position [515, 183, 545, 197]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
Points [25, 0]
Branch {
Points [0, 105]
DstBlock "Switch1"
DstPort 3
}
Branch {
Points [0, -80]
DstBlock "Unit Delay"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [55, 0]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Pulse\nGenerator"
SrcPort 1
Points [5, 0]
Branch {
Points [0, 115]
DstBlock "Switch1"
DstPort 2
}
Branch {
DstBlock "Unit Delay4"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay4"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Switch1"
DstPort 1
}
Branch {
DstBlock "Switch"
DstPort 3
}
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, 15; 125, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, -20]
DstBlock "Unit Delay3"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay3"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Switch1"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
Points [0, 25; 130, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [0, -25]
DstBlock "Unit Delay2"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay2"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
}
}
Line {
SrcBlock "Random Integer\nGenerator"
SrcPort 1
Points [0, 0]
DstBlock "Subsystem"
DstPort 1
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Sine Wave1"
SrcPort 1
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 30]
DstBlock "Add"
DstPort 1
}
Branch {
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, -20]
DstBlock "Add"
DstPort 2
}
Branch {
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "Add"
SrcPort 1
Points [0, 0]
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "1"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "1"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 2
DstBlock "2"
DstPort 1
}
Line {
SrcBlock "2"
SrcPort 1
DstBlock "Product1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -