How do I add a function between two dynamic system (transfer function or state space model)?

1 view (last 30 days)
How do I add a function between two dynamic systems (transfer function or state space model)? Say,I have two dynamic systems, one is a transfer function A and the other is a state space model B. I wanna add another function f(x) between the two dynameic systems. I wanna put the output of system A in the f(x) to obtain f(A.output), and then give it to system B. Then the output is feedback to A and become a closed-loop system.
I have tried two ways as follows:
  1. I try to use "connect" to connect A, f(x), and B, and then use "lsim" to get the time response of the whole system, but I cannot make it with an error f(x) has not I/O names assigned. Does any one have some ideas on this issue?
  2. I try to apply "lsim" on A and get the output (response) and put in f(x). Then I put the output of f(x) to B using lsim (B, f(A.output),t) to get the response. However, the result is not correct.
Does any one have some ideas on this issue or have any other way to implement?
Thanks
  8 Comments
Paul
Paul on 28 Jan 2021
I'm intrigued about whatever application this might be with linear systems and complex signals. Aside from that, option 2 in a loop going one step at time mgiht be lead to a reasonable approximation. Simulink might be an option if you can somehow break out the real and imaginary parts of the signals.
Sunny
Sunny on 28 Jan 2021
Paul, thank you for your comments. I think the option 2 with going one step every time should be work, however, it has been worked out yet. I am still debugging it now and I l'll update it when I got someting new results. Thanks.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!