slcpp1.mdl

Package [view]: fuzzy.rar
Upload User: hnchenxi
Upload Date: 2008-11-02
Package Size: 1083k
Code Size: 25k
Category: AI-NN-PR
Development Platform: Matlab
  1. Model {
  2.   Name   "slcpp1"
  3.   Version   4.00
  4.   SampleTimeColors   off
  5.   LibraryLinkDisplay   "none"
  6.   WideLines   on
  7.   ShowLineDimensions   off
  8.   ShowPortDataTypes   off
  9.   RecordCoverage   off
  10.   CovPath   "/"
  11.   CovSaveName   "covdata"
  12.   CovNameIncrementing   off
  13.   CovHtmlReporting   on
  14.   BlockParametersDataTip  off
  15.   BlockDescriptionStringDataTip off
  16.   ToolBar   on
  17.   StatusBar   on
  18.   BrowserShowLibraryLinks off
  19.   BrowserLookUnderMasks   off
  20.   PreLoadFcn   "initcpp1"
  21.   CloseFcn   "AnimFigTitle = [winName, ': Cart & Parallel Poles A"
  22. "nimation']; AnimFigH = findobj(0,'Name',AnimFigTitle); close(AnimFigH)"
  23.   Created   "Wed Aug 09 17:53:45 2000"
  24.   Creator   "pascal"
  25.   UpdateHistory   "UpdateHistoryNever"
  26.   ModifiedByFormat   "%<Auto>"
  27.   LastModifiedBy   "pascal"
  28.   ModifiedDateFormat   "%<Auto>"
  29.   LastModifiedDate   "Wed Aug 09 17:54:35 2000"
  30.   ModelVersionFormat   "1.%<AutoIncrement:1>"
  31.   ConfigurationManager   "none"
  32.   DefaultBlockFontName   "Helvetica"
  33.   DefaultBlockFontSize   10
  34.   DefaultBlockFontWeight  "normal"
  35.   DefaultBlockFontAngle   "normal"
  36.   DefaultAnnotationFontName "Helvetica"
  37.   DefaultAnnotationFontSize 10
  38.   DefaultAnnotationFontWeight "normal"
  39.   DefaultAnnotationFontAngle "normal"
  40.   DefaultLineFontName   "Helvetica"
  41.   DefaultLineFontSize   9
  42.   DefaultLineFontWeight   "normal"
  43.   DefaultLineFontAngle   "normal"
  44.   SimParamPage   "Solver"
  45.   StartTime   "0.0"
  46.   StopTime   "250"
  47.   SolverMode   "SingleTasking"
  48.   Solver   "ode45"
  49.   RelTol   "1e-5"
  50.   AbsTol   "1e-6"
  51.   Refine   "1"
  52.   MaxStep   "0.1"
  53.   MinStep   "auto"
  54.   MaxNumMinSteps   "-1"
  55.   InitialStep   "auto"
  56.   FixedStep   "auto"
  57.   MaxOrder   5
  58.   OutputOption   "RefineOutputTimes"
  59.   OutputTimes   "[]"
  60.   LoadExternalInput   off
  61.   ExternalInput   "[t, u]"
  62.   SaveTime   off
  63.   TimeSaveName   "tout"
  64.   SaveState   off
  65.   StateSaveName   "xout"
  66.   SaveOutput   off
  67.   OutputSaveName   "yout"
  68.   LoadInitialState   off
  69.   InitialState   "xInitial"
  70.   SaveFinalState   off
  71.   FinalStateName   "xFinal"
  72.   SaveFormat   "Array"
  73.   LimitDataPoints   off
  74.   MaxDataPoints   "1000"
  75.   Decimation   "1"
  76.   AlgebraicLoopMsg   "warning"
  77.   MinStepSizeMsg   "warning"
  78.   UnconnectedInputMsg   "warning"
  79.   UnconnectedOutputMsg   "warning"
  80.   UnconnectedLineMsg   "warning"
  81.   InheritedTsInSrcMsg   "warning"
  82.   SingleTaskRateTransMsg  "none"
  83.   MultiTaskRateTransMsg   "error"
  84.   IntegerOverflowMsg   "warning"
  85.   CheckForMatrixSingularity "none"
  86.   UnnecessaryDatatypeConvMsg "none"
  87.   Int32ToFloatConvMsg   "warning"
  88.   SignalLabelMismatchMsg  "none"
  89.   LinearizationMsg   "none"
  90.   VectorMatrixConversionMsg "none"
  91.   SfunCompatibilityCheckMsg "none"
  92.   BlockPriorityViolationMsg "warning"
  93.   ArrayBoundsChecking   "none"
  94.   ConsistencyChecking   "none"
  95.   ZeroCross   on
  96.   Profile   off
  97.   SimulationMode   "normal"
  98.   RTWSystemTargetFile   "grt.tlc"
  99.   RTWInlineParameters   off
  100.   RTWRetainRTWFile   off
  101.   RTWTemplateMakefile   "grt_unix.tmf"
  102.   RTWMakeCommand   "make_rtw"
  103.   RTWGenerateCodeOnly   off
  104.   TLCProfiler   off
  105.   TLCDebug   off
  106.   TLCCoverage   off
  107.   AccelSystemTargetFile   "accel.tlc"
  108.   AccelTemplateMakefile   "accel_default_tmf"
  109.   AccelMakeCommand   "make_rtw"
  110.   ExtModeMexFile   "ext_comm"
  111.   ExtModeBatchMode   off
  112.   ExtModeTrigType   "manual"
  113.   ExtModeTrigMode   "oneshot"
  114.   ExtModeTrigPort   "1"
  115.   ExtModeTrigElement   "any"
  116.   ExtModeTrigDuration   1000
  117.   ExtModeTrigHoldOff   0
  118.   ExtModeTrigDelay   0
  119.   ExtModeTrigDirection   "rising"
  120.   ExtModeTrigLevel   0
  121.   ExtModeArchiveMode   "off"
  122.   ExtModeAutoIncOneShot   off
  123.   ExtModeIncDirWhenArm   off
  124.   ExtModeAddSuffixToVar   off
  125.   ExtModeWriteAllDataToWs off
  126.   ExtModeArmWhenConnect   on
  127.   ExtModeLogAll   on
  128.   OptimizeBlockIOStorage  on
  129.   BufferReuse   on
  130.   ParameterPooling   on
  131.   BlockReductionOpt   off
  132.   BooleanDataType   off
  133.   BlockDefaults {
  134.     Orientation     "right"
  135.     ForegroundColor     "black"
  136.     BackgroundColor     "white"
  137.     DropShadow     off
  138.     NamePlacement     "normal"
  139.     FontName     "Helvetica"
  140.     FontSize     10
  141.     FontWeight     "normal"
  142.     FontAngle     "normal"
  143.     ShowName     on
  144.   }
  145.   AnnotationDefaults {
  146.     HorizontalAlignment     "center"
  147.     VerticalAlignment     "middle"
  148.     ForegroundColor     "black"
  149.     BackgroundColor     "white"
  150.     DropShadow     off
  151.     FontName     "Helvetica"
  152.     FontSize     10
  153.     FontWeight     "normal"
  154.     FontAngle     "normal"
  155.   }
  156.   LineDefaults {
  157.     FontName     "Helvetica"
  158.     FontSize     9
  159.     FontWeight     "normal"
  160.     FontAngle     "normal"
  161.   }
  162.   System {
  163.     Name     "slcpp1"
  164.     Location     [341, 97, 924, 520]
  165.     Open     on
  166.     ModelBrowserVisibility  off
  167.     ModelBrowserWidth     200
  168.     ScreenColor     "white"
  169.     PaperOrientation     "landscape"
  170.     PaperPositionMode     "auto"
  171.     PaperType     "usletter"
  172.     PaperUnits     "inches"
  173.     ZoomFactor     "100"
  174.     AutoZoom     on
  175.     ReportName     "simulink-default.rpt"
  176.     Block {
  177.       BlockType       "S-Function"
  178.       Name       "Animation"
  179.       Ports       [1]
  180.       Position       [460, 37, 515, 73]
  181.       FunctionName       "animcpp1"
  182.       PortCounts       "[]"
  183.       SFunctionModules       "''"
  184.     }
  185.     Block {
  186.       BlockType       SubSystem
  187.       Name       "Cart & Parallel PolesnDynamics"
  188.       Ports       [2, 6]
  189.       Position       [270, 160, 330, 220]
  190.       ShowPortLabels       off
  191.       TreatAsAtomicUnit       off
  192.       RTWSystemCode       "Auto"
  193.       RTWFcnNameOpts       "Auto"
  194.       RTWFileNameOpts       "Auto"
  195.       MaskType       "Differential Equation Editor (DEE)"
  196.       MaskDescription       "Inverted Pendulum (cart & two poles)"
  197.       MaskPromptString       "Initial Conditions (a1, av1, a2, av2, x, v):|Ph"
  198. "ysical Specifications (M, g):"
  199.       MaskStyleString       "edit,edit"
  200.       MaskTunableValueString  "on,on"
  201.       MaskCallbackString      "|"
  202.       MaskEnableString       "on,on"
  203.       MaskVisibilityString    "on,on"
  204.       MaskToolTipString       "on,on"
  205.       MaskInitialization      "init_cond = @1; specs = @2;M=specs(1);g=specs(2"
  206. ");"
  207.       MaskDisplay       "plot(-4,-1,4,6,[0 3 2.8 -0.2 0]+0.5,[1 5 5.15 1"
  208. ".15 1],[0 0.2 -0.5 -0.7 0]-0.5, [1 1.2 2.7 2.5 1],[-1 -1 1 1 -1],[1 0 0 1 1],"
  209. "[-3.5 3.5],[0 0])"
  210.       MaskIconFrame       on
  211.       MaskIconOpaque       on
  212.       MaskIconRotate       "none"
  213.       MaskIconUnits       "autoscale"
  214.       MaskValueString       "[-0.07 0 0.1 0 0 0]|[1.0, 9.8]"
  215.       System {
  216. Name "Cart & Parallel PolesnDynamics"
  217. Location [341, 77, 1164, 858]
  218. Open off
  219. ModelBrowserVisibility off
  220. ModelBrowserWidth 200
  221. ScreenColor "white"
  222. PaperOrientation "landscape"
  223. PaperPositionMode "auto"
  224. PaperType "usletter"
  225. PaperUnits "inches"
  226. ZoomFactor "100"
  227. AutoZoom on
  228. Block {
  229.   BlockType   Inport
  230.   Name   "SysInport1"
  231.   Position   [275, 290, 295, 310]
  232.   Port   "1"
  233.   Interpolate   on
  234. }
  235. Block {
  236.   BlockType   Inport
  237.   Name   "in_2"
  238.   Position   [105, 390, 125, 410]
  239.   Port   "2"
  240.   Interpolate   on
  241. }
  242. Block {
  243.   BlockType   Gain
  244.   Name   "Gain"
  245.   Position   [160, 415, 195, 445]
  246.   Gain   "0.1"
  247.   Multiplication   "Element-wise(K.*u)"
  248.   SaturateOnIntegerOverflow on
  249. }
  250. Block {
  251.   BlockType   Gain
  252.   Name   "Gain1"
  253.   Position   [205, 385, 240, 415]
  254.   Gain   "0.5"
  255.   Multiplication   "Element-wise(K.*u)"
  256.   SaturateOnIntegerOverflow on
  257. }
  258. Block {
  259.   BlockType   Gain
  260.   Name   "Gain2"
  261.   Position   [160, 505, 195, 535]
  262.   Gain   "0.1"
  263.   Multiplication   "Element-wise(K.*u)"
  264.   SaturateOnIntegerOverflow on
  265. }
  266. Block {
  267.   BlockType   Gain
  268.   Name   "Gain3"
  269.   Position   [205, 475, 240, 505]
  270.   Gain   "0.5"
  271.   Multiplication   "Element-wise(K.*u)"
  272.   SaturateOnIntegerOverflow on
  273. }
  274. Block {
  275.   BlockType   Integrator
  276.   Name   "Integ1"
  277.   Ports   [1, 1]
  278.   Position   [605, 195, 635, 215]
  279.   ExternalReset   "none"
  280.   InitialConditionSource  "internal"
  281.   InitialCondition   "init_cond(1)"
  282.   LimitOutput   off
  283.   UpperSaturationLimit   "inf"
  284.   LowerSaturationLimit   "-inf"
  285.   ShowSaturationPort   off
  286.   ShowStatePort   off
  287.   AbsoluteTolerance   "auto"
  288. }
  289. Block {
  290.   BlockType   Integrator
  291.   Name   "Integ2"
  292.   Ports   [1, 1]
  293.   Position   [605, 245, 635, 265]
  294.   ExternalReset   "none"
  295.   InitialConditionSource  "internal"
  296.   InitialCondition   "init_cond(2)"
  297.   LimitOutput   off
  298.   UpperSaturationLimit   "inf"
  299.   LowerSaturationLimit   "-inf"
  300.   ShowSaturationPort   off
  301.   ShowStatePort   off
  302.   AbsoluteTolerance   "auto"
  303. }
  304. Block {
  305.   BlockType   Integrator
  306.   Name   "Integ3"
  307.   Ports   [1, 1]
  308.   Position   [605, 295, 635, 315]
  309.   ExternalReset   "none"
  310.   InitialConditionSource  "internal"
  311.   InitialCondition   "init_cond(3)"
  312.   LimitOutput   off
  313.   UpperSaturationLimit   "inf"
  314.   LowerSaturationLimit   "-inf"
  315.   ShowSaturationPort   off
  316.   ShowStatePort   off
  317.   AbsoluteTolerance   "auto"
  318. }
  319. Block {
  320.   BlockType   Integrator
  321.   Name   "Integ4"
  322.   Ports   [1, 1]
  323.   Position   [605, 370, 635, 390]
  324.   ExternalReset   "none"
  325.   InitialConditionSource  "internal"
  326.   InitialCondition   "init_cond(4)"
  327.   LimitOutput   off
  328.   UpperSaturationLimit   "inf"
  329.   LowerSaturationLimit   "-inf"
  330.   ShowSaturationPort   off
  331.   ShowStatePort   off
  332.   AbsoluteTolerance   "auto"
  333. }
  334. Block {
  335.   BlockType   Integrator
  336.   Name   "Integ5"
  337.   Ports   [1, 1]
  338.   Position   [605, 420, 635, 440]
  339.   ExternalReset   "none"
  340.   InitialConditionSource  "internal"
  341.   InitialCondition   "init_cond(5)"
  342.   LimitOutput   off
  343.   UpperSaturationLimit   "inf"
  344.   LowerSaturationLimit   "-inf"
  345.   ShowSaturationPort   off
  346.   ShowStatePort   off
  347.   AbsoluteTolerance   "auto"
  348. }
  349. Block {
  350.   BlockType   Integrator
  351.   Name   "Integ6"
  352.   Ports   [1, 1]
  353.   Position   [605, 470, 635, 490]
  354.   ExternalReset   "none"
  355.   InitialConditionSource  "internal"
  356.   InitialCondition   "init_cond(6)"
  357.   LimitOutput   off
  358.   UpperSaturationLimit   "inf"
  359.   LowerSaturationLimit   "-inf"
  360.   ShowSaturationPort   off
  361.   ShowStatePort   off
  362.   AbsoluteTolerance   "auto"
  363. }
  364. Block {
  365.   BlockType   Constant
  366.   Name   "Lengthnof pole 2"
  367.   Position   [95, 480, 115, 500]
  368.   Value   "1"
  369.   VectorParams1D   on
  370. }
  371. Block {
  372.   BlockType   Mux
  373.   Name   "SysMux"
  374.   Ports   [11, 1]
  375.   Position   [405, 294, 455, 356]
  376.   Inputs   "11"
  377.   DisplayOption   "none"
  378. }
  379. Block {
  380.   BlockType   Fcn
  381.   Name   "x1"
  382.   Position   [505, 195, 535, 215]
  383.   Expr   "u(3)                                       "
  384. "                                                                             "
  385. "                                                                             "
  386. "                                                                   "
  387. }
  388. Block {
  389.   BlockType   Fcn
  390.   Name   "x2"
  391.   Position   [505, 245, 535, 265]
  392.   Expr   "-3/4*(3*u(11)*cos(u(4))*g*sin(u(4))*cos(u(2"
  393. "))-4*u(11)*u(10)*sin(u(4))*u(5)^2*cos(u(2))+4*sin(u(2))*g*M+4*sin(u(2))*g*u(9"
  394. ")+4*sin(u(2))*g*u(11)-3*sin(u(2))*g*u(11)*cos(u(4))^2-4*u(1)*cos(u(2))-4*u(9)"
  395. "*u(8)*sin(u(2))*u(3)^2*cos(u(2)))/u(8)/(3*u(11)*cos(u(4))^2-4*u(9)-4*u(11)-4*"
  396. "M+3*u(9)*cos(u(2))^2)  "
  397. }
  398. Block {
  399.   BlockType   Fcn
  400.   Name   "x3"
  401.   Position   [505, 295, 535, 315]
  402.   Expr   "u(5)                                       "
  403. "                                                                             "
  404. "                                                                             "
  405. "                                                                   "
  406. }
  407. Block {
  408.   BlockType   Fcn
  409.   Name   "x4"
  410.   Position   [505, 370, 535, 390]
  411.   Expr   "-3/4*(4*g*sin(u(4))*u(9)+4*g*sin(u(4))*u(11"
  412. ")-4*u(11)*u(10)*sin(u(4))*u(5)^2*cos(u(4))+4*g*sin(u(4))*M-3*g*sin(u(4))*u(9)"
  413. "*cos(u(2))^2+3*cos(u(4))*cos(u(2))*sin(u(2))*g*u(9)-4*cos(u(4))*u(1)-4*cos(u("
  414. "4))*u(9)*u(8)*sin(u(2))*u(3)^2)/u(10)/(3*u(11)*cos(u(4))^2-4*u(9)-4*u(11)-4*M"
  415. "+3*u(9)*cos(u(2))^2)  "
  416. }
  417. Block {
  418.   BlockType   Fcn
  419.   Name   "x5"
  420.   Position   [505, 420, 535, 440]
  421.   Expr   "u(7)                                       "
  422. "                                                                             "
  423. "                                                                             "
  424. "                                                                   "
  425. }
  426. Block {
  427.   BlockType   Fcn
  428.   Name   "x6"
  429.   Position   [505, 470, 535, 490]
  430.   Expr   "(3*cos(u(2))*sin(u(2))*g*u(9)+3*u(11)*cos(u"
  431. "(4))*g*sin(u(4))-4*u(1)-4*u(9)*u(8)*sin(u(2))*u(3)^2-4*u(11)*u(10)*sin(u(4))*"
  432. "u(5)^2)/(3*u(11)*cos(u(4))^2-4*u(9)-4*u(11)-4*M+3*u(9)*cos(u(2))^2)          "
  433. "                                                                             "
  434. "               "
  435. }
  436. Block {
  437.   BlockType   Outport
  438.   Name   "Port1"
  439.   Position   [710, 195, 730, 215]
  440.   Port   "1"
  441.   OutputWhenDisabled   "held"
  442.   InitialOutput   "0"
  443. }
  444. Block {
  445.   BlockType   Outport
  446.   Name   "Port2"
  447.   Position   [710, 245, 730, 265]
  448.   Port   "2"
  449.   OutputWhenDisabled   "held"
  450.   InitialOutput   "0"
  451. }
  452. Block {
  453.   BlockType   Outport
  454.   Name   "Port3"
  455.   Position   [710, 295, 730, 315]
  456.   Port   "3"
  457.   OutputWhenDisabled   "held"
  458.   InitialOutput   "0"
  459. }
  460. Block {
  461.   BlockType   Outport
  462.   Name   "Port4"
  463.   Position   [710, 370, 730, 390]
  464.   Port   "4"
  465.   OutputWhenDisabled   "held"
  466.   InitialOutput   "0"
  467. }
  468. Block {
  469.   BlockType   Outport
  470.   Name   "Port5"
  471.   Position   [710, 420, 730, 440]
  472.   Port   "5"
  473.   OutputWhenDisabled   "held"
  474.   InitialOutput   "0"
  475. }
  476. Block {
  477.   BlockType   Outport
  478.   Name   "Port6"
  479.   Position   [710, 470, 730, 490]
  480.   Port   "6"
  481.   OutputWhenDisabled   "held"
  482.   InitialOutput   "0"
  483. }
  484. Line {
  485.   SrcBlock   "Integ6"
  486.   SrcPort   1
  487.   Points   [10, 0]
  488.   Branch {
  489.     DstBlock     "Port6"
  490.     DstPort     1
  491.   }
  492.   Branch {
  493.     Points     [0, -20; -265, 0; 0, -130]
  494.     DstBlock     "SysMux"
  495.     DstPort     7
  496.   }
  497. }
  498. Line {
  499.   SrcBlock   "Integ5"
  500.   SrcPort   1
  501.   Points   [10, 0]
  502.   Branch {
  503.     DstBlock     "Port5"
  504.     DstPort     1
  505.   }
  506.   Branch {
  507.     Points     [0, -20; -270, 0; 0, -85]
  508.     DstBlock     "SysMux"
  509.     DstPort     6
  510.   }
  511. }
  512. Line {
  513.   SrcBlock   "Integ4"
  514.   SrcPort   1
  515.   Points   [10, 0]
  516.   Branch {
  517.     DstBlock     "Port4"
  518.     DstPort     1
  519.   }
  520.   Branch {
  521.     Points     [0, -20; -275, 0; 0, -40]
  522.     DstBlock     "SysMux"
  523.     DstPort     5
  524.   }
  525. }
  526. Line {
  527.   SrcBlock   "Integ3"
  528.   SrcPort   1
  529.   Points   [10, 0]
  530.   Branch {
  531.     DstBlock     "Port3"
  532.     DstPort     1
  533.   }
  534.   Branch {
  535.     Points     [0, -20; -280, 0; 0, 30]
  536.     DstBlock     "SysMux"
  537.     DstPort     4
  538.   }
  539. }
  540. Line {
  541.   SrcBlock   "Integ2"
  542.   SrcPort   1
  543.   Points   [10, 0]
  544.   Branch {
  545.     DstBlock     "Port2"
  546.     DstPort     1
  547.   }
  548.   Branch {
  549.     Points     [0, -20; -275, 0; 0, 75]
  550.     DstBlock     "SysMux"
  551.     DstPort     3
  552.   }
  553. }
  554. Line {
  555.   SrcBlock   "Integ1"
  556.   SrcPort   1
  557.   Points   [10, 0]
  558.   Branch {
  559.     DstBlock     "Port1"
  560.     DstPort     1
  561.   }
  562.   Branch {
  563.     Points     [0, -20; -270, 0; 0, 120]
  564.     DstBlock     "SysMux"
  565.     DstPort     2
  566.   }
  567. }
  568. Line {
  569.   SrcBlock   "SysInport1"
  570.   SrcPort   1
  571.   DstBlock   "SysMux"
  572.   DstPort   1
  573. }
  574. Line {
  575.   SrcBlock   "x1"
  576.   SrcPort   1
  577.   DstBlock   "Integ1"
  578.   DstPort   1
  579. }
  580. Line {
  581.   SrcBlock   "x2"
  582.   SrcPort   1
  583.   DstBlock   "Integ2"
  584.   DstPort   1
  585. }
  586. Line {
  587.   SrcBlock   "x3"
  588.   SrcPort   1
  589.   DstBlock   "Integ3"
  590.   DstPort   1
  591. }
  592. Line {
  593.   SrcBlock   "x4"
  594.   SrcPort   1
  595.   DstBlock   "Integ4"
  596.   DstPort   1
  597. }
  598. Line {
  599.   SrcBlock   "SysMux"
  600.   SrcPort   1
  601.   Points   [15, 0]
  602.   Branch {
  603.     Points     [0, -120]
  604.     DstBlock     "x1"
  605.     DstPort     1
  606.   }
  607.   Branch {
  608.     Points     [0, -70]
  609.     DstBlock     "x2"
  610.     DstPort     1
  611.   }
  612.   Branch {
  613.     Points     [0, -20]
  614.     DstBlock     "x3"
  615.     DstPort     1
  616.   }
  617.   Branch {
  618.     Points     [0, 55]
  619.     DstBlock     "x4"
  620.     DstPort     1
  621.   }
  622.   Branch {
  623.     Points     [0, 105]
  624.     DstBlock     "x5"
  625.     DstPort     1
  626.   }
  627.   Branch {
  628.     Points     [0, 155]
  629.     DstBlock     "x6"
  630.     DstPort     1
  631.   }
  632. }
  633. Line {
  634.   SrcBlock   "x5"
  635.   SrcPort   1
  636.   DstBlock   "Integ5"
  637.   DstPort   1
  638. }
  639. Line {
  640.   SrcBlock   "x6"
  641.   SrcPort   1
  642.   DstBlock   "Integ6"
  643.   DstPort   1
  644. }
  645. Line {
  646.   SrcBlock   "Gain3"
  647.   SrcPort   1
  648.   Points   [70, 0]
  649.   DstBlock   "SysMux"
  650.   DstPort   10
  651. }
  652. Line {
  653.   SrcBlock   "Lengthnof pole 2"
  654.   SrcPort   1
  655.   Points   [25, 0]
  656.   Branch {
  657.     DstBlock     "Gain3"
  658.     DstPort     1
  659.   }
  660.   Branch {
  661.     DstBlock     "Gain2"
  662.     DstPort     1
  663.   }
  664. }
  665. Line {
  666.   SrcBlock   "Gain2"
  667.   SrcPort   1
  668.   Points   [115, 0]
  669.   DstBlock   "SysMux"
  670.   DstPort   11
  671. }
  672. Line {
  673.   SrcBlock   "Gain"
  674.   SrcPort   1
  675.   Points   [115, 0]
  676.   DstBlock   "SysMux"
  677.   DstPort   9
  678. }
  679. Line {
  680.   SrcBlock   "in_2"
  681.   SrcPort   1
  682.   Points   [15, 0]
  683.   Branch {
  684.     DstBlock     "Gain1"
  685.     DstPort     1
  686.   }
  687.   Branch {
  688.     DstBlock     "Gain"
  689.     DstPort     1
  690.   }
  691. }
  692. Line {
  693.   SrcBlock   "Gain1"
  694.   SrcPort   1
  695.   Points   [70, 0]
  696.   DstBlock   "SysMux"
  697.   DstPort   8
  698. }
  699. Annotation {
  700.   Position   [274, 469]
  701.   VerticalAlignment   "top"
  702.   Text   "half pole length2"
  703. }
  704. Annotation {
  705.   Position   [272, 527]
  706.   VerticalAlignment   "top"
  707.   Text   "pole mass2"
  708. }
  709. Annotation {
  710.   Position   [272, 437]
  711.   VerticalAlignment   "top"
  712.   Text   "pole mass1"
  713. }
  714. Annotation {
  715.   Position   [274, 379]
  716.   VerticalAlignment   "top"
  717.   Text   "half pole length1"
  718. }
  719.       }
  720.     }
  721.     Block {
  722.       BlockType       Clock
  723.       Name       "Clock"
  724.       Position       [55, 55, 75, 75]
  725.       DisplayTime       off
  726.       Decimation       "10"
  727.     }
  728.     Block {
  729.       BlockType       Constant
  730.       Name       "Constant"
  731.       Position       [96, 170, 114, 190]
  732.       Orientation       "up"
  733.       NamePlacement       "alternate"
  734.       Value       "1"
  735.       VectorParams1D       on
  736.       MaskIconFrame       on
  737.       MaskIconOpaque       on
  738.       MaskIconRotate       "none"
  739.       MaskIconUnits       "autoscale"
  740.     }
  741.     Block {
  742.       BlockType       SubSystem
  743.       Name       "Double clicknon this for demo.5"
  744.       Ports       []
  745.       Position       [40, 312, 181, 345]
  746.       DropShadow       on
  747.       ShowName       off
  748.       OpenFcn       "initcpp1"
  749.       ShowPortLabels       off
  750.       TreatAsAtomicUnit       off
  751.       RTWSystemCode       "Auto"
  752.       RTWFcnNameOpts       "Auto"
  753.       RTWFileNameOpts       "Auto"
  754.       MaskDisplay       "disp('Variable Initialization')"
  755.       MaskIconFrame       on
  756.       MaskIconOpaque       on
  757.       MaskIconRotate       "none"
  758.       MaskIconUnits       "autoscale"
  759.       System {
  760. Name "Double clicknon this for demo.5"
  761. Location [-10, 380, 117, 533]
  762. Open off
  763. ModelBrowserVisibility off
  764. ModelBrowserWidth 200
  765. ScreenColor "white"
  766. PaperOrientation "landscape"
  767. PaperPositionMode "auto"
  768. PaperType "usletter"
  769. PaperUnits "inches"
  770. ZoomFactor "100"
  771. AutoZoom on
  772.       }
  773.     }
  774.     Block {
  775.       BlockType       Fcn
  776.       Name       "Fcn"
  777.       Position       [105, 55, 145, 75]
  778.       Expr       "1-0.5*(pow(abs(cos(2*u[1])),0.3)*sgn(cos(2*u[1]"
  779. ")))"
  780.     }
  781.     Block {
  782.       BlockType       Reference
  783.       Name       "Fuzzy Logic nController"
  784.       Ports       [1, 1]
  785.       Position       [240, 310, 300, 360]
  786.       Orientation       "left"
  787.       FontName       "Arial"
  788.       SourceBlock       "fuzblock/Fuzzy Logic nController"
  789.       SourceType       "FIS"
  790.       fis       "fismat"
  791.     }
  792.     Block {
  793.       BlockType       Mux
  794.       Name       "Mux1"
  795.       Ports       [7, 1]
  796.       Position       [360, 298, 420, 372]
  797.       Orientation       "left"
  798.       Inputs       "7"
  799.       DisplayOption       "none"
  800.       MaskIconFrame       on
  801.       MaskIconOpaque       on
  802.       MaskIconRotate       "none"
  803.       MaskIconUnits       "autoscale"
  804.     }
  805.     Block {
  806.       BlockType       Mux
  807.       Name       "Mux2"
  808.       Ports       [6, 1]
  809.       Position       [371, 80, 439, 105]
  810.       Orientation       "up"
  811.       Inputs       "6"
  812.       DisplayOption       "none"
  813.       MaskIconFrame       on
  814.       MaskIconOpaque       on
  815.       MaskIconRotate       "none"
  816.       MaskIconUnits       "autoscale"
  817.     }
  818.     Block {
  819.       BlockType       Sum
  820.       Name       "Sum"
  821.       Ports       [2, 1]
  822.       Position       [465, 280, 485, 300]
  823.       Orientation       "down"
  824.       ShowName       off
  825.       IconShape       "rectangular"
  826.       Inputs       "+-"
  827.       SaturateOnIntegerOverflow on
  828.       MaskIconFrame       on
  829.       MaskIconOpaque       on
  830.       MaskIconRotate       "none"
  831.       MaskIconUnits       "autoscale"
  832.     }
  833.     Block {
  834.       BlockType       Switch
  835.       Name       "Switch"
  836.       Position       [155, 129, 180, 161]
  837.       Threshold       "0"
  838.     }
  839.     Block {
  840.       BlockType       SignalGenerator
  841.       Name       "Target Position"
  842.       Position       [30, 118, 75, 152]
  843.       WaveForm       "sine"
  844.       Amplitude       "1.500000"
  845.       Frequency       "0.350000"
  846.       Units       "rad/sec"
  847.       VectorParams1D       on
  848.     }
  849.     Block {
  850.       BlockType       Constant
  851.       Name       "Target Positionn(Mouse-Driven)"
  852.       Position       [117, 200, 143, 220]
  853.       Orientation       "up"
  854.       NamePlacement       "alternate"
  855.       Value       "1.3949"
  856.       VectorParams1D       on
  857.       MaskIconFrame       on
  858.       MaskIconOpaque       on
  859.       MaskIconRotate       "none"
  860.       MaskIconUnits       "autoscale"
  861.     }
  862.     Line {
  863.       SrcBlock       "Fcn"
  864.       SrcPort       1
  865.       Points       [95, 0; 0, 70]
  866.       Branch {
  867. Points [185, 0]
  868. Branch {
  869.   Points   [19, 0; 0, 230]
  870.   DstBlock   "Mux1"
  871.   DstPort   7
  872. }
  873. Branch {
  874.   DstBlock   "Mux2"
  875.   DstPort   6
  876. }
  877.       }
  878.       Branch {
  879. Points [0, 70]
  880. DstBlock "Cart & Parallel PolesnDynamics"
  881. DstPort 2
  882.       }
  883.     }
  884.     Line {
  885.       SrcBlock       "Fuzzy Logic nController"
  886.       SrcPort       1
  887.       Points       [-20, 0; 0, -160]
  888.       Branch {
  889. DstBlock "Cart & Parallel PolesnDynamics"
  890. DstPort 1
  891.       }
  892.       Branch {
  893. Points [0, -55]
  894. DstBlock "Mux2"
  895. DstPort 4
  896.       }
  897.     }
  898.     Line {
  899.       SrcBlock       "Clock"
  900.       SrcPort       1
  901.       DstBlock       "Fcn"
  902.       DstPort       1
  903.     }
  904.     Line {
  905.       SrcBlock       "Target Positionn(Mouse-Driven)"
  906.       SrcPort       1
  907.       Points       [0, -40]
  908.       DstBlock       "Switch"
  909.       DstPort       3
  910.     }
  911.     Line {
  912.       SrcBlock       "Constant"
  913.       SrcPort       1
  914.       Points       [0, -20]
  915.       DstBlock       "Switch"
  916.       DstPort       2
  917.     }
  918.     Line {
  919.       SrcBlock       "Target Position"
  920.       SrcPort       1
  921.       DstBlock       "Switch"
  922.       DstPort       1
  923.     }
  924.     Line {
  925.       SrcBlock       "Switch"
  926.       SrcPort       1
  927.       Points       [235, 0]
  928.       Branch {
  929. Points [60, 0]
  930. DstBlock "Sum"
  931. DstPort 2
  932.       }
  933.       Branch {
  934. DstBlock "Mux2"
  935. DstPort 5
  936.       }
  937.     }
  938.     Line {
  939.       SrcBlock       "Cart & Parallel PolesnDynamics"
  940.       SrcPort       5
  941.       Points       [65, 0]
  942.       Branch {
  943. Points [70, 0]
  944. DstBlock "Sum"
  945. DstPort 1
  946.       }
  947.       Branch {
  948. DstBlock "Mux2"
  949. DstPort 3
  950.       }
  951.     }
  952.     Line {
  953.       SrcBlock       "Sum"
  954.       SrcPort       1
  955.       Points       [0, 40]
  956.       DstBlock       "Mux1"
  957.       DstPort       5
  958.     }
  959.     Line {
  960.       SrcBlock       "Mux2"
  961.       SrcPort       1
  962.       Points       [0, -20]
  963.       DstBlock       "Animation"
  964.       DstPort       1
  965.     }
  966.     Line {
  967.       SrcBlock       "Cart & Parallel PolesnDynamics"
  968.       SrcPort       3
  969.       Points       [55, 0]
  970.       Branch {
  971. DstBlock "Mux2"
  972. DstPort 2
  973.       }
  974.       Branch {
  975. Points [110, 0; 0, 140]
  976. DstBlock "Mux1"
  977. DstPort 3
  978.       }
  979.     }
  980.     Line {
  981.       SrcBlock       "Cart & Parallel PolesnDynamics"
  982.       SrcPort       1
  983.       Points       [45, 0]
  984.       Branch {
  985. DstBlock "Mux2"
  986. DstPort 1
  987.       }
  988.       Branch {
  989. Points [140, 0; 0, 140]
  990. DstBlock "Mux1"
  991. DstPort 1
  992.       }
  993.     }
  994.     Line {
  995.       SrcBlock       "Cart & Parallel PolesnDynamics"
  996.       SrcPort       6
  997.       Points       [125, 0; 0, 140]
  998.       DstBlock       "Mux1"
  999.       DstPort       6
  1000.     }
  1001.     Line {
  1002.       SrcBlock       "Cart & Parallel PolesnDynamics"
  1003.       SrcPort       4
  1004.       Points       [155, 0; 0, 140]
  1005.       DstBlock       "Mux1"
  1006.       DstPort       4
  1007.     }
  1008.     Line {
  1009.       SrcBlock       "Cart & Parallel PolesnDynamics"
  1010.       SrcPort       2
  1011.       Points       [175, 0; 0, 140]
  1012.       DstBlock       "Mux1"
  1013.       DstPort       2
  1014.     }
  1015.     Line {
  1016.       SrcBlock       "Mux1"
  1017.       SrcPort       1
  1018.       DstBlock       "Fuzzy Logic nController"
  1019.       DstPort       1
  1020.     }
  1021.     Annotation {
  1022.       Position       [207, 47]
  1023.       VerticalAlignment       "top"
  1024.       Text       "Length of Pole 1"
  1025.     }
  1026.   }
  1027. }