📄 mix_1.mdl
字号:
Block {
BlockType Fcn
Expr "sin(u[1])"
SampleTime "-1"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Goto
IconDisplay "Tag"
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
SampleTime "-1"
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType "M-S-Function"
MFile "mlfile"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType PMComponent
SubClassName "unknown"
}
Block {
BlockType PMIOPort
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Selector
InputType "Vector"
IndexMode "One-based"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
InputPortWidth "-1"
IndexIsStartValue off
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
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 StateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
AbsoluteTolerance "auto"
Realization "auto"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Trigonometry
Operator "sin"
OutputSignalType "auto"
SampleTime "-1"
}
Block {
BlockType ZeroOrderHold
SampleTime "1"
}
}
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 "mix_1"
Location [11, 85, 925, 493]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "Behavioral IF Spectrum"
Description "Spectrum Analyzer"
Ports [1]
Position [670, 263, 835, 317]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "Bandwidth"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "BW=@1;"
MaskDisplay "fprintf('Baseband Spectrum Analyzer \\n BW=%7."
"2f MHz', BW/1e6)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "50e6"
System {
Name "Behavioral IF Spectrum"
Location [265, 309, 700, 472]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Input Signal"
Position [50, 52, 90, 68]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [280, 35, 315, 85]
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties on
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "512"
Overlap "0"
inpFftLenInherit off
FFTlength "128"
numAvg "1"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "[350 33 344 198]"
AxisProperties off
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr on
XIncr "1.0"
XLabel "Samples"
YUnits "dB"
YMin "-90"
YMax "10"
YLabel "Magnitude, dB"
LineProperties off
wintypeSpecScope "Hann"
RsSpecScope "50"
betaSpecScope "5"
winsampSpecScope "Periodic"
}
Block {
BlockType Reference
Name "anti alias"
Ports [1, 1]
Position [115, 32, 180, 88]
SourceBlock "dsparch4/Analog\nFilter Design"
SourceType "Analog Filter Design"
method "Elliptic"
filttype "Lowpass"
N "8"
Wlo "BW*2*pi"
Whi "80"
Rp "0.11"
Rs "100"
}
Block {
BlockType ZeroOrderHold
Name "sampler"
Position [210, 41, 245, 79]
SampleTime "1/(2.56*BW)"
}
Line {
SrcBlock "Input Signal"
SrcPort 1
DstBlock "anti alias"
DstPort 1
}
Line {
SrcBlock "anti alias"
SrcPort 1
DstBlock "sampler"
DstPort 1
}
Line {
SrcBlock "sampler"
SrcPort 1
DstBlock "Spectrum\nScope"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Behavioral Ring Mixer"
Ports [2, 1]
Position [385, 260, 455, 320]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Behavioral Ring Mixer"
Location [230, 320, 655, 448]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "RF In"
Position [25, 33, 55, 47]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "LO In"
Position [25, 63, 55, 77]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Gain
Name "Conversion Loss"
Position [280, 40, 325, 70]
Gain "0.5"
}
Block {
BlockType Gain
Name "Gain"
Position [90, 55, 120, 85]
Gain "10"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [205, 25, 240, 85]
InputSameDT off
RndMeth "Floor"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [150, 55, 180, 85]
Operator "tanh"
}
Block {
BlockType Outport
Name "IF out"
Position [350, 48, 380, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Trigonometric\nFunction"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Conversion Loss"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Trigonometric\nFunction"
DstPort 1
}
Line {
SrcBlock "RF In"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "LO In"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Conversion Loss"
SrcPort 1
DstBlock "IF out"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "CVS"
Description "source block"
Ports [1, 0, 0, 0, 0, 1, 1]
Position [222, 120, 258, 165]
Orientation "up"
AttributesFormatString "\\n"
SourceBlock "powerlib/Electrical\nSources/Controlled Voltage"
" Source"
SourceType "Controlled Voltage Source"
ShowPortLabels on
Initialize off
SourceType "AC"
Amplitude "0"
Phase "0"
Frequency "0"
Measurements "None"
}
Block {
BlockType Reference
Name "CVS1"
Description "source block"
Ports [1, 0, 0, 0, 0, 1, 1]
Position [132, 120, 168, 165]
Orientation "up"
AttributesFormatString "\\n"
SourceBlock "powerlib/Electrical\nSources/Controlled Voltage"
" Source"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -