HP PRIME -- How to plot a phase Bode plot ? - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP PRIME -- How to plot a phase Bode plot ? (/thread-254654.html) |
HP PRIME -- How to plot a phase Bode plot ? - dg1969 - 11-02-2013 Hi, I want to create a program that is able to plot a curve without phase discontinuities on +/- pi rad... So The use of the ARG() command is not enough ... The classic tricks that I use with GNUPLOT can not be used here ... Here is a description of what I'd like to get: - first ask for transfer function F(s)(with input command) F(s)= (1+10*s)^2/(1+s)^3 for example... - use the subst cmd to replace 's' by 'i*ALOG(X)' where X is the pulsation in rad/s. So I can plot for Xmin <LOG(X)< Xmax
- create the F1 var function ready to plot in Function APP... phase(X)=ARG(F(i*ALOG(X))+2k*PI The difficulty is to calculate k ... On Gnuplot I look continuously during plotting process at ARG(f(xold))-ARG(f(x)) and if a jump occurs I increment or decrement k according to the sign of the jump... Another idea is to use CAS command zero or solve and save all roots of arg(F(X))=+/-Pi in list L1 then create F1(X)=F1(X)+-2*PI*Heaviside(X-L1(n))in a loop for n=1 to size(L1)... I'm looking for advice and assistance for such a program... Thank you in advance if someone just spend a little time on this little problem ;o)
|