📄 evm_library.mdl
字号:
Library {
Name "EVM_Library"
Version 6.6
MdlSubVersion 0
SavedCharacterEncoding "windows-1252"
LibraryType "BlockLibrary"
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ShowTestPointIcons on
ShowViewerIcons on
SortedOrder off
ExecutionContextIcon off
ShowLinearizationAnnotations on
ScopeRefreshTime 0.035000
OverrideScopeRefreshTime on
DisableAllScopes off
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Mon Jul 30 11:03:23 2007"
Creator "imoteday"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "imoteday"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Thu Aug 09 15:17:52 2007"
ModelVersionFormat "1.%<AutoIncrement:10>"
ConfigurationManager "None"
SimulationMode "normal"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelVerboseBuild off
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeReport off
CovReportOnPause on
ExtModeBatchMode off
ExtModeEnableFloating on
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigDurationFloating "auto"
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
ProdHWDeviceType "32-bit Generic"
ShowModelReferenceBlockVersion off
ShowModelReferenceBlockIO off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType FrameConversion
OutFrame "Frame based"
}
Block {
BlockType From
IconDisplay "Tag"
}
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
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
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 Outport
Port "1"
UseBusObject off
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 Reference
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels "FromPortIcon"
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
CollapseMode "All dimensions"
CollapseDim "1"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Terminator
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
UseDisplayTextAsClickCallback off
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "EVM_Library"
Location [98, 313, 428, 714]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType SubSystem
Name "EVM\nC S-function"
Ports [1, 1]
Position [185, 16, 235, 74]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Error Vector Magnitude"
MaskDescription "Compute the Error Vector Magnitude by comparing"
" the input signal to the reference provided by the Signal constellation param"
"eter."
MaskHelp "<p>To convert the output of this block to dB, u"
"se the dB Conversion block from the Signal Processing Blockset and set it to "
"\"Power\" mode.</p>\n<p>To convert the output of this block to a percentage v"
"alue, simply multiply its output by 100.</p>"
MaskPromptString "Signal constellation:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "sigconst=@1;"
MaskInitialization "C = sigconst(:).';\nPmax = max(abs(C)); % max p"
"ower point\nframeSize = 100;"
MaskDisplay "disp('EVM');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[1+j -1+j -1-j 1-j]"
System {
Name "EVM\nC S-function"
Location [884, 135, 1535, 357]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [25, 88, 55, 102]
IconDisplay "Port number"
}
Block {
BlockType FrameConversion
Name "Frame Conversion"
Position [110, 75, 165, 115]
OutFrame "Frame based"
}
Block {
BlockType "S-Function"
Name "RMS EVM S-function"
Ports [1, 1]
Position [225, 56, 445, 134]
CopyFcn "set_param(gcbh,'LinkStatus','none')"
PreSaveFcn "try, set_param(gcb,'FunctionName','myEVM'),"
" end"
InitFcn "try, set_param(gcb,'FunctionName','myEVM'),"
" end"
OpenFcn "sfunctionwizard(gcbh)"
FunctionName "myEVM"
Parameters "real(C),imag(C),Pmax"
SFunctionModules "myEVM_wrapper "
WizardData "DataTag0"
MaskType "S-Function Builder"
MaskDescription "The S-Function Builder block creates a wrap"
"per C-MEX S-function from your supplied C code with multiple input ports, out"
"put ports, and a variable number of scalar, vector, or matrix parameters. Th"
"e input and output ports can propagate Simulink built-in data types, fixed-po"
"int datatypes, complex, frame, 1-D, and 2-D signals. This block also support"
"s discrete and continuous states of type real. You can optionally have the b"
"lock generate a TLC file to be used with Real-Time Workshop for code generati"
"on."
MaskInitialization "val = [[.9 0.75 0.75 1 1 .9 .9 1]',[1 1 0."
"75 0.75 .9 .9 1 .9]'];try , sys = get_param(gcb,'SfunBuilderFcnName');if isem"
"pty(sys), sys = get_param(gcb,'FunctionName'); end,catch, sys = get_param(gcb"
",'FunctionName'); end"
MaskDisplay "plot(val(:,1),val(:,2)),disp(sys)port_label"
"('input',1,'inFrame')port_label('output',1,'RMS_EVM')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskCapabilities "slmaskedcaps(gcbh)"
}
Block {
BlockType Outport
Name "RMS EVM1"
Position [540, 88, 570, 102]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Frame Conversion"
DstPort 1
}
Line {
SrcBlock "RMS EVM S-function"
SrcPort 1
DstBlock "RMS EVM1"
DstPort 1
}
Line {
SrcBlock "Frame Conversion"
SrcPort 1
DstBlock "RMS EVM S-function"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "EVM\nEasy EML"
Ports [1, 1]
Position [55, 131, 105, 189]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Error Vector Magnitude"
MaskDescription "Computes the Error Vector Magnitude by comparin"
"g the input signal to the reference provided by the Signal constellation para"
"meter.\nIn RMS mode, the block outputs the RMS EVM value per input frame."
MaskHelp "<p>\nIf the RMS EVM box is checked, this block "
"outputs the RMS value of the EVM for each input frame, i.e., the output will "
"be a single value per input frame.\n</p>\n<p>\nIf the RMS EVM box is unchecke"
"d, this block will output the EVM value per input sample, i.e., the output wi"
"ll be of the same size as the input.\n</p>\n<p>To convert the output of this "
"block to dB, use the dB Conversion block from the Signal Processing Blockset "
"and set it to \"Power\" mode.</p>\n<p>To convert the output of this block to "
"a percentage value, simply multiply its output by 100.</p>"
MaskPromptString "Signal constellation:|RMS EVM"
MaskStyleString "edit,checkbox"
MaskTunableValueString "on,off"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "sigconst=@1;doRMS=@2;"
MaskInitialization "C = sigconst(:).';\nPmax = max(abs(C)); % max p"
"ower point\nmyOut=find_system(gcbh,'LookUnderMasks','all','Name','myOutput');"
"\n\nif doRMS\n set_param(myOut,'GotoTag','RMS_EVM')\nelse\n set_par"
"am(myOut,'GotoTag','EVM')\nend"
MaskDisplay "disp('EVM');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[1+j -1+j -1-j 1-j]|on"
MaskTabNameString ","
System {
Name "EVM\nEasy EML"
Location [591, 792, 1484, 1108]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -