GeezerVison is showing github.com — control.matlab.freqresp is inconsistent with MATLAB · Issue #573 · python-control/python-control
control.matlab.freqresp is inconsistent with MATLAB #573
Description
As pointed out in issue #550, the freqresp function returns magnitude, phase, and frequency instead of the complex frequency response. This is OK for the main package (since you can just evaluate the system itself to get the complex frequency response), but it is inconsistent with MATLAB's freqresp function. At the least, control.matlab.freqresp should be consistent with MATLAB.
See discussion in PR #449 and issue #434.
Activity
changed the title
[-]control.matlab.freqresp is inconsistent with MATLAB[/-] [+]control.matlab.freqresp is missing in 0.9.0[/+] on Mar 16, 2021sawyerbfuller commented on Mar 16, 2021
Looking through the code, it looks like the freqresp function, which is in the lti module, gets imported correctly in the matlab module. (Am not at my computer so haven’t tested this yet). The sys.freqresp method, on the other hand, is deprecated in favor ofsys.frequency_response. So I think the problem might only be that it returns the results in the wrong form (mag and phase rather than complex).
murrayrm commented on Mar 16, 2021
Agh. I must have been looking at some different version. I think the problem is not that the function is missing, but that it is inconsistent with MATLAB. Re-editing title and description. Sorry for the confusion.
changed the title
[-]control.matlab.freqresp is missing in 0.9.0[/-] [+]control.matlab.freqresp is inconsistent with MATLAB[/+] on Mar 16, 2021JinmingChe commented on Mar 24, 2021
Hi, I update the control to version 0.9.0. LTI system can be callable. But I want to caculate the freqresp of a FRD system to get the complex frequency response. If there any solution?
murrayrm commented on Mar 24, 2021
Use H(omega*1j) or H.eval(omega) where H is an FRD function. If you want to evaluate at frequencies other than those that define the frequency response, you need to create a smooth FRD object (use frd(d, w, smooth=True)).
Metadata
Metadata
Development
No branches or pull requestsIssue actions