📄 power_fft.mdl
字号:
IncludeMdlTerminateFcn on
CombineOutputUpdateFcns off
SuppressErrorStatus off
IncludeFileDelimiter "Auto"
ERTCustomFileBanners off
SupportAbsoluteTime on
LogVarNameModifier "rt_"
MatFileLogging on
MultiInstanceERTCode off
SupportNonFinite on
SupportComplex on
PurelyIntegerCode off
SupportContinuousTime on
SupportNonInlinedSFcns on
ExtMode off
ExtModeStaticAlloc off
ExtModeTesting off
ExtModeStaticAllocSize 1000000
ExtModeTransport 0
ExtModeMexFile "ext_comm"
RTWCAPISignals off
RTWCAPIParams off
RTWCAPIStates off
GenerateASAP2 off
}
PropName "Components"
}
}
PropName "Components"
}
Name "Configuration"
SimulationMode "normal"
CurrentDlgPage "Solver"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Constant
Value "1"
VectorParams1D on
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
}
Block {
BlockType Display
Format "short"
Decimation "10"
Floating off
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 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 MATLABFcn
MATLABFcn "sin"
OutputDimensions "-1"
OutputSignalType "auto"
Output1D on
SampleTime "-1"
}
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 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 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 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 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 "power_fft"
Location [4, 82, 746, 459]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Sin
Name "11th harm.\n30 V "
Ports [0, 1]
Position [45, 209, 80, 241]
SineType "Time based"
Amplitude "30"
Frequency "11*50*2*pi"
SampleTime "0"
}
Block {
BlockType Sin
Name "19th harm.\n10 V "
Ports [0, 1]
Position [45, 269, 80, 301]
SineType "Time based"
Amplitude "10"
Frequency "19*50*2*pi"
SampleTime "0"
}
Block {
BlockType Sin
Name "5th harm.\n40 V "
Ports [0, 1]
Position [45, 147, 80, 173]
SineType "Time based"
Amplitude "40"
Frequency "5*50*2*pi"
SampleTime "0"
}
Block {
BlockType Reference
Name "FFT"
Ports [1, 2]
Position [305, 125, 385, 205]
BackgroundColor "lightBlue"
DropShadow on
SourceBlock "powerlib_extras/Discrete\nMeasurements/FFT"
SourceType "Fast Fourier Transform"
ShowPortLabels on
Nsig "3"
f1 "50"
Ts "500e-6"
TsFFT "0.1"
base "[1 1 1 ] "
nDec "0"
mask "[1 -1 1 ]"
figure_N "2"
}
Block {
BlockType Sin
Name "Fundamental 100V\n DC=-50 V"
Ports [0, 1]
Position [45, 73, 80, 107]
SineType "Time based"
Amplitude "100"
Bias "-50"
Frequency "50*2*pi"
Phase "pi/2"
SampleTime "0"
}
Block {
BlockType Gain
Name "Gain"
Position [195, 150, 225, 180]
ShowName off
Gain "[1 2 3 ]"
Port {
PortNumber 1
Name " signals"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Display
Name "Shows RMS quantities of signals 1 2 3"
Ports [1]
Position [430, 240, 705, 350]
ForegroundColor "darkGreen"
Format "bank"
Decimation "1"
Lockdown off
}
Block {
BlockType Display
Name "Spectrum (harmonics 0-19 of signals 1 2 3)"
Ports [1]
Position [430, 74, 705, 216]
ForegroundColor "darkGreen"
Format "bank"
Decimation "1"
Lockdown off
}
Block {
BlockType Sum
Name "Sum"
Ports [4, 1]
Position [155, 142, 175, 188]
ShowName off
Inputs "++++"
}
Line {
SrcBlock "Fundamental 100V\n DC=-50 V"
SrcPort 1
Points [35, 0; 0, 60]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "5th harm.\n40 V "
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "11th harm.\n30 V "
SrcPort 1
Points [35, 0; 0, -55]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "19th harm.\n10 V "
SrcPort 1
Points [45, 0; 0, -105]
DstBlock "Sum"
DstPort 4
}
Line {
SrcBlock "FFT"
SrcPort 2
Points [20, 0; 0, 110]
DstBlock "Shows RMS quantities of signals 1 2 3"
DstPort 1
}
Line {
SrcBlock "FFT"
SrcPort 1
DstBlock "Spectrum (harmonics 0-19 of signals 1 2 3)"
DstPort 1
}
Line {
Name " signals"
FontSize 12
Labels [-1, 1]
SrcBlock "Gain"
SrcPort 1
DstBlock "FFT"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Annotation {
Name "P.Dahler, ABB Turgi"
Position [66, 35]
UseDisplayTextAsClickCallback off
FontSize 12
}
Annotation {
Name "Demonstration of on-line FFT "
Position [117, 14]
ForegroundColor "blue"
UseDisplayTextAsClickCallback off
FontSize 14
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -