Skip to content

frequency_response() returns incorrect response #878

Answered by roryyorke
NilsLG asked this question in Q&A
Discussion options

You must be logged in to vote

The frequency response is wrong due to numerical problems with the transfer function form. Transfer function form isn't good for high order systems, say order 10 or more. I can get the right result using state-space form, but it isn't quite as easy to construct the feedback loop as with TF form, since StateSpace doesn't support division.

Your feedback arrangement is unusual, but I've taken it at face value. The minreal calls aren't necessary, but made a difference when I had the wrong feedback form (feedback(H, P) instead of H * feedback(1, P)).

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import control

# Importing State-Space matrices and check if dimensions a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by murrayrm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #860 on March 26, 2023 17:22.