📄 pwm1.mdl
字号:
Model {
Name "pwm1"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Sat Feb 26 07:27:40 2005"
Creator "M. Riaz"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "M. Riaz"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Sat Feb 26 08:02:25 2005"
ModelVersionFormat "1.%<AutoIncrement:1>"
ConfigurationManager "None"
SimParamPage "WorkspaceI/O"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
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
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode45"
SolverMode "Auto"
StartTime "0.0"
StopTime ".02"
MaxOrder 5
MaxStep "1e-6"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "auto"
RelTol "1e-5"
AbsTol "auto"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "t"
SaveState off
StateSaveName "xout"
SaveOutput on
OutputSaveName "f"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on
BooleanDataType on
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_default_tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Clock
DisplayTime off
}
Block {
BlockType Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType Fcn
Expr "sin(u[1])"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
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
}
Block {
BlockType Lookup
InputValues "[-4:5]"
OutputValues " rand(1,10)-0.5"
ShowAdditionalParam off
LookUpMeth "Interpolation-Extrapolation"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
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 Signum
ZeroCross on
}
Block {
BlockType Sin
SineType "Time based"
Amplitude "1"
Bias "0"
Frequency "1"
Phase "0"
Samples "10"
Offset "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
VariableName "simulink_output"
MaxDataPoints "1000"
Decimation "1"
SampleTime "0"
}
}
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 "pwm1"
Location [345, 318, 925, 611]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Scope
Name "2 phase voltage"
Ports [1]
Position [430, 56, 465, 104]
Location [81, 130, 524, 390]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "2-phase (cycle average) output voltage"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.02"
YMin "-1"
YMax "1"
DataFormat "StructureWithTime"
MaxDataPoints "25000"
SampleInput on
}
Block {
BlockType Scope
Name "2 phase voltage1"
Ports [1]
Position [360, 206, 395, 254]
Location [81, 130, 524, 390]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "2-phase (cycle average) output voltage"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "0.02"
YMin "-1"
YMax "1"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
MaxDataPoints "25000"
SampleInput on
}
Block {
BlockType Reference
Name "Repeating\nSequence"
Ports [0, 1]
Position [155, 137, 200, 183]
ShowName off
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
rep_seq_t "[0 0.5/1000 1/1000]"
rep_seq_y "[1 -1 1]"
Port {
PortNumber 1
Name "tri"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
}
Block {
BlockType Signum
Name "Sign"
Position [320, 65, 350, 95]
}
Block {
BlockType Sin
Name "Sine Wave"
Position [45, 65, 75, 95]
SineType "Time based"
Frequency "2*pi*50"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [250, 70, 270, 90]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [505, 220, 535, 250]
ShowName off
VariableName "h"
MaxDataPoints "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType SubSystem
Name "fourier"
Ports []
Position [456, 156, 529, 199]
BackgroundColor "yellow"
DropShadow on
NamePlacement "alternate"
ShowName off
OpenFcn "fourierdec"
ShowPortLabels off
TreatAsAtomicUnit off
MaskHelp "Fourier series decomposition"
MaskDisplay "disp('FOURIER')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "fourier"
Location [148, 571, 512, 671]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Annotation {
Name "To obtain the Fourier decomposition of a pe"
"riodic signal:\na) run a simulation for one period duration\nb) Specify the f"
"undamental frequency\n c) Specify the number of harmonics\n"
Position [187, 48]
FontSize 12
}
}
}
Block {
BlockType Gain
Name "ma"
Position [125, 65, 155, 95]
}
Block {
BlockType Gain
Name "ma1"
Position [180, 65, 210, 95]
ShowName off
Gain "1/2"
}
Block {
BlockType Constant
Name "number of\nharmonics"
Position [450, 220, 480, 250]
BackgroundColor "orange"
Value "5"
}
Block {
BlockType Outport
Name "f"
Position [385, 33, 415, 47]
}
Line {
SrcBlock "ma"
SrcPort 1
DstBlock "ma1"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Sign"
DstPort 1
}
Line {
Name "tri"
Labels [0, 0]
SrcBlock "Repeating\nSequence"
SrcPort 1
Points [55, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, 70]
DstBlock "2 phase voltage1"
DstPort 1
}
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
DstBlock "ma"
DstPort 1
}
Line {
SrcBlock "Sign"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "2 phase voltage"
DstPort 1
}
Branch {
DstBlock "f"
DstPort 1
}
}
Line {
SrcBlock "number of\nharmonics"
SrcPort 1
DstBlock "To Workspace3"
DstPort 1
}
Line {
SrcBlock "ma1"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Annotation {
Name "Sinusoidal PWM\ntwo-phase\nsignal generator"
Position [318, 171]
FontSize 11
FontWeight "bold"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -