📄 with_skr.mdl
字号:
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 38, 55, 52]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [25, 100, 115, 140]
Value "tresh"
}
Block {
BlockType Constant
Name "Constant2"
Position [225, 113, 295, 147]
Value "cap"
}
Block {
BlockType Gain
Name "Gain"
Position [410, 70, 440, 100]
Gain "gain"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [2, 1]
Position [170, 70, 210, 130]
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|[-15:1:15]*2/31"
MaskTabNameString ",,"
System {
Name "Subsystem1"
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 [315, 135, 345, 165]
}
Block {
BlockType Constant
Name "Constant2"
Position [390, 100, 445, 130]
Value "sel_out"
}
Block {
BlockType Gain
Name "Gain"
Position [415, 35, 445, 65]
Gain "0.5+randn(1,1)/1000"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [200, 35, 230, 65]
Gain "1000"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Saturate
Name "Saturation"
Position [260, 35, 290, 65]
UpperLimit "1"
LowerLimit "-1"
}
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 [345, 40, 365, 60]
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 [495, 100, 525, 130]
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 [615, 108, 645, 122]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
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
Points [0, 0]
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 "Saturation"
SrcPort 1
Points [5, 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
Points [10, 0]
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [355, 35, 375, 55]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [80, 28, 115, 62]
SampleTime "ts"
}
Block {
BlockType SubSystem
Name "dac"
Ports [2, 1]
Position [320, 85, 360, 145]
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/31"
System {
Name "dac"
Location [316, 183, 886, 494]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [40, 138, 70, 152]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "In2"
Position [20, 28, 50, 42]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [75, 60, 105, 90]
Value "skr"
}
Block {
BlockType Reference
Name "Dot Product"
Ports [2, 1]
Position [300, 112, 330, 143]
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 "Zero"
DoSatur off
}
Block {
BlockType Gain
Name "Gain1"
Position [120, 130, 150, 160]
Gain "gain"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType MATLABFcn
Name "MATLAB Fcn"
Position [115, 20, 175, 50]
MATLABFcn "scramble(u)"
}
Block {
BlockType Switch
Name "Switch"
Position [225, 55, 255, 85]
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Out1"
Position [360, 48, 390, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Dot Product"
SrcPort 1
Points [10, 0]
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [25, 0; 0, -10]
DstBlock "Dot Product"
DstPort 2
}
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 "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
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [10, 0; 0, 50]
DstBlock "Dot Product"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "residuo"
Position [465, 78, 495, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "bits"
Position [255, 183, 285, 197]
NamePlacement "alternate"
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [15, 0]
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "dac"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -