The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Bode/Nyquist plot.....
05-13-2015, 11:03 AM
Post: #1
Bode/Nyquist plot.....
program is based on (Statistics 1Var)...the numerical values from this this code is valid but plots are temperamental. need help pls.
BODE(ƒ1,ƒ2,[num],[den])>>enter. example
BODE(-1,1,[1],[1 0.2 1])>>enter.
use VIEW key to select graphs.

Code:

Tf();
BODE();
VIEW "Start",START()
BEGIN
D1:={};
D2:={};
SetSample(H1,D1);
SetFreq(H1,D2);
H1Type:=4;
STARTVIEW(6,1);
WAIT();
STARTVIEW(-1,1);
END;

export BODE(Xmin,Xmax,num,den)
BEGIN
local num:=poly2symb(num,"*x");
local den:=poly2symb(den,"*x");
expand(num/den)▶F1;
Xtick:=0.01;
makelist(ALOG(X),X,Xmin,Xmax,Xtick)▶L1;
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;

VIEW "Nyquist",nyquist()
BEGIN
L5▶D2;
L4▶D1;
Xmin:= FLOOR(MIN(D1)+1);
Xmax:=CEILING(MAX(D1)+1);
Ymin:= FLOOR(MIN(D2)+1);
Ymax:= CEILING(MAX(D2)+1);
STARTVIEW(1,1);
END;

VIEW "Magnitude",Magnitude()
BEGIN
D1:=L1;
D2:=L7;
Xmin:= -1;
Xmax:= 1;
Ymin:= FLOOR(MIN(D2)+1);
Ymax:= CEILING(MAX(D2)+1);
STARTVIEW(1,1);
END;

VIEW "Phase",Phase()
BEGIN
D1:=L1;
D2:=L3;
Xmin:= -1;
Xmax:= 1;
Ymin:= FLOOR(MIN(D2)+1);
Ymax:= CEILING(MAX(D2)+1);
STARTVIEW(1,1);
END;

PLOT()
BEGIN
Xmin:= -1;
Xmax:= 1;
Ymin:= FLOOR(MIN(D2)+1);
Ymax:= CEILING(MAX(D2)+1);
STARTVIEW(1,1);
END;

Symb()
BEGIN
SetSample(H1,D1);
SetFreq(H1,D2);
H1Type:=4;
STARTVIEW(0,1);
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


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 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
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



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