State-space feedback system using simulink

4 Ansichten (letzte 30 Tage)
Sung-Wook Lee
Sung-Wook Lee am 29 Jun. 2020
Bearbeitet: Sung-Wook Lee am 29 Jun. 2020
So, I wanted to make a Simulink model for a closed-loop system using Matlab Function block to describe the plant in a state-space form.
I have further simplified the controller (from PID to P) from the original design because the y(output) is failing to track the reference at all, as you can see below.
And here is the code for the Matlab Function that inputs x and u and outputs xdot and y. (simplest linear model for the time being)
function [xdot,y] = fcn(x,u)
%xdot = [0;0];
xdot = [0 1; -1 0]*x + [ 0; 1]* u;
y = x(1);
end
It is very unclear to me what I have done wrong. Why 'error' isn't exactly the difference between the ouput and the reference is hard to understand because there is nothing special about the sum block: it just adds, substracts, simple. I have defined the dimension of x in the integral block, which is set as [2 1].
Any insights or help would very much be appreciated! Thank you.

Antworten (0)

Kategorien

Mehr zu Time and Frequency Domain Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by