⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helicopt.mdl

📁 《嵌入式控制系统及其CC++实现-面向使用Matlab的软件开发者》源码
💻 MDL
📖 第 1 页 / 共 5 页
字号:
		  Name			  "Euler RPY"
		  Position		  [30, 318, 60, 332]
		  BackgroundColor	  "yellow"
		  Port			  "2"
		}
		Block {
		  BlockType		  Inport
		  Name			  "Pitch Cmd"
		  Position		  [125, 263, 155, 277]
		  BackgroundColor	  "yellow"
		  Port			  "3"
		}
		Block {
		  BlockType		  Inport
		  Name			  "Roll Cmd"
		  Position		  [125, 173, 155, 187]
		  BackgroundColor	  "yellow"
		  Port			  "4"
		}
		Block {
		  BlockType		  Inport
		  Name			  "Yaw Cmd"
		  Position		  [310, 383, 340, 397]
		  BackgroundColor	  "yellow"
		  Port			  "5"
		}
		Block {
		  BlockType		  Inport
		  Name			  "Hovering"
		  Position		  [240, 113, 270, 127]
		  BackgroundColor	  "yellow"
		  Port			  "6"
		}
		Block {
		  BlockType		  Demux
		  Name			  "Demux4"
		  Ports			  [1, 3]
		  Position		  [85, 191, 90, 459]
		  BackgroundColor	  "yellow"
		  ShowName		  off
		  Outputs		  "3"
		}
		Block {
		  BlockType		  Demux
		  Name			  "Demux5"
		  Ports			  [1, 3]
		  Position		  [85, 29, 90, 141]
		  BackgroundColor	  "yellow"
		  ShowName		  off
		  Outputs		  "3"
		}
		Block {
		  BlockType		  SubSystem
		  Name			  "Pitch Controller"
		  Ports			  [2, 1]
		  Position		  [375, 264, 420, 311]
		  BackgroundColor	  "yellow"
		  TreatAsAtomicUnit	  off
		  System {
		    Name		    "Pitch Controller"
		    Location		    [454, 324, 739, 504]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "r"
		    Position		    [25, 23, 55, 37]
		    BackgroundColor	    "yellow"
		    }
		    Block {
		    BlockType		    Inport
		    Name		    "y"
		    Position		    [25, 83, 55, 97]
		    BackgroundColor	    "yellow"
		    Port		    "2"
		    }
		    Block {
		    BlockType		    Gain
		    Name		    "Gain"
		    Position		    [110, 13, 160, 47]
		    BackgroundColor	    "yellow"
		    Gain		    "N_p"
		    }
		    Block {
		    BlockType		    Mux
		    Name		    "Mux"
		    Ports		    [2, 1]
		    Position		    [80, 81, 85, 119]
		    BackgroundColor	    "yellow"
		    ShowName		    off
		    Inputs		    "2"
		    DisplayOption	    "bar"
		    }
		    Block {
		    BlockType		    SubSystem
		    Name		    "Observer-\nController"
		    Ports		    [1, 1]
		    Position		    [110, 78, 170, 122]
		    BackgroundColor	    "yellow"
		    TreatAsAtomicUnit	    off
		    MaskType		    "DiscretizedStateSpace"
		    MaskDescription	    "Continuous mask uses c2d to trans"
"form parameters onto the Discrete State-Space block inside."
		    MaskPromptString	    "A (enter in s-domain:)|B (enter i"
"n s-domain:)|C (enter in s-domain:)|D (enter in s-domain:)|Initial conditions"
" (enter in s-domain:)|Absolute tolerance|Sample time:|Method:|Critical Freque"
"ncy (Hz):"
		    MaskStyleString	    "edit,edit,edit,edit,edit,edit,edi"
"t,popup(zoh|foh|tustin|prewarp|matched),edit"
		    MaskTunableValueString  "on,on,on,on,on,on,on,on,on"
		    MaskCallbackString	    "|||||||hidecrit|"
		    MaskEnableString	    "on,on,on,on,on,on,on,on,on"
		    MaskVisibilityString    "on,on,on,on,on,on,on,on,off"
		    MaskToolTipString	    "on,on,on,on,on,on,on,on,on"
		    MaskVarAliasString	    ",,,,,,,,"
		    MaskVariables	    "A=@1;B=@2;C=@3;D=@4;ic=@5;AbsTol="
"&6;SampleTime=@7;method=&8;Wc=@9;"
		    MaskInitialization	    "st=SampleTime;\nif length(st)>1\n"
"    st=SampleTime(1);\nend\nif(st>0)\n    [Ad, Bd, Cd, Dd, icd] = sldiscutil("
"'discstatespace', {st,method,Wc,A,B,C,D,ic});\nend\nsldiscutil('initssmask', "
"st);\nif(st==0)\nset_param([gcb '/State Space'], 'AbsoluteTolerance', AbsTol)"
";\nend"
		    MaskDisplay		    "text( 0.5, 0.65, 'x'' = Ax+Bu', '"
"horizontalAlignment', 'center');\ntext( 0.5, 0.4, 'y = Cx+Du', 'horizontalAli"
"gnment', 'center');\ntext( 0.5, 1.0, method, 'verticalAlignment', 'top')"
		    MaskSelfModifiable	    on
		    MaskIconFrame	    on
		    MaskIconOpaque	    on
		    MaskIconRotate	    "port"
		    MaskIconUnits	    "normalized"
		    MaskValueString	    "ssobsctrl_p.a|ssobsctrl_p.b|ssobs"
"ctrl_p.c|ssobsctrl_p.d|0|auto|dt|zoh|1"
		    System {
		    Name		    "Observer-\nController"
		    Location		    [81, 369, 373, 516]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "In1"
		    Position		    [25, 68, 55, 82]
		    }
		    Block {
		    BlockType		    DiscreteStateSpace
		    Name		    "Discrete State-Space"
		    Position		    [85, 52, 200, 98]
		    A			    "Ad"
		    B			    "Bd"
		    C			    "Cd"
		    D			    "Dd"
		    X0			    "icd"
		    SampleTime		    "SampleTime"
		    }
		    Block {
		    BlockType		    Outport
		    Name		    "Out1"
		    Position		    [240, 68, 270, 82]
		    }
		    Line {
		    SrcBlock		    "In1"
		    SrcPort		    1
		    DstBlock		    "Discrete State-Space"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Discrete State-Space"
		    SrcPort		    1
		    DstBlock		    "Out1"
		    DstPort		    1
		    }
		    }
		    }
		    Block {
		    BlockType		    Sum
		    Name		    "Sum"
		    Ports		    [2, 1]
		    Position		    [185, 90, 205, 110]
		    BackgroundColor	    "yellow"
		    ShowName		    off
		    IconShape		    "round"
		    Inputs		    "++|"
		    InputSameDT		    off
		    OutDataTypeMode	    "Inherit via internal rule"
		    }
		    Block {
		    BlockType		    Outport
		    Name		    "u"
		    Position		    [230, 93, 260, 107]
		    BackgroundColor	    "yellow"
		    }
		    Line {
		    SrcBlock		    "y"
		    SrcPort		    1
		    DstBlock		    "Mux"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "r"
		    SrcPort		    1
		    DstBlock		    "Gain"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Gain"
		    SrcPort		    1
		    Points		    [30, 0]
		    DstBlock		    "Sum"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Observer-\nController"
		    SrcPort		    1
		    DstBlock		    "Sum"
		    DstPort		    2
		    }
		    Line {
		    SrcBlock		    "Sum"
		    SrcPort		    1
		    Points		    [0, 0]
		    Branch {
		    Points		    [0, 75; -145, 0]
		    DstBlock		    "Mux"
		    DstPort		    2
		    }
		    Branch {
		    Points		    [0, 0]
		    DstBlock		    "u"
		    DstPort		    1
		    }
		    }
		    Line {
		    SrcBlock		    "Mux"
		    SrcPort		    1
		    DstBlock		    "Observer-\nController"
		    DstPort		    1
		    }
		  }
		}
		Block {
		  BlockType		  SubSystem
		  Name			  "Pitch Smoothing"
		  Ports			  [1, 1]
		  Position		  [205, 260, 260, 310]
		  BackgroundColor	  "yellow"
		  TreatAsAtomicUnit	  off
		  MaskType		  "DiscretizedTransferFcn"
		  MaskDescription	  "Continuous mask uses c2d to transfo"
"rm parameters onto the Discrete Transfer function block inside."
		  MaskPromptString	  "Numerator (enter in s-domain:)|Deno"
"minator (enter in s-domain:)|Absolute tolerance:|Sample time:|Method:|Critica"
"l Frequency (Hz):"
		  MaskStyleString	  "edit,edit,edit,edit,popup(zoh|foh|t"
"ustin|prewarp|matched),edit"
		  MaskTunableValueString  "on,on,on,on,on,on"
		  MaskCallbackString	  "||||hidecrit|"
		  MaskEnableString	  "on,on,on,on,on,on"
		  MaskVisibilityString	  "on,on,on,on,on,off"
		  MaskToolTipString	  "on,on,on,on,on,on"
		  MaskVarAliasString	  ",,,,,"
		  MaskVariables		  "Numerator=@1;Denominator=@2;AbsTol="
"&3;SampleTime=@4;method=&5;Wc=@6;"
		  MaskInitialization	  "st=SampleTime;\nif length(st)>1\n  "
"  st=SampleTime(1);\nend\nif(st>0)\n    [numd,dend] = sldiscutil('disctransfe"
"rfcn',{st,method,Wc,Numerator,Denominator});\nend	\ns = get_param(gcb,"
"'maskvalues');\nnums = s{1};\ndens = s{2};\n%numc = eval(nums);\n%denc = eval"
"(dens);\nsldiscutil('inittfmask', st);\nif(st==0)\nset_param([gcb '/Transfer "
"Fcn'], 'AbsoluteTolerance', AbsTol);\nend"
		  MaskDisplay		  "dpoly(nums,dens)\ntext( 0.5, 1.0, m"
"ethod, 'verticalAlignment','top')"
		  MaskSelfModifiable	  on
		  MaskIconFrame		  on
		  MaskIconOpaque	  on
		  MaskIconRotate	  "port"
		  MaskIconUnits		  "normalized"
		  MaskValueString	  "[1]|[tau 1]|auto|dt|foh|1"
		  System {
		    Name		    "Pitch Smoothing"
		    Location		    [129, 251, 421, 508]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "In1"
		    Position		    [60, 103, 90, 117]
		    }
		    Block {
		    BlockType		    DiscreteTransferFcn
		    Name		    "Discrete\nTransfer Fcn"
		    Position		    [115, 92, 175, 128]
		    Numerator		    "numd"
		    Denominator		    "dend"
		    SampleTime		    "SampleTime"
		    }
		    Block {
		    BlockType		    Outport
		    Name		    "Out1"
		    Position		    [200, 103, 230, 117]
		    }
		    Line {
		    SrcBlock		    "Discrete\nTransfer Fcn"
		    SrcPort		    1
		    DstBlock		    "Out1"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "In1"
		    SrcPort		    1
		    DstBlock		    "Discrete\nTransfer Fcn"
		    DstPort		    1
		    }
		  }
		}
		Block {
		  BlockType		  Gain
		  Name			  "Pitch Torque Compensation"
		  Position		  [370, 69, 415, 101]
		  BackgroundColor	  "yellow"
		  Gain			  "Cq"
		}
		Block {
		  BlockType		  SubSystem
		  Name			  "Roll Controller"
		  Ports			  [2, 1]
		  Position		  [375, 173, 420, 222]
		  BackgroundColor	  "yellow"
		  TreatAsAtomicUnit	  off
		  System {
		    Name		    "Roll Controller"
		    Location		    [454, 324, 739, 504]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "r"
		    Position		    [25, 23, 55, 37]
		    BackgroundColor	    "yellow"
		    }
		    Block {
		    BlockType		    Inport
		    Name		    "y"
		    Position		    [25, 83, 55, 97]
		    BackgroundColor	    "yellow"
		    Port		    "2"
		    }
		    Block {
		    BlockType		    Gain
		    Name		    "Gain"
		    Position		    [110, 13, 160, 47]
		    BackgroundColor	    "yellow"
		    Gain		    "N_r"
		    }
		    Block {
		    BlockType		    Mux
		    Name		    "Mux"
		    Ports		    [2, 1]
		    Position		    [80, 81, 85, 119]
		    BackgroundColor	    "yellow"
		    ShowName		    off
		    Inputs		    "2"
		    DisplayOption	    "bar"
		    }
		    Block {
		    BlockType		    SubSystem
		    Name		    "Observer-\nController"
		    Ports		    [1, 1]
		    Position		    [110, 78, 170, 122]
		    BackgroundColor	    "yellow"
		    TreatAsAtomicUnit	    off
		    MaskType		    "DiscretizedStateSpace"
		    MaskDescription	    "Continuous mask uses c2d to trans"
"form parameters onto the Discrete State-Space block inside."
		    MaskPromptString	    "A (enter in s-domain:)|B (enter i"
"n s-domain:)|C (enter in s-domain:)|D (enter in s-domain:)|Initial conditions"
" (enter in s-domain:)|Absolute tolerance|Sample time:|Method:|Critical Freque"
"ncy (Hz):"
		    MaskStyleString	    "edit,edit,edit,edit,edit,edit,edi"
"t,popup(zoh|foh|tustin|prewarp|matched),edit"
		    MaskTunableValueString  "on,on,on,on,on,on,on,on,on"
		    MaskCallbackString	    "|||||||hidecrit|"
		    MaskEnableString	    "on,on,on,on,on,on,on,on,on"
		    MaskVisibilityString    "on,on,on,on,on,on,on,on,off"
		    MaskToolTipString	    "on,on,on,on,on,on,on,on,on"
		    MaskVarAliasString	    ",,,,,,,,"
		    MaskVariables	    "A=@1;B=@2;C=@3;D=@4;ic=@5;AbsTol="
"&6;SampleTime=@7;method=&8;Wc=@9;"
		    MaskInitialization	    "st=SampleTime;\nif length(st)>1\n"
"    st=SampleTime(1);\nend\nif(st>0)\n    [Ad, Bd, Cd, Dd, icd] = sldiscutil("
"'discstatespace', {st,method,Wc,A,B,C,D,ic});\nend\nsldiscutil('initssmask', "
"st);\nif(st==0)\nset_param([gcb '/State Space'], 'AbsoluteTolerance', AbsTol)"
";\nend"
		    MaskDisplay		    "text( 0.5, 0.65, 'x'' = Ax+Bu', '"
"horizontalAlignment', 'center');\ntext( 0.5, 0.4, 'y = Cx+Du', 'horizontalAli"
"gnment', 'center');\ntext( 0.5, 1.0, method, 'verticalAlignment', 'top')"
		    MaskSelfModifiable	    on
		    MaskIconFrame	    on
		    MaskIconOpaque	    on
		    MaskIconRotate	    "port"
		    MaskIconUnits	    "normalized"
		    MaskValueString	    "ssobsctrl_r.a|ssobsctrl_r.b|ssobs"
"ctrl_r.c|ssobsctrl_r.d|0|auto|dt|zoh|1"
		    System {
		    Name		    "Observer-\nController"
		    Location		    [81, 369, 373, 516]
		    Open		    off
		    ModelBrowserVisibility  off
		    ModelBrowserWidth	    200
		    ScreenColor		    "white"
		    PaperOrientation	    "landscape"
		    PaperPositionMode	    "auto"
		    PaperType		    "usletter"
		    PaperUnits		    "inches"
		    ZoomFactor		    "100"
		    Block {
		    BlockType		    Inport
		    Name		    "In1"
		    Position		    [25, 68, 55, 82]
		    }
		    Block {
		    BlockType		    DiscreteStateSpace
		    Name		    "Discrete State-Space"
		    Position		    [85, 52, 200, 98]
		    A			    "Ad"
		    B			    "Bd"
		    C			    "Cd"
		    D			    "Dd"
		    X0			    "icd"
		    SampleTime		    "SampleTime"
		    }
		    Block {
		    BlockType		    Outport
		    Name		    "Out1"
		    Position		    [240, 68, 270, 82]
		    }
		    Line {
		    SrcBlock		    "In1"
		    SrcPort		    1
		    DstBlock		    "Discrete State-Space"
		    DstPort		    1
		    }
		    Line {
		    SrcBlock		    "Discrete State-Space"
		    SrcPort		    1
		    DstBlock		    "Out1"
		    DstPort		    1
		    }
		    }
		    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -