**TI92**Group file dated 05/13/00, 10:48d 05acst fiacst fi)acstplot05bodelot7bodemimo Jdiracmo:Jexit_icogJfile_icoJft_icooJggraphoShelpho`int_mat aintracst mio_icot8mmwrkspc{nyquistramp_ico!readmeo בrlocuso7rtrnsyssimsys\sssysstep_icoɴtfp_ico2wind_ico_wrk_icowrkspc zpkpcZ'acst\oldfoldoldfold press F5 or ESC to go [HOME]-zfeedbackwmax_wmaxwmin_wminmodebakgdbbaktmp_cmdsub_resfindeqcomdmodebakweb: http://web92.interfree.it/-zUploads, new version, more commands etc.-ze-mail:troiani@infinito.it-z[italiano or english]-zfor help, comments, etc. send me e-mail-zAutomatic Control Systems Toolbox-zThank you used:-zgdbbak7exitp0***** exit program *****tbar/ http://web92.interfree.it-btroiani@infinito.it-bby troiani gianluca-b=================================-b > TI-92: readme.92t -b > PC: readme.txt -bfull note of licence:-bCopyright (C) 2000 G.Luca Troiani-bSystems Toolbox v.1.0-bAutomatic Control -babout0*** about ***tbar/// da definirehelphelp_c0***** HELP ******tbar/[z% ERROR IN GGRAPH MODULE EXECUTION %-zggraphgraphw0*** graphw ***tbar/% error in -sys_name def %-z$ executed $-zgains_vwrkspcrlocusgains_vgains_v % error in -sys_name def %-z$ executed $-zg_maxg_minwrkspcrlocusg_maxg_maxg_ming_min-gains_v;ana_rlo/  a vector of gains-b or-b gain min and gaim max-b you must set-bbool_aux-gains_v;-g_max-g_minbool_auxtbar/no systems stored in workspace-z[:tbar/Z: gains_vgains vector-Cor-bg_maxgain max-Cg_mingain min-Cor-b-bwrkspcsystem name-Lroot locus analysis-bZ-gains_v-g_max-g_minana_rlo0*****tbar/% error in -sys_name def %-z$ executed $-zw_maxw_minwrkspcnyquistw_maxw_maxw_minw_mintbar/-w_max-w_min:ana_nyq/ greater than 0 (zero)-b min must be -bw_min;tbar/no systems stored in workspace-z[:tbar/Z: w_max max-Cw_min min-Cwrkspcsystem name-Lnyquist diagram analysis-bZ-w_max-w_minana_nyq0*****tbar/% error in -sys_name def %-z$ executed $-zw_maxw_minwrkspcbodew_maxw_maxw_minw_mintbar/-w_max-w_min:ana_bod/ greater than 0 (zero)-b min must be -bw_min;tbar/no systems stored in workspace-z[:tbar/Z: w_max max-Cw_min min-Cwrkspcsystem name-Lbode diagrams analysis-bZ-w_max-w_minana_bod0*** analysis ***tbar/% error in -sys_name def %-z -zadd-newsys_mwrkspcnewsys_znewsys_:-z -zsys2_wrkspcsys1_wrkspcfeedbacknewsys_tbar/no systems stored in workspace-z[:tbar/% Insert a name for the system %-b-newsys_;tbar/Z: newsys_new system name-Csys2_wrkspcsys2 name:-Lsys1_wrkspcsys1 name:-L +<-[sys2]<-+-b | |-b->*->[sys1]->+->-bnew system:-bfeedback connection of 2 MIMO systems-bfeedback connection-VZdefault-newsys_-sys2_-sys1_sys1sys1sys2Տsys2sys1feedbackچfeed_sys0************tbar/% error in -sys_name def %-z -zadd-newsys_mwrkspcnewsys_znewsys_:-z -zsys1_wrkspcsys2_wrkspcnewsys_tbar/no systems stored in workspace-z[:tbar/% Insert a name for the system %-b-newsys_;tbar/Z: newsys_new system name-Csys2_wrkspcsys2 name-Lsys1_wrkspcsys1 name-L +-[sys2]-+-b-| |--b +-[sys1]-+-bnew system:-bparallel of two MIMO systems-bparallel connction-VZdefault-newsys_-sys2_-sys1_par_sys0************tbar/% error in -sys_name def %-z -zadd-newsys_mwrkspcnewsys_znewsys_:-z -zsys1_wrkspcsys2_wrkspcnewsys_tbar/no systems stored in workspace-z[:tbar/% Insert a name for the system %-b-newsys_;tbar/Z: newsys_new system name-Csys2_wrkspcsys2 name-Lsys1_wrkspcsys1 name-L --[-[sys1]--[sys2]--]--bnew system:-bseries of two MIMO systems-bseries connection-VZdefault-newsys_-sys2_-sys1_ser_sys0************tbar/% error in -sys_name def %-z -zadd-sys_namemwrkspcsys_namezsys_name:-z -z sssys_name -;    tbar/Z: sys_namesys name-CD (opt)-C C-C B-C A-C y=Cx+Du-b dx/dt=Ax+Bu-bstate space model:-bZ-sys_name-[]- []- []- sys_ss0************tbar/% error in -sys_name def %-z -zadd-sys_namemwrkspcsys_namezsys_name:-z -zgain_p_vz_vzpksys_namegain_gain_p_vp_vz_vz_v (z_v[]-z_v-z_v;tbar/Z: sys_namesys name-Cgain_gain-Cp_vvector of poles-Cz_vvector of zeros-C-----------------------------------bzeros-poles-gains model:-bZ-sys_name-gain_[]-p_v[]-z_vsys_zpk0************tbar/% error in -sys_name def %-z -zadd-sys_namemwrkspcsys_namezsys_name:-z -zdennumtfsys_namedendennumnumtbar/Z: sys_namesys name-Cden-Cvector of denominator coefficients:-bnum-Cvector of numerator coefficients:-b------------------------------------bfor descending powers of s-bcoefficients must be ordered-btransfer function model:-bZ[]-sys_name-den[]-numsys_tf0************tbar/f_s% error in -sys_name def %-z -zf_sadd-sys_namemwrkspcsys_namezsys_name:-z -zf_ssys_namef_sf_stbar/Z: sys_namesys name-Cf_sF(s)-Cinput F(s)-VZsys_fs0*** input ***************tbar/reset--mwrkspcrwrk0tbar/print_all--mwrkspcswrk0tbar/print_one--mwrkspcswrkone0tbar/exp_wrk--mwrkspcexp_wrk0tbar/imp_wrk--mwrkspcimp_wrk0tbar/exp_sys--mwrkspcexp_sys0tbar/imp_sys--mwrkspcimp_sys0tbar/del--mwrkspcdel_sys0************tbar/simsyssimulink0************tbar/exitpquit-Wexit_icoVaboutabout...-Whelp_chelp-W[?]-Vgraphwwind_icoVsimulinksimulation tools-Wana_rloroot locus plot-Wana_nyqnyquist diagram-Wana_bodbode diagrams-Wanalysis-Vfeed_sysfeedback-Wpar_sysparallel-Wser_sysseries -Wsys_ssstate-space model (ss)-Wsys_zpkzero-pole-gain model (zpk)-Wsys_tftransfer function (tf)-Wsys_fsF(s)-Wsystem model-Vrwrkreset work-space-Wdel_sysdelete one system-Wexp_sysexport system-Wexp_wrkexport work-space-Wimp_wrkimport work-space-Wimp_sysimport system-Wswrkoneshow single system-Wswrkshow work-space-Wwrk_icoVtbar0-zacstw0*** toolbar ***@ ACST - MAIN WINDOW-z* use toolbar to input commands *-zCopyright (C) 2000 G.Luca Troiani-zAutomatic Control Systems Toolbox v.1.0-zQintracst^Off-grid-Off-Axes-{T***** intro ***************reset--mwrkspcNONE-wrkspc :gdbbak8AUTO-Exact/Approx-Full-Split Screen-ALL- modebakacst oldfoldbool_aux}newsys_sys2_sys1_w_maxw_min}z_vsys_namep_vnumgains_v}gain_g_ming_maxden } ================================= e-mail: troiani@infinito.it http://web92.interfree.it/ INFO, BUGS, COMMENTS, ...: --------------------------------- Date: xx/xx/2000 for: ee-problems, control sistems PROGRAM: --------------------------------- City: Roma Nat.: Italia Name: Gianluca Troiani AUTOR: ================================= instructions: helpdesk.html file ************************************* in license.txt file (Version 2, June 1991) can be found GNU GENERAL PUBLIC LICENSE +-----------------------------------+| > TI-92: readme.92t || > PC: readme.txt || full note of licence: || Copyright (C) 2000 G.Luca Troiani || Automatic Control Systems Toolbox |+-----------------------------------+H k() Prgm +-----------------------------------+ | acstplot (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local mode_,xc1,yc1,str_t,stp_t getMode("all")mode_ setMode("Graph","FUNCTION") FnOff Define u(xx)=when(xx0,0,1) Define (xx)=0 5xres y_out|t=xy1(x) u_t|t=xy2(x) setGraph("graph order","simul") Style 1,"thick" try ZoomFit else disp "% FATAL ERROR DURING SIMULATION %" if errornum=960 disp "% error in ilaplace module %" goto exit_ endtry Goto tbar Lbl gr_ ZoomSto:ZoomRcl Lbl tbar ToolBar Title file_ico Item "save scope on a PIC file",save_pic Item "load a scope from a PIC file",load_pic Title "Zoom" Item "ZoomBox",z_box Item "ZoomIn",z_in Item "ZoomOut",z_out Item "ZoomPrev",z_prev Item "ZoomSto",z_sto Item "ZoomRcl",z_rcl Title "Scope...",scope_ Title "ReGraph",gr_ Title "Items" Item "Trace",trace_ Item "Get point",get_p Item "Get x,y",get_ Title exit_ico,exit_ EndTBar Goto tbar Lbl trace_ Trace Goto tbar Lbl get_p Trace Text "point=("&string(xc)&","&string(yc)&")" Goto tbar Lbl get_ Trace: xcxc1:ycyc1 Trace Text "x="&string(xc-xc1)&" y="&string(yc-yc1) Goto tbar Lbl save_pic 0ok Dialog Title "Save Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try StoPic #nomeaux Text nomeaux&" saved" Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tbar Lbl load_pic 0ok Dialog Title "Load Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try RclPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry ******* Goto tbar Lbl z_box:ZoomBox:Goto tbar Lbl z_in:ZoomIn:Goto tbar Lbl z_out:ZoomOut:Goto tbar Lbl z_prev:ZoomPrev:Goto tbar Lbl z_sto:ZoomSto:Goto tbar Lbl z_rcl:ZoomRcl:Goto tbar ******* Lbl scope_ "off"g_op string(ymin)y_min:string(ymax)y_max string(xscl)x_sc:string(yscl)y_sc string(xmin)str_t:string(xmax)stp_t 0ok Dialog Title "Scope settings" Request "Grid on/off",g_op Request "x grid step",x_sc Request "y grid step",y_sc Request "start time",str_t Request "stop time",stp_t Request "ymin",y_min Request "ymax",y_max EndDlog If ok=0: Goto tbar Try If g_op="on":setGraph("grid","on") If g_op="off":setGraph("grid","off") expr(x_sc)xscl expr(y_sc)yscl expr(str_t)xmin expr(stp_t)xmax expr(y_min)ymin expr(y_max)ymax Else Text "% input error %" EndTry Goto gr_ Lbl exit_ setMode(mode_) DelVar u,y1,y2,g_op,x_sc,y_sc,y_min,y_max, Disp "" Disp "$ simulation executed $" Disp "" EndPrgm (sys_,wint_) Prgm +-----------------------------------+ | bode (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local sys_type,sys_tmp wint_[1]wmin:wint_[2]wmax getType(sys_)sys_type If sys_type="MAT" Then bodemimo(sys_,wmin,wmax) Return Else [[sys_]]sys_tmp bodemimo(sys_tmp,wmin,wmax) Return EndIf DelVar sys_tmp EndPrgm 9(sys_,wmin,wmax) Prgm +-----------------------------------+ | bodemimo (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local modebak,gdbbak,i,j,wmin_txt,wmax_txt,plottype,f,npol0,dfaux,faux,u_,yu,ytype,in_n,out_n,sys_type,nomeaux,boolz Local ymin_,ymax_,wt,w0 getMode("ALL")modebak StoGDB gdbbak ***** preset *********** setMode("Exponential Format","Normal") setMode("Graph","Function") setMode("Angle","Degree") setMode("Exact/Approx","Auto") setGraph("Axes","Off") setMode("Display Digits","Float3") FnOff ClrDraw 1plottype:falseboolz 1i 2xres "mimo"sys_type 0npol0 log(wmin)xmin log(wmax)xmax xminxmin_ xmin-abs(xmax-xmin)*1.5/(8.3)xmin PxlOff 1,1 If dim(sys_)[1]=1 and dim(sys_)[2]=1 Then "siso"sys_type 1in_n:1out_n Goto skip_ EndIf Lbl in_out 1plottype If sys_type="siso" Then Dialog Text "SISO system" Text "no input or output to set" EndDlog Goto tbar EndIf Lbl mimo_set 0ok Dialog Text "MIMO system select:" Title "select input# & output#" DropDown "imput select ",seq("input "&string(i),i,1,dim(sys_)[2]),in_n DropDown "output select ",seq("output "&string(i),i,1,dim(sys_)[1]),out_n EndDlog If ok=0 Then Dialog Title "!ERROR!" Text "MIMO system: you must select" Text "input and output" EndDlog Goto mimo_set EndIf Lbl skip_ sys_[out_n,in_n]f PxlText "working...",5,5 expr("Define y1(x)=when(xxmin_,"&string(20*log(abs(f|s=*10^x)))&",undef)") calc. # pol. in 0 Loop f*s^npol0faux getDenom(faux)dfaux If (dfaux|s=0)=0 Then npol0+1npol0 Else Exit EndIf EndLoop # pol. in 0 calculated expr("Define y2(x)=when(xxmin_,"&string(90*npol0+angle(faux|s=*10^x))&",undef)") FnOff Style 1,"Thick":Style 2,"Thick" Goto start ***** toolbar ************* Lbl tbar ToolBar Title file_ico Item "Save Pic",save_pic Item "Load Pic",load_pic Title "|F|,F" Item "GAIN plot",gplot Item "PHASE plot",pplot Title io_ico,in_out Title "ReGraph",start Title "Items" Item "Get point",get_p Item "Get x,y",get_ Item "set ymin & ymax",wy Item "window's dims",wdim Title exit_ico,toexit EndTBar Goto tbar **** trace the semilog grid **** Lbl tracegrd If plottype=1 Then 20yscl "dB"u_ Else 45yscl ""u_ EndIf If boolz=false Then Try ZoomFit Else yscl+ymaxymax yscl+yminymin ClrErr EndTry EndIf For i,xmin_,xmax,1 For j,10^i,10*10^i,10^i LineVert log(j) EndFor PtText string(10^i*1.),i,(ymax-ymin)/10+ymin EndFor For i,ymin-yscl,ymax+yscl,yscl LineHorz int(i/yscl)*yscl EndFor For i,ymin-yscl,ymax+yscl,yscl Line xmin,int(i/yscl)*yscl,xmin_,int(i/yscl)*yscl,0 PtText string(int(i/yscl)*yscl)&u_,xmin,int(i/yscl)*yscl EndFor If plottype=1 Then PtText "|F(s)|20dB/div",xmin+(xmax-xmin)/(1.7),ymax Else PtText "F(s) 45deg/dec",xmin+(xmax-xmin)/(1.7),ymax EndIf falseboolz Goto tbar ***** plot type set ************* Lbl gplot FnOff 1plottype Goto start Lbl pplot FnOff 2plottype Goto start **** plots ************* Lbl start FnOff FnOn plottype Goto tracegrd ***** save/load pic ************ Lbl save_pic 0ok Dialog Title "Save Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try StoPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tbar Lbl load_pic 0ok Dialog Title "Load Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try RclPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tbar ***** items Lbl get_p Trace Text "point=("&string(10^xc)&"rad/s,"&string(yc)&u_&")" Goto tbar Lbl get_ Trace: xcxc1:ycyc1 Trace Text "x="&string(10^xc-10^xc1)&"rad/s y="&string(yc-yc1)&u_ Goto tbar Lbl wy trueboolz Local ymin_,ymax_ string(ymin)ymin_ string(ymax)ymax_ Dialog Title "Setting window's dims" Request "ymin",ymin_ Request "ymax",ymax_ EndDlog expr(ymin_)ymin:expr(ymax_)ymax Try:ZoomSto:ZoomRcl:Else:Goto tbar EndTry Goto tracegrd Lbl wdim Dialog Text "min="&string(wmin)&" rad/s" Text "max="&string(wmax)&" rad/s" Text "ymin="&string(ymin)&" "&u_ Text "ymax="&string(ymax)&" "&u_ Text string(xscl) EndDlog Goto tbar ***** exit program ************ Lbl toexit FnOff setMode(modebak) RclGDB gdbbak DelVar xmin_ EndPrgm %1HBd2DJD1( %?(@$@"@"D"O"_"O&D"@"@ L%P PP P P P O@OOO/% %:*vLDtDDDFlIJ() Prgm +-----------------------------------+ | ggraph (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* ZoomSto 0xmin:0ymin:238xmax:102ymax Lbl tbar Local nomeaux,tex,orig_,und_,modebak Local xc1,yc1 getMode("ALL")modebak ToolBar Title file_ico Item "Save Pic",save_pic Item "Load Pic",load_pic Title "tools" Item "vertical",v_line Item "horizontal",h_line Item "point to point line",pp_line Item "text",add_text Item "undo last",undo_ Item "undo all",ori_ Title exit_ico,toexit EndTBar Goto tbar ***** draw Lbl add_text StoPic und_ 0ok Dialog Title "add text" Text "type text to add" Request "text",tex EndDlog If ok=0: Goto tbar Input PtText tex,xc,yc Goto tbar Lbl v_line StoPic und_ Input LineVert xc Goto tbar Lbl h_line StoPic und_ Input LineHorz yc Goto tbar Lbl pp_line StoPic und_ Input xcxc1:ycyc1 Input PxlLine 102-yc1,xc1,102-yc,xc Goto tbar Lbl ori_ ClrDraw RclPic orig_ Goto tbar Lbl undo_ ClrDraw RclPic und_ Goto tbar ***** save/load pic ************ Lbl save_pic 0ok Dialog Title "Save Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try StoPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tbar Lbl load_pic 0ok Dialog Title "Load Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tbar Try RclPic #nomeaux CopyVar #nomeaux,orig_ CopyVar #nomeaux,und_ Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tbar ***** exit program ************ Lbl toexit 0ok Dialog Text "save image?" Text "[ENTER] [ESC]" Text " save don't save" EndDlog If ok=1:Goto save_pic FnOff setMode(modebak) Disp "$ executed $" EndPrgm  () Prgm +-----------------------------------+ | acstplot (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local key ClrIO Disp "ACST: on-line help" Disp "----------------------------------------" Disp "" Disp "This help is only an overview of ACST" Disp "For more help use HTML Help Desk" Disp "to start help desk: acsthelp.html" Disp "" Disp "press [ENTER] to go help index" Pause Lbl l_0 main index ClrIO Disp "ACST - help" Disp "----------------------------------------" Disp "1:work-space" Disp "2:input systems" Disp "3:analysis (Bode, Nyquist, Root locus" Disp "4:simulation of systems" Disp "5:graphical tools" Disp "-----------------------------0 to exit--" Loop getKey()-48key If key0 and key5 Exit EndLoop If key=0:Goto exit_ If key=1:Goto l_1 If key=2:Goto l_2 If key=3:Goto l_3 If key=4:Goto l_4 If key=5:Goto l_5 Lbl l_1 ClrIO Disp "--work-space help-----------------------" Disp "workspace is a data variable where are" Disp "stored all the systems you have defined" Disp "You can: - print" Disp " - import/export" Disp " - delete" Disp "one system or the all work space" Disp "---press [ENTER] to go help index-------" Pause : Goto l_0 Lbl l_2 ClrIO Disp "--input systems-------------------------" Disp "Sys. are defined by the transfer funcion" Disp "You can define system with:" Disp "*F(s): simply input F(s)" Disp "*tf: you must input row vectors listing" Disp "the numerator and denominator" Disp "coefficients in descending powers of s" Pause "--press [enter] to continue-----------":ClrIO Disp "*zpk: you must input row vector of zeros" Disp "([] if system don't have zeros), row" Disp "vector of poles and the gain" Disp "*ss: you must input the matrix of the" Disp "state space description (SISO/MIMO)" Disp "*connection: you can create a system" Disp "connecting existing systems" Disp "---press [ENTER] to go help index-------" Pause : Goto l_0 Lbl l_3 ClrIO Disp "---analysis-----------------------------" Disp "*Bode diagrams: you must set the input" Disp "and the frequency (rad/s) range" Disp "*Nyquist plot:you must set the input and" Disp "the frequency (rad/s) range" Disp "*Root locus plot: you must set the input" Disp "and the gain range or a row vector of ":Disp "specific gains" Disp "---press [ENTER] to go help index-------" Pause : Goto l_0 Lbl l_4 ClrIO Disp "---simulation---------------------------" Disp "Version 1.0: only SISO systems:" Disp " [source]-->[system]-->[scope]" Disp "To simulate a system:" Disp " 1. Set source " Disp " 2. Set simulation parameter +2" Disp " 3. Start simulation +1" Disp "---press [ENTER] to go help index-------" Pause : Goto l_0 Lbl l_5 ClrIO Disp "---graphical tools----------------------" Disp "pressing in the main window" Disp "you start the graphical tools:" Disp "- load and save PIC files" Disp "- add labels and lines" Disp "- undo last/all " Disp "" Disp "---press [ENTER] to go help index-------" Pause : Goto l_0 Lbl exit_ ClrIO:Disp Disp "----------------------------------------" Disp "use help desk for more help: " Disp "acsthelp.html file" Disp "----------------------------------------" Disp "@ ACST - MAIN WINDOW " EndPrgmVAauxRauxՀauxaux} f @ !H"!@xdyrH"@##G @"DQ"@ H$A"@ @"DQ"G#Ȓ$"G @"DQ"A$H$"H !"D!r"!$H$Q"H x!y#ȑG @ @@p??A@ ?@ @ p@@'|~'0(H@( AA 00!@0A ! "a A #"""? A'&&" A@A#&&"&A!!&&"HA'A &&!@'A D&& 'A8&& |~'A0???!?!?!x!0O!> @P!A``B! @B @@B!Ha B?FFA!H $ NN@!>I$ NNH !H  NN@!Ha FN@!P @NB!A @P @NA!>@ D0 x @????Ǎ TI-92: readme.92t || > PC: readme.txt || full note of licence: || Copyright (C) 2000 G.Luca Troiani || mwrkspc (module for ACST prog.) |+-----------------------------------+mode_sys_name]3(sys_,wint_) Prgm +-----------------------------------+ | nyquist (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local tmin_,tmax_,mode_bkp,gdb_bkp,sys_t,sys_type,in_n,out_n,gdb_bkpp,abs_sys,wt,w0,m,mg getMode("all")mode_bkp StoGDB gdb_bkp setMode("Exact/Approx","APPROXIMATE") setMode("Angle","DEGREE") setMode("Graph","PARAMETRIC") setMode("Exponential Format","NORMAL") setMode("Display Digits","FLOAT 3") setGraph("axes","on") StoGDB gdb_bkpp ClrGraph ClrDraw ZoomStd Try wint_[1]wmin_ wint_[2]wmax_ getType(sys_)sys_type If sys_type="MAT" Then sys_sys_t Else [[sys_]]sys_t EndIf "mimo"sys_type log(wmin_)tmin log(wmax_)tmax 0.001tstep (tmax-tmin)/50tstep PxlOff 1,1 If dim(sys_t)[1]=1 and dim(sys_t)[2]=1 Then "siso"sys_type 1in_n:1out_n Goto skip_ EndIf Lbl in_out If sys_type="siso" Then Dialog Text "SISO system" Text "no input or output to set" EndDlog Goto t_bar EndIf 0ok Loop Dialog Text "MIMO system select:" Title "select input# vs output#" DropDown "imput select ",seq("input "&string(i),i,1,dim(sys_t)[2]),in_n DropDown "output select ",seq("output "&string(i),i,1,dim(sys_t)[1]),out_n EndDlog If ok=1: Exit EndLoop Lbl skip_ sys_t[out_n,in_n]sys_tmp {1}x_ {0}y_ NewPlot 1,1,x_,y_,,,,2 expr("define xt1(t)=real(sys_tmp|s=*10^t)") expr("define yt1(t)=imag(sys_tmp|s=*10^t)") 1.2xt2(t): 0yt2(t) Style 1,"thick" Lbl start Try ZoomFit Circle 0,0,1 Else 1.2xmin 0xmax 10ymin 10ymax Circle 0,0,1 EndTry Lbl t_bar ToolBar Title file_ico Item "Save Pic",save_pic Item "Load Pic",load_pic Title "Zoom" Item "ZoomSqr",z_sqr Item "ZoomBox",z_box Item "ZoomIn",z_in Item "ZoomOut",z_out Item "ZoomPrev",z_prev Item "ZoomSto",z_sto Item "ZoomRcl",z_rcl Title io_ico,in_out Title "info" Item "(t,m)(0,mg)",info_ Item "trace",trace_ Title "ReGraph",start Title exit_ico,to_exit EndTBar Goto t_bar ***** save/load pic ************ Lbl save_pic 0ok Dialog Title "Save Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto t_bar Try StoPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto t_bar Lbl load_pic 0ok Dialog Title "Load Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto t_bar Try RclPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto t_bar ***** zoom ********** Lbl z_sqr ZoomSqr:Circle 0,0,1 Goto t_bar Lbl z_box ZoomBox:Circle 0,0,1 Goto t_bar Lbl z_in ZoomIn:Circle 0,0,1 Goto t_bar Lbl z_out ZoomOut:Circle 0,0,1 Goto t_bar Lbl z_prev ZoomPrev:Circle 0,0,1 Goto t_bar Lbl z_sto ZoomSto Goto t_bar Lbl z_rcl ZoomRcl:Circle 0,0,1 Goto t_bar ***** info **** Lbl trace_:Trace Dialog Text "="&string(10^tc) Text "Re{F(j)}="&string(xc)&" Im{F(j)}="&string(yc) Text "|F(j)|="&string(RPr(xc,yc))&" F(j)="&string(RP(xc,yc)) EndDlog Goto t_bar Lbl info_ ClrIO Disp "Nyquist Analysis:" Disp "system:" Disp sys_tmp Disp "("&string(10^tmin)&","&string(10^tmax)&") rad/s" expr("define abs_sys(t)=abs(sys_tmp|s=*10^t)") zeros(abs_sys(t)-1,t)|ttmin and ttmaxwt If wt={} Then Disp "t is not in the ("&string(10^tmin)&","&string(10^tmax)&")" Else wt[1]wt 180+RP(xt1(wt),yt1(wt))m EndIf Disp "t="&string(10^wt)&" phase margin="&string(m)&"" zeros(yt1(t),t)|ttmin and ttmaxw0 If w0={} Then Disp "0 is not in the ("&string(10^tmin)&","&string(10^tmax)&") rad/s" Else w0[1]w0 20*log(1/(abs(xt1(w0))))mg Disp "0="&string(10^w0)&" gain margin="&string(mg)&" dB" EndIf Pause "[ENTER] to return Nyquist plot" Circle 0,0,1 Goto t_bar ***** exit program ************ Else If errornum490 Then Disp "% FATAL ERROR OCCURRED %" Disp "% NYQUIST ANALYSIS INTERRUPTED %" Disp "errornum"&string(errornum) Else EndIf EndTry Lbl to_exit RclGDB gdb_bkpp setMode(mode_bkp) RclGDB gdb_bkp PlotsOff DelVar sys_tmp,x_,y_,nomeaux EndPrgm O@% "Bʨ == README.TXT === ACST ============== Automatic Control System Toolbox Copyright (C) 2000 G.Luca Troiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Gianluca Troiani: troiani@infinito.it www: http://web92.interfree.it/ ====== LICENSE ====================== Full GNU GENERAL PUBLIC LICENSE Version 2, June 1991: license.txt file ===================================== ====== HELP ========================= help documentation: HELPDESK.HTML file =====================================oX(sys_,gain_s) Prgm +-----------------------------------+ | rlocus (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* Local mode_rlc,gdb_rlc getMode("ALL")mode_rlc StoGDB gdb_rlc setMode("Exact/Approx","Approximate") ClrGraph ClrDraw If getType(sys_)="MAT" Then If dim(sys_)={1,1} Then sys_[1,1]sys_ Else Disp "system must be a SISO sistem" Goto exit_lbl EndIf EndIf {}x_locus {}y_locus getNum(sys_)sys_num getDenom(sys_)sys_den sys_den+k_val*sys_numeqc_ If getType(gain_s)="LIST" Then If dim(gain_s)2 Then Disp "% Syntax Error:","Gains must be a row vector or","a list of two elements %" Return EndIf DispG "10"n_ Lbl set_res 0ok Dialog Title "SETTING RESOLUTION" Text "insert number of points" Request "for the plot",n_ Text "(press [ESC] to exit) " EndDlog If ok=0: Goto exit_lbl expr(n_)n_ (gain_s[2]-gain_s[1])/n_gain_stp newMat(1,n_)gain_v For k,1,n_ gain_s[1]+k*gain_stpgain_v[1,k] EndFor gain_vgain_s EndIf If getType(gain_s)"MAT" or dim(gain_s)[1]1 Then Disp "% Syntax Error: ","Gains must be a row vector or","a list of two elements %" Return EndIf PlotsOff real(cZeros(sys_num,s))x_zero imag(cZeros(sys_num,s))y_zero real(cZeros(eqc_|k_val=0,s))x_pol imag(cZeros(eqc_|k_val=0,s))y_pol (gain_max-gain_min)/(10.)gain_stp setGraph("Axes","OFF") PxlText "working... 0%",10,10 For k,1,dim(gain_s)[2] eqc_|k_val=gain_s[1,k]eqc_tmp augment(x_locus,real(cZeros(eqc_tmp,s)))x_locus augment(y_locus,imag(cZeros(eqc_tmp,s)))y_locus ClrDraw PxlText "working... "&string(k/(dim(gain_s)[2])*(100.))&"%",10,10 EndFor If dim(x_zero)0 Then min({min(x_locus),min(x_pol),min(x_zero)})xmin max({max(x_locus),max(x_pol),max(x_zero)})xmax min({min(y_locus),min(y_pol),min(y_zero)})ymin max({max(y_locus),max(y_pol),max(y_zero)})ymax Else min({min(x_locus),min(x_pol)})xmin max({max(x_locus),max(x_pol)})xmax min({min(y_locus),min(y_pol)})ymin max({max(y_locus),max(y_pol)})ymax EndIf If ymin=ymax Then ymax+1ymax ymin-1ymin EndIf If xmin=xmax Then xmax+1xmax xmin-1xmin EndIf (ymax-ymin)*0.1y (xmax-xmin)*0.1x ymin-yymin ymax+yymax xmin-xxmin xmax+xxmax Lbl start setGraph("Axes","ON") If dim(x_zero)0 Then NewPlot 1,1,x_zero,y_zero,,,,1 EndIf NewPlot 2,1,x_pol,y_pol,,,,2 NewPlot 3,1,x_locus,y_locus,,,,4 DispG Lbl tool_bar ToolBar Title file_ico Item "Save Pic",save_pic Item "Load Pic",load_pic Title "info" Item "show window's dims",show_dim Title "ReGraph",start Title "Zoom" Item "ZoomBox",z_box Item "ZoomIn",z_in Item "ZoomOut",z_out Item "ZoomPrev",z_prev Item "ZoomSto",z_sto Item "ZoomRcl",z_rcl Title exit_ico,exit_lbl EndTBar Goto tool_bar Lbl show_dim Dialog Title "WINDOW'S DIMENSIONS" Text "xmin="&string(xmin) Text "xmax="&string(xmax) Text "ymin="&string(ymin) Text "ymax="&string(ymax) EndDlog Goto tool_bar ***** save/load pic ************ Lbl save_pic 0ok Dialog Title "Save Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tool_bar Try StoPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tool_bar Lbl load_pic 0ok Dialog Title "Load Pic" Text "insert file name" Request "(max 8 char)",nomeaux EndDlog If ok=0: Goto tool_bar Try RclPic #nomeaux Else Dialog Text nomeaux&" is not a valid name" EndDlog ClrErr EndTry Goto tool_bar ******* Goto tool_bar Lbl z_box:ZoomBox:Goto tool_bar Lbl z_in:ZoomIn:Goto tool_bar Lbl z_out:ZoomOut:Goto tool_bar Lbl z_prev:ZoomPrev:Goto tool_bar Lbl z_sto:ZoomSto:Goto tool_bar Lbl z_rcl:ZoomRcl:Goto tool_bar ******* Lbl exit_lbl PlotsOff setMode(mode_rlc) RclGDB gdb_rlc DelVar eqc_,eqc_tmp,gain_max,gain_min,gain_stp,k,sys_den,sys_num,x_locus,y_locus,x_pol,y_pol,gain_v,x_zero,y_zero,x,y,n_ EndPrgm =p@wrkspcRsys_namewrkspcՇ: terrorsys_obj}sys_nameB*() Prgm +-----------------------------------+ | simsys (module for ACST prog.) | | Copyright (C) 2000 G.Luca Troiani | | full note of licence: | | > PC: readme.txt | | > TI-92: readme.92t | +-----------------------------------+ GNU GENERAL PUBLIC LICENSE (Version 2, June 1991) can be found in license.txt file ************************************* version 1.0 only for SISO systems Local sys_,mode_,gdb_,boolc DelVar u, getMode("all")mode_ StoGDB gdb_ setMode("Angle","RADIAN") setMode("Complex Format","Rectangular") ""w_txt:0c:"?"u_tdefault ClrIO Disp "----------------------------------------" Disp "@ ACST - Simulation Tools" Lbl tbar setGraph("axes","on") ToolBar Title wrk_ico Item "show work-space",swrk Item "show single system",swrkone Title "Sources" Item step_ico,u_step Item ramp_ico,u_ramp Item ft_ico,u_ft Item dirac,u_ Title "Simulation" Item "start",start Item "parameters",sim_par Title "[?]" Item "help",help_ Item "about...",about_ Title exit_ico,exit_ EndTBar Goto tbar ********* WORK SPACE ************ Lbl swrk:mwrkspc("","print_all"):Goto tbar Lbl swrkone: mwrkspc("","print_one") Goto tbar ************** SOURCES ************** Lbl u_step "1"tau:"0"i_a:"1"f_a: default 0ok Dialog Title "step" Text "Outputs a step" Request "start time",tau Request "initial amplitude",i_a Request "final amplitude",f_a EndDlog If ok=0: Goto tbar expr(i_a)+expr(f_a)*u(t-expr(tau))u_t Disp "Input signal: "&string(u_t) Goto tbar Lbl u_ramp "0"tau:"1"slope:"0"i_a 0ok Dialog Title "ramp" Text "outputs a ramp" Request "start time",tau Request "slope",slope Request "initial ampitude",i_a EndDlog If ok=0: Goto tbar expr(i_a)+expr(slope)*(t-expr(tau))u_t Disp "Input signal: "&string(u_t) Goto tbar Lbl u_ft "sin(t)"u_t 0ok Dialog Title "signal generator" Text "generic signal generator" Request "s(t)",u_t EndDlog If ok=0: Goto tbar expr(u_t)u_t Disp "Input signal: "&string(u_t) Goto tbar Lbl u_ 0ok Dialog Title "dirac" Text "Outputs a dirac impulse" Request "start time",tau EndDlog If ok=0: Goto tbar (t-expr(tau))u_t Disp "Input signal: "&string(u_t) Goto tbar ************* SIMULATION ************** Lbl sim_par "?"start_t:"?"stop_t:default Try 0ok Dialog Title "setting simulation parameter" DropDown "system to simulate",wrkspc[1],sys_ Request "start time (sec)",start_t Request "stop time (sec)",stop_t EndDlog If ok=0: Goto tbar Else If errornum=230 Disp "no systems stored in workspace" Goto tbar EndTry If start_t="?" or stop_t="?":Goto tbar expr(start_t)xmin expr(stop_t)xmax (xmax-xmin)/10xscl Disp "" Disp "Simulation parameter:" Disp " $ system name: "&(wrkspc[1])[sys_] Disp " $ system expr: " Disp expr((wrkspc[2])[sys_]) Disp " $ input signal: "&string(u_t) Disp " $ start time: "&start_t Disp " $ stop time: "&stop_t Goto tbar Lbl start Try u_t="?" or start_t="?" or stop_t="?"boolc If boolc: "" Else falseboolc EndTry If boolc Then Dialog Text "% incomplete data %" Text "you must define the system" Text "and the input" EndDlog Goto tbar EndIf Disp "Laplace transformations..." setFold(laplace) laplace(acst\u_t,t)acst\u_s setFold(acst) u_s*expr((wrkspc[2])[sys_])[1,1]w setFold(laplace) ilaplace(acst\w,s)acst\y_out setFold(acst) acstplot() Goto tbar *********** HELP & ABOUT ************** Lbl help_ Dialog Text "Version 1.0: only SISO systems:" Text " [source]-->[system]-->[scope]" Text "To simulate a system:" Text "1. Set source " Text "2. Set simulation parameter +2" Text "3. Start simulation +1" EndDlog Goto tbar Lbl about_ Dialog Text "ACST - Simulation Tools v.1.0" Text " by troiani gianluca" Text "troiani@infinito.it" Text "http://web92.interfree.it/" Text "-------------oOo-------------" Text "Laplace transformation by" Text " Lars Frederiksen" Text "e-mail: ask@post8.tele.dk)" EndDlog Goto tbar ****************** END ***************** Lbl exit_ ClrIO Disp "----------------------------------------" Disp "@ ACST - MAIN WINDOW " DelVar u_s,tau,i_a,f_a,slope,w_txt,w DelVar start_t,stop_t,c,u_t,y_out setMode(mode_) RclGDB gdb_ EndPrgm $8c_za_lqa_b_d_d_int_matd_NUM-d_ :p_q_d_d_NUM-d_ ㇄:b_lp_c_lq_c_int_matc_NUM-c_ :b_int_matb_NUM-b_ :a_int_mata_NUM-a_ :q_p_}d_c_b_a_b%$ߞanumdendendendenmdennumnumnummnumdennumܽ!%">`  W% p ߅ ݭk_num_den_)den_p_Սden_p_ltp_mp_(p_Պ;)num_z_Սnum_z_ltz_mz_(z_Պ;den_num_den_num_}k_p_z_ES