Bode/Nyquist plot.....
05-16-2015, 10:51 PM (This post was last modified: 05-16-2015 10:55 PM by toshk.)
Post: #33
 toshk Member Posts: 195 Joined: Feb 2015
RE: Bode/Nyquist plot.....

Code:
 Tf(); Tfr(); Delay(); BODE(); Xmi,Xma,Xt; VIEW "Start/Info",START() BEGIN C1:={}; C2:={}; S1:={'C1','C2','1','13'}; STARTVIEW(6,1); WAIT(); STARTVIEW(-1,1); END; export BODE(Xmi,Xma,num,den) BEGIN local num:=poly2symb(num,"*x"); local den:=poly2symb(den,"*x"); expand(num/den)▶F1; makelist(X,X,1,1000,1)▶L9; L1:=ALOG(LOG(Xmi)+(L9-1)*(LOG(Xma)-LOG(Xmi))/1000); Statistics_2Var_Copy.Xmin:=(Xmi); Statistics_2Var_Copy.Xmax:=(Xma); L2:=Tf(L1); L7:=20*LOG(ABS(L2)); L3:=ARG(L2)*180/pi; L4:=IM(L2); L5:=RE(L2); END; EXPORT Tf(x) BEGIN L2:=(F1(X)|x=L1); END; EXPORT Tfr(x) BEGIN L0:=−x*L1*180/π; L8:=L3+L0; END; VIEW "Magnitude",Magnitude() BEGIN S1:={'C1','C2','1','13'}; C1:=LOG(L1); C2:=L7; Statistics_2Var_Copy.Xmin:=Statistics_2Var_Copy.Xmin; Statistics_2Var_Copy.Xmax:=Statistics_2Var_Copy.Xmax; Xtick:=1; Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1); Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1); Ytick:=10; END; VIEW "Phase",Phase() BEGIN C1:=LOG(L1); C2:=L3; Statistics_2Var_Copy.Xmin:=Statistics_2Var_Copy.Xmin; Statistics_2Var_Copy.Xmax:=Statistics_2Var_Copy.Xmax; Xtick:=1; Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1); Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1); Ytick:=5 END; VIEW "Nyquist",nyquist() BEGIN C1:=L5; L4▶C2; Statistics_2Var_Copy.Xmin:= FLOOR(MIN(C1)+1); Statistics_2Var_Copy.Xmax:= CEILING(MAX(C1)+1); Xtick:=.2; Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1); Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1); Ytick:=0.2; END; VIEW "Nichols",Nichols() BEGIN C1:=L3; C2:=L7; Statistics_2Var_Copy.Xmin:= FLOOR(MIN(C1)+1); Statistics_2Var_Copy.Xmax:= CEILING(MAX(C1)+1); Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1); Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1); Ytick:=10; END; VIEW "Reponse",Response() BEGIN INPUT(Xt); Tfr(Xt); C1:=LOG(L1); C2:=L8; Xmin:=Statistics_2Var_Copy.Xmin; Xmax:=Statistics_2Var_Copy.Xmax; Xtick:=1; Statistics_2Var_Copy.Ymin:= FLOOR(MIN(C2)+1); Statistics_2Var_Copy.Ymax:= CEILING(MAX(C2)+1); Ytick:=5 END; PLOT() BEGIN STARTVIEW(1,1); END;

Attached File(s) Thumbnail(s)

 « Next Oldest | Next Newest »

 Messages In This Thread Bode/Nyquist plot..... - toshk - 05-13-2015, 11:03 AM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 11:13 AM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 04:04 PM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 04:37 PM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 05:01 PM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 05:13 PM RE: Bode/Nyquist plot..... - Tim Wessman - 05-13-2015, 05:14 PM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 05:20 PM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 05:29 PM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 06:00 PM RE: Bode/Nyquist plot..... - Tim Wessman - 05-13-2015, 07:30 PM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 08:43 PM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 09:35 PM RE: Bode/Nyquist plot..... - toshk - 05-13-2015, 10:25 PM RE: Bode/Nyquist plot..... - salvomic - 05-13-2015, 10:34 PM RE: Bode/Nyquist plot..... - Tim Wessman - 05-13-2015, 10:37 PM RE: Bode/Nyquist plot..... - salvomic - 05-14-2015, 08:58 AM RE: Bode/Nyquist plot..... - alexzkter - 05-13-2015, 11:51 PM RE: Bode/Nyquist plot..... - Tim Wessman - 05-14-2015, 12:16 AM RE: Bode/Nyquist plot..... - toshk - 05-14-2015, 12:21 AM RE: Bode/Nyquist/Nichols plot.....Fully functional - toshk - 05-14-2015, 10:15 AM RE: Bode/Nyquist plot..... - alexzkter - 05-14-2015, 10:17 AM RE: Bode/Nyquist plot..... - toshk - 05-14-2015, 10:42 AM RE: Bode/Nyquist plot..... - alexzkter - 05-14-2015, 10:48 AM RE: Bode/Nyquist plot..... - toshk - 05-14-2015, 10:52 AM RE: Bode/Nyquist plot..... - alexzkter - 05-14-2015, 11:17 AM RE: Bode/Nyquist plot..... - toshk - 05-14-2015, 11:32 AM RE: Bode/Nyquist plot..... - alexzkter - 05-14-2015, 10:57 PM RE: Bode/Nyquist plot.....Fixed - toshk - 05-16-2015, 03:57 AM FOUND BUG COMPILING WITH DIGIT GROUPING - alexzkter - 05-16-2015, 09:41 AM RE: Bode/Nyquist plot..... - alexzkter - 05-16-2015, 10:53 AM RE: Bode/Nyquist plot..... - StephenG1CMZ - 10-10-2015, 10:25 PM RE: Bode/Nyquist plot..... - toshk - 05-16-2015, 03:56 PM RE: Bode/Nyquist plot..... - toshk - 05-16-2015 10:51 PM RE: Bode/Nyquist plot..... - toshk - 05-17-2015, 12:40 AM RE: Bode/Nyquist plot..... - don7 - 11-04-2016, 06:16 PM RE: Bode/Nyquist plot..... - toshk - 11-04-2016, 07:36 PM RE: Bode/Nyquist plot..... - don7 - 11-04-2016, 10:05 PM RE: Bode/Nyquist plot..... - toshk - 11-06-2016, 08:34 PM RE: Bode/Nyquist plot..... - hectometro00@gmail.com - 11-28-2016, 11:10 PM

User(s) browsing this thread: 1 Guest(s)