📄 ch3example26.mdl
字号:
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
}
}
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 "ch3example26"
Location [243, 107, 999, 530]
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 "Analog\nFilter Design"
Ports [1, 1]
Position [305, 64, 335, 96]
FontName "Helvetica"
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Butterworth"
filttype "Lowpass"
N "1"
Wlo "2*pi*1"
Whi "80"
Rp "2"
Rs "40"
}
Block {
BlockType Reference
Name "Counter1"
Ports [1, 1]
Position [305, 139, 370, 181]
Orientation "left"
FontName "Arial"
FontSize 12
SourceBlock "dspswit3/Counter"
SourceType "Counter"
Direction "Up"
CountEvent "Rising edge"
CounterSize "User defined"
MaxCount "1"
InitialCount "0"
Output "Count"
HitValue "1"
ResetInput off
SamplesPerFrame "1"
Ts "1"
CntDtype "Double"
HitDtype "Logical"
}
Block {
BlockType Reference
Name "Counter2"
Ports [1, 1]
Position [200, 139, 265, 181]
Orientation "left"
FontName "Arial"
FontSize 12
SourceBlock "dspswit3/Counter"
SourceType "Counter"
Direction "Up"
CountEvent "Rising edge"
CounterSize "User defined"
MaxCount "1"
InitialCount "0"
Output "Count"
HitValue "1"
ResetInput off
SamplesPerFrame "1"
Ts "1"
CntDtype "Double"
HitDtype "Logical"
}
Block {
BlockType Gain
Name "Gain"
Position [240, 64, 290, 96]
Gain "200"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [185, 60, 210, 95]
InputSameDT off
}
Block {
BlockType Relay
Name "Relay"
Position [90, 55, 120, 85]
OnSwitchValue "0"
OffSwitchValue "0"
OffOutputValue "-1"
}
Block {
BlockType Relay
Name "Relay1"
Position [420, 145, 450, 175]
Orientation "left"
OnSwitchValue "0"
OffSwitchValue "0"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [65, 196, 95, 229]
Orientation "left"
Location [40, 455, 364, 694]
Open on
NumInputPorts "2"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
TimeRange "0.002"
YMin "-5~-1"
YMax "5~2"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [2]
Position [490, 26, 520, 59]
Location [523, 395, 847, 634]
Open on
NumInputPorts "2"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
TimeRange "0.005"
YMin "-2~-30"
YMax "2~0"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [20, 55, 50, 85]
WaveForm "square"
Frequency "1e3"
}
Block {
BlockType Reference
Name "Voltage-Controlled\nOscillator"
Ports [1, 1]
Position [380, 58, 460, 102]
FontName "Arial"
FontSize 10
SourceBlock "commcontsrc2/Voltage-Controlled\nOscillator"
SourceType "Voltage-Controlled Oscillator"
Ac "1"
Fc "4.02e3"
Kc "1"
Ph "0"
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Relay"
DstPort 1
}
Line {
SrcBlock "Voltage-Controlled\nOscillator"
SrcPort 1
Points [15, 0; 0, 80]
DstBlock "Relay1"
DstPort 1
}
Line {
SrcBlock "Relay1"
SrcPort 1
Points [0, 0; -15, 0]
Branch {
DstBlock "Counter1"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Counter2"
SrcPort 1
Points [-25, 0]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Analog\nFilter Design"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Relay"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, 135]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Counter1"
SrcPort 1
DstBlock "Counter2"
DstPort 1
}
Line {
SrcBlock "Analog\nFilter Design"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Voltage-Controlled\nOscillator"
DstPort 1
}
Branch {
Points [0, -30]
DstBlock "Scope1"
DstPort 2
}
}
Annotation {
Name "2分频"
Position [334, 210]
}
Annotation {
Name "2分频"
Position [229, 210]
}
Annotation {
Name "正弦波转换\n为单极性脉冲"
Position [439, 205]
}
Annotation {
Name "正弦波转换\n为双极性脉冲"
Position [94, 120]
}
Annotation {
Name "锁相4倍频系统模型\n文件名:ch3example26.mdl"
Position [113, 29]
DropShadow on
FontName "Arial"
FontSize 12
}
Annotation {
Name "1KHz"
Position [32, 121]
}
Annotation {
Name "4KHz输出"
Position [508, 117]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -