📄 am_dsb_modulation.mdl
字号:
Block {
BlockType DataTypeConversion
OutDataTypeMode "Inherit via back propagation"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
ConvertRealWorld "Real World Value (RWV)"
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType DiscreteFilter
Numerator "[1]"
Denominator "[1 2]"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
Realization "auto"
}
Block {
BlockType DiscreteIntegrator
IntegratorMethod "Integration: Forward Euler"
gainval "1.0"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
InitialConditionMode "State and output"
SampleTime "1"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow off
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType FrameConversion
OutFrame "Frame based"
}
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 InitialCondition
Value "1"
SampleTime "-1"
}
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 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 RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross 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 "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SignalGenerator
WaveForm "sine"
TimeSource "Use simulation time"
Amplitude "1"
Frequency "1"
Units "Hertz"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
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 "AM_DSB_Modulation"
Location [661, 322, 1241, 604]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Constant
Name "Constant"
Position [436, 120, 464, 150]
Orientation "up"
NamePlacement "alternate"
ShowName off
Value "[2 0 2.8]"
}
Block {
BlockType Reference
Name "DSB AM\nModulator\nPassband"
Ports [1, 1]
Position [130, 82, 205, 128]
SourceBlock "commanapbnd2/DSB AM\nModulator\nPassband"
SourceType "DSB AM Modulator Passband"
ShowPortLabels on
Offset "1"
Fc "180"
Ph "pi/3"
}
Block {
BlockType Reference
Name "DSBSC AM\nDemodulator\nPassband"
Ports [1, 1]
Position [255, 82, 330, 128]
SourceBlock "commanapbnd2/DSBSC AM\nDemodulator\nPassband"
SourceType "DSBSC AM Demodulator Passband"
ShowPortLabels on
Fc "180"
num "[4.75 9.14 4.75]*.01"
den "[1 -1.3108 .4936]"
Ph "pi/3"
ts "0.001"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [395, 41, 400, 79]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [510, 69, 540, 101]
Location [18, 191, 785, 692]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "1"
YMin "-2.2"
DataFormat "StructureWithTime"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Ports [0, 1]
Position [40, 90, 70, 120]
Amplitude "0.7"
Frequency "8"
}
Block {
BlockType Reference
Name "Spectrum\nScope"
Ports [1]
Position [410, 174, 455, 226]
SourceBlock "dspsnks4/Spectrum\nScope"
SourceType "Spectrum Scope"
ShowPortLabels off
ScopeProperties off
Domain "Frequency"
HorizSpan "1"
UseBuffer on
BufferSize "512"
Overlap "256"
inpFftLenInherit on
FFTlength "512"
numAvg "8"
DisplayProperties off
AxisGrid on
Memory off
FrameNumber on
AxisLegend off
AxisZoom off
OpenScopeAtSimStart on
OpenScopeImmediately off
FigPos "get(0,'defaultfigureposition')"
AxisProperties on
XUnits "Hertz"
XRange "[0...Fs/2]"
InheritXIncr off
XIncr "1/720"
XLabel "Samples"
YUnits "dB"
YMin "-1"
YMax "20"
YLabel "Magnitude, dB"
LineProperties off
LineColors "[0 0 1]"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [440, 75, 460, 95]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [295, 181, 330, 219]
SampleTime "1/720"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, 25]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
Points [-5, 0; 30, 0]
Branch {
DstBlock "DSB AM\nModulator\nPassband"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "DSB AM\nModulator\nPassband"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "DSBSC AM\nDemodulator\nPassband"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 95]
DstBlock "Zero-Order\nHold"
DstPort 1
}
}
Line {
SrcBlock "DSBSC AM\nDemodulator\nPassband"
SrcPort 1
Points [20, 0; 0, -35]
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Spectrum\nScope"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -