[R] unable to plot bode - phase with control package
fr1d_mail
|r1d_m@|| @end|ng |rom y@hoo@|r
Thu Oct 8 09:08:19 CEST 2020
Dear All
I hope my question is relevant on this forum, else very sorry for the
disturbance
I want to simply plot a bode diagram of a siso model
using the 'bodeplot' command in the control package fail due to error in
'issiso' evaluation...
Error in if (issiso(sys)) {:
then I try by myself some retro-engineering :)
the problem is when I use
H <- freqresp(syst, w)
mag = 20*log10(abs(H))
phase <- atan2(Im(H), Re(H)) * 180/pi
if the order of the system is higher than 2 it is wrong (result will be
only between -pi / pi)
how to proceed ? for each evaluated point take a derivative and evaluate
the order to add the proper number of pi ?
Thanks for the help !
Best
Frédéric
More information about the R-help
mailing list