# $Revision: 1.1 $
Model {
  Name			  "narmamaglev"
  Version		  3.00
  SimParamPage		  "Solver"
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  ShowPortDataTypes	  off
  StartTime		  "0.0"
  StopTime		  "30"
  SolverMode		  "SingleTasking"
  Solver		  "ode45"
  RelTol		  "1e-3"
  AbsTol		  "1e-6"
  Refine		  "1"
  MaxStep		  "auto"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Matrix"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  IntegerOverflowMsg	  "warning"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  ConsistencyChecking	  "off"
  ZeroCross		  on
  SimulationMode	  "normal"
  TunableVars		  "prueba"
  TunableVarsStorageClass "Auto"
  BlockDataTips		  on
  BlockParametersDataTip  off
  BlockAttributesDataTip  off
  BlockPortWidthsDataTip  off
  BlockDescriptionStringDataTip	off
  BlockMaskParametersDataTip off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  BooleanDataType	  off
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_vc.tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "oneshot"
  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	  off
  Created		  "Fri Oct 16 21:07:47 1998"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "Administrator"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Sun Feb 27 19:03:08 2000"
  ModelVersionFormat	  "1.%<AutoIncrement:207>"
  ConfigurationManager	  "none"
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  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		    "narmamaglev"
    Location		    [139, 115, 900, 415]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [620, 45, 640, 65]
      DisplayTime	      off
      Decimation	      "10"
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info"
      Ports		      [0, 0, 0, 0, 0]
      Position		      [410, 225, 437, 250]
      DropShadow	      on
      ShowName		      off
      ShowPortLabels	      on
      MaskDisplay	      "disp('?')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info"
	Location		[617, 380, 965, 563]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Annotation {
	  Position		  [162, 22]
	  Text			  "This system simulates NARMA-L2 control\nof "
"a magnet suspended by an electromagnet."
	}
	Annotation {
	  Position		  [162, 67]
	  Text			  "Double-click on the NARMA-L2 Controller blo"
"ck\nto train the neural network controller and plant model."
	}
	Annotation {
	  Position		  [162, 122]
	  Text			  "For more information on what the controller"
" \ndoes, look under the mask of the NARMA-L2 \nController block."
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info2"
      Ports		      [0, 0, 0, 0, 0]
      Position		      [560, 220, 662, 271]
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "simcad(bdroot)"
      ShowPortLabels	      on
      MaskDisplay	      "disp('Double click\\nhere for\\nSimulink Help')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info2"
	Location		[128, 280, 487, 453]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "NARMA-L2 Controller"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [215, 25, 375, 160]
      BackgroundColor	      "cyan"
      DropShadow	      on
      NamePlacement	      "alternate"
      OpenFcn		      "nncontrolutil('nnident','',gcbh,gcb,'narma_l2')"
";"
      ShowPortLabels	      on
      MaskType		      "NARMA-L2 Controller"
      MaskDescription	      "NARMA-L2 Controller. You first train a neural n"
"etwork model of the plant to be controlled.  The controller is a rearrangemen"
"t of the trained plant model.  Double-click the NARMA-L2 Controller block to "
"begin the plant training."
      MaskPromptString	      "Sample time|S1|Ni|Nj|sim_file|Training function"
"|Use_Validation|Use_Testing|max_i|min_i|max_i_int|min_i_int|sam_training|epoc"
"hs|minp|maxp|mint|maxt|Normalize|IW1_1|IW3_2|IW5_3|LW2_1|LW4_3|LW5_4|LW6_5|LW"
"6_2|B1|B2|B3|B4|Limit_output|min_output|max_output|Use_Previous_Weights"
      MaskStyleString	      "edit,edit,edit,edit,edit,popup(trainbfg|trainbr"
" |traincgb|traincgf|traincgp|traingd|traingdm|traingda|traingdx|trainlm |trai"
"noss|trainrp |trainscg),edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edi"
"t,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,"
"edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskCallbackString      "||||||||||||||||||||||||||||||||||"
      MaskEnableString	      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVariables	      "Ts=@1;S1=@2;Ni=@3;Nj=@4;sim_file=&5;trainfun=@6"
";Use_validation=@7;Use_Testing=@8;max_i=@9;min_i=@10;max_i_int=@11;min_i_int="
"@12;sam_training=@13;epochs=@14;minp=@15;maxp=@16;mint=@17;maxt=@18;Normalize"
"=@19;IW1_1=@20;IW3_2=@21;IW5_3=@22;LW2_1=@23;LW4_3=@24;LW5_4=@25;LW6_5=@26;LW"
"6_2=@27;B1=@28;B2=@29;B3=@30;B4=@31;Limit_output=@32;min_output=@33;max_outpu"
"t=@34;Use_Previous_Weights=@35;"
      MaskInitialization      "xl = [0    .4   NaN  .33  .55   .55  .33  .33  "
"NaN .80  .92 .92];\nyl = [.95 .95 NaN  .75  .75   .55  .55  .75  NaN  .95 .95"
" .65];\nx2 = [0    .43 NaN .45 .45    NaN .92 1.2 NaN .63 .85 .85 .63 .63 ];"
"\ny2 = [.39 .39 NaN  .41 .55   NaN .65 .65 NaN .75 .75  .55  .55  .75];\nx3 ="
" [.45 .45 NaN .42 .45 .48  NaN .33 .4 .33];\ny3 = [.75 .90 NaN .83 .90 .83  N"
"aN  .98 .95 .92];\nx4 = [.75 .75 NaN .72 .75 .78  NaN  .5 .7 NaN .63 .7 .63];"
"\ny4 = [.75 .90 NaN .83 .90 .83  NaN .95 .95 NaN .98 .95 .92];\nx5 = [.43 .43"
" .77 .77 .43 NaN .36 .43 .36 NaN .75 .75];\ny5 = [.37 .41 .41 .37 .37 NaN .42"
" .39 .36 NaN .41 .55];\nx6 = [.92 .92 .77 NaN .84 .77 .84];\ny6 = [.65 .39 .3"
"9 NaN .42 .39 .36];\nx1t=.03; y1t=.31;\nx2t=.03; y2t=.85;\nx8t=.03;y8t=.21;\n"
"x3t=.77; y3t=.53;\nx4t=.77; y4t=.44;\nx5t=.34; y5t=.49;\nx6t=.58; y6t=.49;\n"
"\n\nt=(0:24)/24*2*pi;\nxs = .05*cos(t);\nys = .05*sin(t);\nxs1=xs+.45;\nys1=y"
"s+.95;\nxs2=xs+.75;\nys2=ys+.95;"
      MaskDisplay	      "plot([[xl NaN x2]*.9-.075 ], [[yl  NaN y2]*.9-."
"1 ]);\nplot([[x3 NaN xs1 NaN xs2]*.9-.075 ], [[y3 NaN ys1 NaN ys2]*.9-.1 ]);"
"\nplot([x4 NaN x5]*.9-.075,[y4 NaN y5]*.9-.1);\nplot([x6 NaN ]*.9-.075,[y6 Na"
"N ]*.9-.1);\ntext(x1t,y1t,'Plant');\ntext(x8t,y8t,'Output');\ntext(x2t,y2t,'R"
"eference');\ntext(x3t,y3t,'Control');\ntext(x4t,y4t,'Signal');\ntext(x5t,y5t,"
"'f');\ntext(x6t,y6t,'g');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "0.01|9|3|2|ballrepel0|trainlm |1|1|4|-1|1|0.1|1"
"0000|100|-0.98589809892637514|3.9504698574991721|-0.0016503994509919615|5.848"
"3552223055346|1|[2.8589406503354526 3.8571763260787164 2.4456184377322217 0.8"
"666607644547214;0.84908220491155217 -0.74479667271080674 0.17438611819566038 "
"-0.054598878873029347;-0.62709936825321444 -1.3691145688669635 -1.03543493213"
"63878 -2.2482593652050578;-0.61112872012274111 3.6328637614421511 -2.98192247"
"41551729 3.7430014139229799;8.2151216183173048 -0.34864518388745791 -0.638982"
"45756720395 3.2213765524683398;-0.62348046801820789 1.6654556537092802 -0.621"
"94271006861923 0.21912328150625099;0.14622178875562497 0.092672072012439946 -"
"2.0000544306046777 -1.7404534095664805;-0.016488785105071693 0.16978381724998"
"215 -0.084822329865259866 0.026867941830282197;1.9174811964991516 -1.69491959"
"23894798 0.35217636039029204 -0.12168945961699514]|[2.0947814145837365 4.1399"
"235297823935 0.45973664424051686 1.4201813933844121;-0.86879079197788289 -0.9"
"1114493693130993 -1.7736957440317072 -1.8251383343645129;-1.5220230282736409 "
"-1.9645557493380605 -0.13454356275803814 0.69198422228505774;1.10492075650723"
"56 1.1058960542907463 -1.644921307204396 -0.10202375847256849;1.7626417259934"
"55 0.12377706028660714 -0.7437018195796895 1.3293490471370206;1.3902743881456"
"05 1.2487181342609894 0.59892762333675664 1.8687582044711111;-1.2477149308688"
"809 -0.79236132307758722 0.36202987325836317 -2.3538403428029064;-1.795434452"
"809733 0.33077476751858431 1.195152886823688 -0.75536654530187719;1.595894492"
"3973373 -0.67233970442189994 2.0385698345589716 1.2983707063666041]|-0.861302"
"22828051506|[0.00015172623864271055 2.2013108252986395 -0.0004194379342446681"
"1 -0.0003479657571070474 -4.886121844237561e-005 0.048716164660783372 0.00018"
"521862399574861 4.7909859890519924 0.47215204119265081]|[1.1881559217746376 1"
".4377070715786655 -0.90278040876764909 -2.3370997753198059 -0.097223533841072"
"435 -0.63741922080667701 -2.7337228147947257 3.0132329690414466 2.17298689321"
"732]|0.599679883882549|0.00053164383570330738|1.015263173451765|[-2.050920521"
"9588469;-0.31031398693333401;-1.4045705779285507;0.015391387074643211;-3.2845"
"781323270051;1.1180253626502208;2.2612148765562523;-0.13759375641734173;1.101"
"0317884774456]|0.89897272661230299|[-1.002095836800059;-1.126799288887316;1.0"
"075534076876089;3.6052646447174865;-0.024716746631406297;1.2795222700572257;-"
"2.288460695586839;-3.073994760224549;1.7909749466641665]|0.8642380934413868|1"
"|0|Inf|1"
      Port {
	PortNumber		1
	Name			"Current"
	TestPoint		off
	RTWStorageClass		"Auto"
      }
      System {
	Name			"NARMA-L2 Controller"
	Location		[29, 153, 1020, 664]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "Reference"
	  Position		  [505, 45, 535, 65]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "Plant Output"
	  Position		  [30, 62, 60, 78]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [500, 265, 520, 285]
	  Value			  "B1"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [665, 275, 685, 295]
	  Value			  "B2"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [105, 255, 125, 275]
	  Value			  "Normalize"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  Position		  [125, 130, 145, 150]
	  Value			  "Normalize"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant5"
	  Position		  [500, 385, 520, 405]
	  Value			  "B3"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant6"
	  Position		  [665, 415, 685, 435]
	  Value			  "B4"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant7"
	  Position		  [635, 115, 655, 135]
	  Value			  "Normalize"
	}
	Block {
	  BlockType		  DiscreteStateSpace
	  Name			  "Discrete State-Space4"
	  Position		  [350, 201, 460, 239]
	  A			  "blkdiag([zeros(1,Nj-1);eye(Nj-2,Nj-2) zeros"
"(Nj-2,1)],[zeros(1,Ni-1);eye(Ni-2,Ni-2) zeros(Ni-2,1)])"
	  B			  "blkdiag(eye(Nj-1,1),eye(Ni-1,1))"
	  C			  "blkdiag([zeros(1,Nj-1);eye(Nj-1,Nj-1)],[zer"
"os(1,Ni-1);eye(Ni-2,Ni-1)])"
	  D			  "blkdiag([1;zeros(Nj-1,1)],[1;zeros(Ni-2,1)]"
")"
	  X0			  "0"
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [105, 205, 140, 235]
	  Expr			  "(u(1)-minp)*2/(maxp-minp) - 1"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [115, 55, 150, 85]
	  Expr			  "(u(1)-mint)*2/(maxt-mint) - 1"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn3"
	  Position		  [625, 40, 660, 70]
	  Expr			  "(u(1)-mint)*2/(maxt-mint) - 1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [490, 190, 520, 220]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "IW1_1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain1"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [495, 325, 525, 355]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "IW3_2"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain2"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [660, 200, 690, 230]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "LW2_1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain3"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [660, 340, 690, 370]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "LW4_3"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain5"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [815, 210, 845, 240]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "LW6_2"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Matrix\nGain8"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [840, 350, 870, 380]
	  SourceBlock		  "simulink3/Math/Matrix\nGain"
	  SourceType		  "Matrix Gain"
	  K			  "LW6_5*LW5_4*IW5_3"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [285, 193, 330, 242]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "signals"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [940, 207, 970, 238]
	  Inputs		  "*/"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation1"
	  Position		  [1020, 210, 1050, 240]
	  UpperLimit		  "max_i"
	  LowerLimit		  "min_i"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [875, 112, 905, 143]
	  IconShape		  "rectangular"
	  Inputs		  "+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [170, 255, 200, 285]
	  Threshold		  "0.5"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch1"
	  Position		  [180, 130, 210, 160]
	  Threshold		  "0.5"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch3"
	  Position		  [705, 100, 735, 130]
	  Threshold		  "0.5"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay4"
	  Position		  [230, 225, 260, 255]
	  X0			  "0"
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "Zero-Order\nHold"
	  Position		  [1085, 206, 1120, 244]
	  SampleTime		  "Ts"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "netsum"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [550, 194, 575, 236]
	  ShowPortLabels	  on
	  MaskDisplay		  "disp('+')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "netsum"
	    Location		    [322, 87, 822, 388]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "automatic"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [20, 50, 40, 70]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In2"
	      Position		      [20, 90, 40, 110]
	      Port		      "2"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "netsum"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [90, 59, 115, 101]
	      IconShape		      "rectangular"
	      Inputs		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [145, 80, 165, 100]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In2"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "netsum1"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [720, 205, 745, 240]
	  ShowPortLabels	  on
	  MaskDisplay		  "disp('+')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "netsum1"
	    Location		    [320, 85, 820, 386]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "automatic"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [20, 65, 40, 85]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In2"
	      Position		      [20, 105, 40, 125]
	      Port		      "2"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "netsum1"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [90, 60, 115, 95]
	      IconShape		      "rectangular"
	      Inputs		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [145, 80, 165, 100]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "netsum1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In2"
	      SrcPort		      1
	      DstBlock		      "netsum1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum1"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "netsum2"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [550, 334, 575, 376]
	  ShowPortLabels	  on
	  MaskDisplay		  "disp('+')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "netsum2"
	    Location		    [322, 87, 822, 388]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "automatic"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [20, 50, 40, 70]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In2"
	      Position		      [20, 90, 40, 110]
	      Port		      "2"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "netsum"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [90, 59, 115, 101]
	      IconShape		      "rectangular"
	      Inputs		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [145, 80, 165, 100]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In2"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "netsum3"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [720, 345, 745, 380]
	  ShowPortLabels	  on
	  MaskDisplay		  "disp('+')"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "netsum3"
	    Location		    [320, 85, 820, 386]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "automatic"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [20, 65, 40, 85]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In2"
	      Position		      [20, 105, 40, 125]
	      Port		      "2"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "netsum1"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [90, 60, 115, 95]
	      IconShape		      "rectangular"
	      Inputs		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [145, 80, 165, 100]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      DstBlock		      "netsum1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In2"
	      SrcPort		      1
	      DstBlock		      "netsum1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum1"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "purelin"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [770, 213, 795, 237]
	  ShowPortLabels	  on
	  MaskDisplay		  "plot([-1 1],[0 0],[-1 1],[-1 1])"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "purelin"
	    Location		    [146, 220, 406, 302]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "n"
	      Position		      [25, 33, 55, 47]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a"
	      Position		      [205, 33, 235, 47]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "n"
	      SrcPort		      1
	      DstBlock		      "a"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "purelin1"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [770, 353, 795, 377]
	  ShowPortLabels	  on
	  MaskDisplay		  "plot([-1 1],[0 0],[-1 1],[-1 1])"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "purelin1"
	    Location		    [144, 218, 404, 300]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "n"
	      Position		      [25, 33, 55, 47]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a"
	      Position		      [205, 33, 235, 47]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "n"
	      SrcPort		      1
	      DstBlock		      "a"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "tansig"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [600, 203, 625, 227]
	  ShowPortLabels	  on
	  MaskDisplay		  "plot([-1 1],[0 0],[-1 -.9 -.8 -.7 -.6 -.5 -"
".4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1],2./(1+exp(-8*[-1 -.9 -.8 -.7 -"
".6 -.5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1]))-1)"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "tansig"
	    Location		    [0, 38, 640, 480]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "n"
	      Position		      [25, 33, 55, 47]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Math
	      Name		      "Exp"
	      Ports		      [1, 1, 0, 0, 0]
	      Position		      [155, 25, 185, 55]
	      Operator		      "exp"
	      OutputSignalType	      "auto"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [90, 25, 120, 55]
	      Gain		      "-2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain1"
	      Position		      [370, 30, 400, 60]
	      Gain		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Math
	      Name		      "Reciprocal"
	      Ports		      [1, 1, 0, 0, 0]
	      Position		      [295, 30, 325, 60]
	      Operator		      "reciprocal"
	      OutputSignalType	      "auto"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [225, 27, 255, 58]
	      IconShape		      "rectangular"
	      Inputs		      "++"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum1"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [445, 27, 475, 58]
	      IconShape		      "rectangular"
	      Inputs		      "+-"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "one"
	      Position		      [160, 85, 180, 105]
	      Value		      "1"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "one1"
	      Position		      [375, 85, 395, 105]
	      Value		      "1"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a"
	      Position		      [515, 38, 545, 52]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "n"
	      SrcPort		      1
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      DstBlock		      "Exp"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Exp"
	      SrcPort		      1
	      Points		      [20, 0]
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "one"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Reciprocal"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Reciprocal"
	      SrcPort		      1
	      DstBlock		      "Gain1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain1"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Sum1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "one1"
	      SrcPort		      1
	      Points		      [30, 0]
	      DstBlock		      "Sum1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum1"
	      SrcPort		      1
	      DstBlock		      "a"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "tansig1"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [600, 343, 625, 367]
	  ShowPortLabels	  on
	  MaskDisplay		  "plot([-1 1],[0 0],[-1 -.9 -.8 -.7 -.6 -.5 -"
".4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1],2./(1+exp(-8*[-1 -.9 -.8 -.7 -"
".6 -.5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1]))-1)"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "tansig1"
	    Location		    [0, 38, 640, 480]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    AutoZoom		    on
	    Block {
	      BlockType		      Inport
	      Name		      "n"
	      Position		      [25, 33, 55, 47]
	      Port		      "1"
	      PortWidth		      "-1"
	      SampleTime	      "-1"
	      DataType		      "auto"
	      SignalType	      "auto"
	      Interpolate	      on
	    }
	    Block {
	      BlockType		      Math
	      Name		      "Exp"
	      Ports		      [1, 1, 0, 0, 0]
	      Position		      [155, 25, 185, 55]
	      Operator		      "exp"
	      OutputSignalType	      "auto"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [90, 25, 120, 55]
	      Gain		      "-2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain1"
	      Position		      [370, 30, 400, 60]
	      Gain		      "2"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Math
	      Name		      "Reciprocal"
	      Ports		      [1, 1, 0, 0, 0]
	      Position		      [295, 30, 325, 60]
	      Operator		      "reciprocal"
	      OutputSignalType	      "auto"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [225, 27, 255, 58]
	      IconShape		      "rectangular"
	      Inputs		      "++"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum1"
	      Ports		      [2, 1, 0, 0, 0]
	      Position		      [445, 27, 475, 58]
	      IconShape		      "rectangular"
	      Inputs		      "+-"
	      SaturateOnIntegerOverflow	on
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "one"
	      Position		      [160, 85, 180, 105]
	      Value		      "1"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "one1"
	      Position		      [375, 85, 395, 105]
	      Value		      "1"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a"
	      Position		      [515, 38, 545, 52]
	      Port		      "1"
	      OutputWhenDisabled      "held"
	      InitialOutput	      "[]"
	    }
	    Line {
	      SrcBlock		      "n"
	      SrcPort		      1
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      DstBlock		      "Exp"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Exp"
	      SrcPort		      1
	      Points		      [20, 0]
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "one"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Reciprocal"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Reciprocal"
	      SrcPort		      1
	      DstBlock		      "Gain1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain1"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Sum1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "one1"
	      SrcPort		      1
	      Points		      [30, 0]
	      DstBlock		      "Sum1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum1"
	      SrcPort		      1
	      DstBlock		      "a"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Control Signal"
	  Position		  [1180, 215, 1210, 235]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "Constant3"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Switch1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Switch1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Plant Output"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    DstBlock		    "Fcn1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 110; 75, 0]
	    DstBlock		    "Switch1"
	    DstPort		    3
	  }
	}
	Line {
	  SrcBlock		  "netsum1"
	  SrcPort		  1
	  DstBlock		  "purelin"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  Points		  [10, 0; 0, -55]
	  DstBlock		  "netsum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Matrix\nGain2"
	  SrcPort		  1
	  DstBlock		  "netsum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "netsum"
	  SrcPort		  1
	  DstBlock		  "tansig"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "netsum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "tansig"
	  SrcPort		  1
	  DstBlock		  "Matrix\nGain2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Matrix\nGain"
	  SrcPort		  1
	  DstBlock		  "netsum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "netsum3"
	  SrcPort		  1
	  DstBlock		  "purelin1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant6"
	  SrcPort		  1
	  Points		  [10, 0; 0, -55]
	  DstBlock		  "netsum3"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Matrix\nGain3"
	  SrcPort		  1
	  DstBlock		  "netsum3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "netsum2"
	  SrcPort		  1
	  DstBlock		  "tansig1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant5"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "netsum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "tansig1"
	  SrcPort		  1
	  DstBlock		  "Matrix\nGain3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Matrix\nGain1"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "netsum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "purelin"
	  SrcPort		  1
	  DstBlock		  "Matrix\nGain5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Matrix\nGain5"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  Points		  [10, 0; 0, 85]
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "purelin1"
	  SrcPort		  1
	  DstBlock		  "Matrix\nGain8"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Matrix\nGain8"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant7"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "Switch3"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn3"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Switch3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Reference"
	  SrcPort		  1
	  Points		  [60, 0]
	  Branch {
	    DstBlock		    "Fcn3"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 110; 90, 0]
	    DstBlock		    "Switch3"
	    DstPort		    3
	  }
	}
	Line {
	  SrcBlock		  "Switch3"
	  SrcPort		  1
	  Points		  [120, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Switch1"
	  SrcPort		  1
	  Points		  [45, 0; 0, 60]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "Discrete State-Space4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Discrete State-Space4"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Matrix\nGain"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 120]
	    DstBlock		    "Matrix\nGain1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Zero-Order\nHold"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Control Signal"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 250; -995, 0]
	    Branch {
	      Points		      [-55, 0]
	      DstBlock		      "Fcn"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, -195]
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	  }
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [0, 40]
	  DstBlock		  "Switch"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Switch"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Unit Delay4"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Switch"
	  SrcPort		  1
	  Points		  [0, -30]
	  DstBlock		  "Unit Delay4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Saturation1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Saturation1"
	  SrcPort		  1
	  DstBlock		  "Zero-Order\nHold"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Plant\n(Magnet Levitation)"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [435, 63, 550, 127]
      ShowPortLabels	      on
      MaskInitialization      "x1=[-2 -2 2 2 -2 NaN -2 -2 2 2 -2];\ny1=[5 4 4 "
"5 5 NaN 2 0 0 2 2];\nx2=[-2 -2 2 2 -2 NaN -2   2  NaN -2 2 NaN 2    4    NaN "
"2  4];\ny2=[4  3  3 4  4 NaN 1.5 1  NaN 1 .5 NaN 1.5 1.5 NaN .5 .5];\nx1t = -"
".5 ; y1t = 4.4;\nx2t = -.5; y2t = 3.4;\n"
      MaskDisplay	      "plot([-10],[0],[10],[5]);\nplot([x1 NaN x2],[y1"
" NaN y2]);\ntext(x1t,y1t,'N')\ntext(x2t,y2t,'S')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      Port {
	PortNumber		1
	Name			"Position"
	TestPoint		off
	RTWStorageClass		"Auto"
      }
      System {
	Name			"Plant\n(Magnet Levitation)"
	Location		[177, 189, 853, 455]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "Current"
	  Position		  [30, 93, 60, 107]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Product
	  Name			  "Division"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [195, 92, 225, 123]
	  Inputs		  "*/"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Division1"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [340, 52, 370, 83]
	  Inputs		  "/*"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Product
	  Name			  "Division2"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [350, 137, 380, 168]
	  Inputs		  "/*"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [250, 95, 280, 125]
	  Gain			  "15"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Constant
	  Name			  "Gravity"
	  Position		  [225, 160, 255, 190]
	  Value			  "9.8"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Position"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [540, 100, 570, 130]
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  ".5"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Square Law"
	  Position		  [105, 85, 165, 115]
	  Expr			  "u^2"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [3, 1, 0, 0, 0]
	  Position		  [405, 93, 430, 137]
	  ShowName		  off
	  IconShape		  "rectangular"
	  Inputs		  "|+--"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Velocity"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [470, 100, 500, 130]
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  "0"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Viscous Friction"
	  Position		  [440, 175, 470, 205]
	  Orientation		  "left"
	  Gain			  "12"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Constant
	  Name			  "mass"
	  Position		  [235, 35, 265, 65]
	  Value			  "3"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Output"
	  Position		  [620, 108, 650, 122]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "Square Law"
	  SrcPort		  1
	  DstBlock		  "Division"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Division"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gravity"
	  SrcPort		  1
	  Points		  [35, 0; 0, -55]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Velocity"
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    Points		    [0, 0]
	    DstBlock		    "Position"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 75]
	    DstBlock		    "Viscous Friction"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Velocity"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [40, 0]
	  DstBlock		  "Division1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Division1"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "mass"
	  SrcPort		  1
	  Points		  [40, 0]
	  Branch {
	    Points		    [15, 0]
	    DstBlock		    "Division1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 95]
	    DstBlock		    "Division2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Viscous Friction"
	  SrcPort		  1
	  Points		  [-110, 0; 0, -30]
	  DstBlock		  "Division2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Division2"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "Sum"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Current"
	  SrcPort		  1
	  DstBlock		  "Square Law"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Position"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    Points		    [0, 120; -405, 0]
	    DstBlock		    "Division"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Output"
	    DstPort		    1
	  }
	}
      }
    }
    Block {
      BlockType		      UniformRandomNumber
      Name		      "Random Reference"
      Position		      [45, 44, 75, 76]
      Minimum		      "0.5"
      Maximum		      "4"
      Seed		      "now*10e8"
      SampleTime	      "5"
    }
    Block {
      BlockType		      SubSystem
      Name		      "X(2Y)\n Graph"
      Ports		      [3, 0, 0, 0, 0]
      Position		      [685, 72, 720, 118]
      CopyFcn		      "sfunxy2([],[],[],'CopyBlock')"
      DeleteFcn		      "sfunxy2([],[],[],'DeleteBlock')"
      LoadFcn		      "sfunxy2([],[],[],'LoadBlock')"
      StartFcn		      "sfunxy2([],[],[],'Start')"
      StopFcn		      "sfunxy2([],[],[],'Stop')"
      NameChangeFcn	      "sfunxy2([],[],[],'NameChange')"
      ShowPortLabels	      on
      MaskType		      "X(2Y) scope."
      MaskDescription	      "X(2Y) scope using MATLAB graph window.  First i"
"nput is used as time base.  Enter plotting ranges."
      MaskHelp		      "This block can be used to explore limit cycles."
" Look at the m-file sfunxy.m to see how it works."
      MaskPromptString	      "x-min:|x-max:|y-min:|y-max:|Sample time:"
      MaskStyleString	      "edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskVariables	      "xmin=@1;xmax=@2;ymin=@3;ymax=@4;st=@5;"
      MaskDisplay	      "plot([.05 .95 .95 .05 .05],[.45 .45 .95 .95 .45"
"], 0.5+cos(0:0.1:2*pi)*0.3,0.7+sin(0:0.1:2*pi)*0.2)"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "0|5|-1|1|-1"
      System {
	Name			"X(2Y)\n Graph"
	Location		[82, 157, 342, 335]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  Inport
	  Name			  "x"
	  Position		  [25, 27, 55, 43]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "y1"
	  Position		  [25, 67, 55, 83]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Inport
	  Name			  "y2"
	  Position		  [25, 107, 55, 123]
	  Port			  "3"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	  DataType		  "auto"
	  SignalType		  "auto"
	  Interpolate		  on
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [3, 1, 0, 0, 0]
	  Position		  [105, 48, 135, 102]
	  ShowName		  off
	  Inputs		  "3"
	  DisplayOption		  "none"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "sfunxy"
	  Ports			  [1, 0, 0, 0, 0]
	  Position		  [175, 65, 225, 85]
	  ShowName		  off
	  FunctionName		  "sfunxy2"
	  Parameters		  "[xmin xmax ymin ymax], st"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
	Line {
	  SrcBlock		  "y2"
	  SrcPort		  1
	  Points		  [15, 0; 0, -20]
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "y1"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "x"
	  SrcPort		  1
	  Points		  [15, 0; 0, 20]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "sfunxy"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Clock"
      SrcPort		      1
      Points		      [15, 0; 0, 25]
      DstBlock		      "X(2Y)\n Graph"
      DstPort		      1
    }
    Line {
      Labels		      [1, 0]
      SrcBlock		      "Random Reference"
      SrcPort		      1
      Points		      [50, 0]
      Branch {
	Points			[0, 140; 530, 0; 0, -90]
	DstBlock		"X(2Y)\n Graph"
	DstPort			3
      }
      Branch {
	DstBlock		"NARMA-L2 Controller"
	DstPort			1
      }
    }
    Line {
      Name		      "Current"
      Labels		      [0, 0]
      SrcBlock		      "NARMA-L2 Controller"
      SrcPort		      1
      DstBlock		      "Plant\n(Magnet Levitation)"
      DstPort		      1
    }
    Line {
      Name		      "Position"
      Labels		      [0, 0]
      SrcBlock		      "Plant\n(Magnet Levitation)"
      SrcPort		      1
      Points		      [60, 0]
      Branch {
	Points			[0, 80; -445, 0; 0, -50]
	DstBlock		"NARMA-L2 Controller"
	DstPort			2
      }
      Branch {
	DstBlock		"X(2Y)\n Graph"
	DstPort			2
      }
    }
    Annotation {
      Position		      [198, 232]
      Text		      "NARMA-L2 Control of a Magnet Levitation System"
"\n(Double click on the \"?\" for more info)"
    }
    Annotation {
      Position		      [201, 277]
      Text		      "To start and stop the simulation, use the \"Sta"
"rt/Stop\"\nselection in the \"Simulation\" pull-down menu"
    }
  }
}
