Matlab control theory basic understanding

8 views (last 30 days)
Hello everyone.
Iam just starting with Control theory and Matlab and have some problems understanding the concept of open and closed loop systems. As far as I have understood, open loop uses no feedback while closed loop does.
Now if I in example have a first order transfer function given as:
G = 10/(s+1)
From the transfer function I can see that my DC Gain is 10, meaning my final value will be 10 if my input is 1.
I assume that the DC Gain of my plant is constant and cannot be changed (like in the real World?).
If I now use feedback Control loop with a p controller:
Kp = 1;
G = 10/(s+1);
H = feeback(Kp*G,1);
step(H)
Now my step response is approximately 1 but not exactly because of the steady state error.
Now my question is, if I want my step response to be 10, like for the open loop system, how do I implement a reference? Is it just
step(10*H)
Thanks in advance,
regards,
Mike

Accepted Answer

Birdman
Birdman on 14 Nov 2017
step(10*H)
means adding a gain to the system by multiplying the denominator with 10.
If you want your step response to be 10, then use the following code:
response=(10/(10/11))*step(H);
When you type
response(end)
the result will be almost 10.
  2 Comments
MikeSv
MikeSv on 14 Nov 2017
Hi and thanks for the quick reply!
I thought there was a kind of "reference" input in Matlab so that I can use my controller K (which in my example is just a P controller) to track the reference.
/M
Birdman
Birdman on 14 Nov 2017
Edited: Birdman on 14 Nov 2017
Of course you can do that, but mostly step command is used for reference input from command line. If you go to Simulink, you may define several inputs from Sources library.
If the answer is useful, then accept it.

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!