[R] unable to plot bode - phase with control package
fr1d_mail
|r1d_m@|| @end|ng |rom y@hoo@|r
Thu Oct 8 19:43:09 CEST 2020
thank you for the reply !
Le 08/10/2020 à 16:32, Jeff Newmiller a écrit :
> a) What is so difficult about the idea that this list is about R, not theory?
I don't need theory here, I just need the way specialist in R language
will solve this *coding* issue.
Regarding the theory I think I have some solid background.
> There do exist forums about control theory (e.g. engineering.stackexchange.com)
irrelevant if not implemented in R
> b) Using [-pi,+pi) is not "wrong"... it is numerically more precise,
I never assume it was "wrong"
asymptotic analysis will provide valuable knowledge for stability if you
reach phase information
why do you assume it is more precise ??
> though it may not convey what you would prefer to convey.
>
> c) The general case with poles and zeroes is more complicated than just adding the order of your system. Do a search on
>
> "winding number" "bode"
in my case for 'siso' it is enough, physical systems I study are not
exhibiting very complex behavior
> But if by inspection you think that shortcut will work for your system then do what you need to.
>
> d) If implementing a more general alternative solution is your itch, I am sure the maintainer of this _contributed package_ would welcome patches to add features.
not relevant as my level is R coding is low... sorry
Still looking for a *coding* solution to my issue...
Best,
Frédéric
>
>
> On October 8, 2020 12:08:19 AM PDT, fr1d_mail via R-help <r-help using r-project.org> wrote:
>> 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
>>
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list