📄 a_law_base.mdl
字号:
Block {
BlockType Reference
Name "Sample\nand Hold"
Ports [1, 1, 0, 1]
Position [45, 94, 95, 136]
SourceBlock "dspsigops/Sample\nand Hold"
SourceType "Sample and Hold"
ShowPortLabels on
trig "Rising edge"
initCond "0"
}
Block {
BlockType DiscretePulseGenerator
Name "sample pulse\nf=100hz\n"
Ports [0, 1]
Position [53, 25, 87, 70]
Orientation "down"
NamePlacement "alternate"
PulseType "Time based"
Period "0.01"
PulseWidth "5"
}
Block {
BlockType Outport
Name "Out1"
Position [235, 108, 265, 122]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Sample\nand Hold"
SrcPort 1
DstBlock "Pcm"
DstPort 1
}
Line {
SrcBlock "Pcm"
SrcPort 1
DstBlock "Bing_Chuan"
DstPort 1
}
Line {
SrcBlock "sample pulse\nf=100hz\n"
SrcPort 1
DstBlock "Sample\nand Hold"
DstPort trigger
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 30]
DstBlock "Sample\nand Hold"
DstPort 1
}
Line {
SrcBlock "Bing_Chuan"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Mo2_Judgement"
Ports [2, 1]
Position [565, 160, 605, 220]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Mo2_Judgement"
Location [6, 74, 794, 522]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [15, 63, 45, 77]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [55, 18, 85, 32]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [225, 25, 255, 55]
Value "1.5"
}
Block {
BlockType Constant
Name "Constant1"
Position [225, 100, 255, 130]
Value "0.5"
}
Block {
BlockType Reference
Name "Interval Test\nDynamic"
Ports [3, 1]
Position [295, 54, 330, 86]
SourceBlock "simulink/Logic and Bit\nOperations/Interval"
" Test\nDynamic"
SourceType "Interval Test Dynamic"
ShowPortLabels on
IntervalClosedRight on
IntervalClosedLeft on
LogicOutDataTypeMode "boolean"
}
Block {
BlockType Reference
Name "Sample\nand Hold"
Ports [1, 1, 0, 1]
Position [115, 49, 165, 91]
SourceBlock "dspsigops/Sample\nand Hold"
SourceType "Sample and Hold"
ShowPortLabels on
trig "Rising edge"
initCond "0"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [270, 194, 300, 226]
Location [0, 0, 575, 364]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData4"
DataFormat "StructureWithTime"
}
Block {
BlockType Outport
Name "Out1"
Position [365, 58, 395, 72]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [20, 0]
DstBlock "Interval Test\nDynamic"
DstPort 1
}
Line {
SrcBlock "Interval Test\nDynamic"
SrcPort 1
Points [0, -5]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [5, 0; 0, -35]
DstBlock "Interval Test\nDynamic"
DstPort 3
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Sample\nand Hold"
DstPort 1
}
Line {
SrcBlock "Sample\nand Hold"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Interval Test\nDynamic"
DstPort 2
}
Branch {
Points [0, 140]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "In2"
SrcPort 1
Points [50, 0]
DstBlock "Sample\nand Hold"
DstPort trigger
}
}
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [700, 326, 730, 359]
Location [5, 49, 797, 543]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
TimeRange "0.3"
YMin "0~0"
YMax "1~1"
SaveName "ScopeData1"
DataFormat "Array"
MaxDataPoints "99999"
}
Block {
BlockType Scope
Name "Scope2"
Ports [2]
Position [640, 281, 670, 314]
Location [6, 50, 796, 564]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
YMin "-1~-1"
YMax "2~2"
DataFormat "Array"
MaxDataPoints "99999"
}
Block {
BlockType Scope
Name "Scope3"
Ports [2]
Position [810, 281, 840, 314]
Location [6, 50, 798, 544]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
TimeRange "0.3"
YMin "0~0"
YMax "2~2"
SaveName "ScopeData2"
DataFormat "Array"
MaxDataPoints "99999"
}
Block {
BlockType Scope
Name "Scope6"
Ports [3]
Position [415, 33, 445, 67]
Location [6, 50, 806, 577]
Open off
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "0~0~0"
YMax "1~1~1"
SaveName "ScopeData7"
DataFormat "Array"
MaxDataPoints "99999"
}
Block {
BlockType Scope
Name "Scope7"
Ports [2]
Position [1010, 111, 1040, 144]
Location [6, 50, 806, 576]
Open off
NumInputPorts "2"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
TimeRange "0.3 "
YMin "-1.25~-1.1"
YMax "0.75~0.7"
SaveName "ScopeData6"
DataFormat "StructureWithTime"
MaxDataPoints "58000"
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [1, 1]
Position [705, 245, 745, 305]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Subsystem1"
Location [2, 80, 790, 559]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [30, 68, 60, 82]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [90, 58, 165, 92]
OutDataTypeMode "double"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Derivative
Name "Derivative"
Position [215, 60, 245, 90]
}
Block {
BlockType Derivative
Name "Derivative1"
Position [545, 90, 575, 120]
}
Block {
BlockType Reference
Name "Phase-Locked\nLoop"
Ports [1, 3]
Position [330, 57, 420, 103]
SourceBlock "commsynccomp2/Phase-Locked\nLoop"
SourceType "Phase-Locked Loop"
ShowPortLabels on
Fn "[3.0002 0 40002]"
Fd "[1 67.46 2270.9 40002]"
Kvco "1"
Fc "400"
Ph "0"
Ac "1"
}
Block {
BlockType Saturate
Name "Saturation"
Position [625, 90, 655, 120]
UpperLimit "1"
LowerLimit "0"
}
Block {
BlockType Saturate
Name "Saturation1"
Position [275, 60, 305, 90]
UpperLimit "1"
LowerLimit "0"
}
Block {
BlockType Scope
Name "Scope"
Ports [3]
Position [705, 159, 715, 291]
Location [1, 45, 801, 571]
Open off
NumInputPorts "3"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
axes3 "%<SignalLabel>"
}
YMin "0~-1~-1"
YMax "1~1~1"
SaveName "ScopeData10"
DataFormat "StructureWithTime"
}
Block {
BlockType Signum
Name "Sign"
Position [470, 90, 500, 120]
}
Block {
BlockType Terminator
Name "Terminator"
Position [565, 15, 585, 35]
}
Block {
BlockType Terminator
Name "Terminator1"
Position [555, 50, 575, 70]
}
Block {
BlockType Outport
Name "Out1"
Position [725, 93, 755, 107]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Phase-Locked\nLoop"
SrcPort 2
Points [25, 0; 0, -20]
DstBlock "Terminator1"
DstPort 1
}
Line {
SrcBlock "Phase-Locked\nLoop"
SrcPort 1
Points [15, 0; 0, -25; 110, 0]
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "Saturation1"
SrcPort 1
Points [5, 0]
DstBlock "Phase-Locked\nLoop"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Derivative1"
DstPort 1
}
Branch {
Points [0, 165]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "Derivative1"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Phase-Locked\nLoop"
SrcPort 3
Points [5, 0]
Branch {
Points [25, 0]
DstBlock "Sign"
DstPort 1
}
Branch {
Points [0, 130]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [10, 0; 0, -5]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -