📄 with_skr_and_dec.mdl
字号:
SrcBlock "Gain"
SrcPort 1
DstBlock "residuo"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "pipe 4 bit2"
Ports [1, 2]
Position [295, 50, 335, 110]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "ADC tresholds error (ideal: zeros(1,15))|DAC ca"
"pacitors' mismatch (ideal: ones(1,15))|output gain error (ideal: 8)|scramblin"
"g function (1=on 0=off)"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "tresh=@1;cap=@2;gain=@3;skr=@4;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0|ones(1,15)+randn(1,15)*0.01|8*(1+0.01)|1"
MaskTabNameString ",,,"
System {
Name "pipe 4 bit2"
Location [339, 151, 859, 362]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [25, 90, 115, 130]
Value "tresh"
}
Block {
BlockType Constant
Name "Constant1"
Position [230, 105, 295, 145]
Value "cap"
}
Block {
BlockType Gain
Name "Gain"
Position [410, 25, 440, 55]
Gain "gain"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [355, 30, 375, 50]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [80, 23, 115, 57]
SampleTime "ts"
}
Block {
BlockType SubSystem
Name "adc"
Ports [2, 1]
Position [170, 65, 210, 125]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskDescription "FLASH CONVERTER\n"
MaskPromptString "sample time|sel_out|soglie"
MaskStyleString "edit,popup(-1 e 1|0 e 1),edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskVariables "ts=@1;sel_out=@2;soglie=@3;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "ts|-1 e 1|[-7:1:7]*2/15"
MaskTabNameString ",,"
System {
Name "adc"
Location [198, 268, 853, 525]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 48, 55, 62]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "err\n"
Position [55, 183, 85, 197]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [55, 119, 95, 151]
Value "soglie"
VectorParams1D off
}
Block {
BlockType Constant
Name "Constant1"
Position [260, 140, 290, 170]
}
Block {
BlockType Constant
Name "Constant2"
Position [335, 105, 390, 135]
Value "sel_out"
}
Block {
BlockType Gain
Name "Gain"
Position [360, 40, 390, 70]
Gain "0.5"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Signum
Name "Sign"
Position [195, 40, 225, 70]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 45, 170, 65]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [290, 45, 310, 65]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [130, 125, 150, 145]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch"
Position [440, 105, 470, 135]
Threshold "1.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [85, 40, 120, 70]
SampleTime "ts"
}
Block {
BlockType Outport
Name "Out1"
Position [560, 113, 590, 127]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [5, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [20, 0; 0, 55]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "err\n"
SrcPort 1
Points [50, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [5, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
Points [0, 140; 170, 0; 0, -65]
DstBlock "Switch"
DstPort 3
}
Branch {
Points [25, 0]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Sign"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "dac"
Ports [2, 1]
Position [320, 80, 360, 140]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "gain"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "gain=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1/15"
System {
Name "dac"
Location [2, 82, 1014, 718]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [150, 288, 180, 302]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [65, 133, 95, 147]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [120, 165, 150, 195]
Value "skr"
}
Block {
BlockType Reference
Name "Dot Product"
Ports [2, 1]
Position [395, 262, 425, 293]
SourceBlock "simulink/Math\nOperations/Dot Product"
SourceType "Dot Product"
InputSameDT on
OutputDataTypeScalingMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^-10"
LockScale off
RndMeth "Floor"
DoSatur off
}
Block {
BlockType Gain
Name "Gain"
Position [200, 275, 230, 305]
Gain "gain"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType MATLABFcn
Name "MATLAB Fcn"
Position [160, 125, 220, 155]
MATLABFcn "scramble(u)"
}
Block {
BlockType Switch
Name "Switch"
Position [270, 160, 300, 190]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [450, 273, 480, 287]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [145, 0]
DstBlock "Dot Product"
DstPort 2
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Dot Product"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In2"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
DstBlock "MATLAB Fcn"
DstPort 1
}
Branch {
Points [0, 75; 150, 0]
DstBlock "Switch"
DstPort 3
}
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [75, 0]
DstBlock "Dot Product"
DstPort 1
}
Line {
SrcBlock "MATLAB Fcn"
SrcPort 1
Points [15, 0; 0, 25]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [95, 0; 0, -5]
DstBlock "Switch"
DstPort 2
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -