Reputation: 29
To create a MATLAB program that simulates the operation of the system at the step input (the graphs of v(t)
, e(t)
, u(t)
, and y(t)
are required).
I did not find any example, I do not know where to start and how to approach this requirement Some clues, please.
Upvotes: 0
Views: 50
Reputation: 4767
Here is a step response plot of a random system, where the period of the step is 0.5
seconds which is configured by the variable Step_End
inputted into the step()
function. I'll leave the computation of the respective transfer functions up to you. To find the closed-loop gain of a system you can employ the general form:
Where G_inner
is the gain along the path that is not a part of the loop. Furthermore when there is a gain along the feedback path you can adapt the equation's denominator as 1 + H_Process*G_inner
where H_Process
the gain along the feedback.
%Random numerator coefficients%
a = 4;
%Random denominator coefficients%
b = 1;
c = 2;
d = 10;
%Creating the transfer function%
Numerator = [a];
Denominator = [b c d];
Transfer_Function = tf(Numerator, Denominator);
Transfer_Function
%Checking the step response with period 0.5%
Step_End = 0.5;
step(Transfer_Function,Step_End);
Ran using MATLAB R2019b
Upvotes: 1