I need to find the transfer function of the close loop with the two variables gains using Simulink and math formulation
    14 views (last 30 days)
  
       Show older comments
    
Im trying to find the close loop of the transfer function also the open loop transfer function, but i need to make the two gains as shown below varibles so , how to find the transfer functions by simulink and math formilation.
i tried to find the transfer function by mathmatical formulation so, i defind the k1 and k2 as syms but the problem that i can not find the root locus alos

1 Comment
  Sam Chak
      
      
 on 29 Dec 2023
				Hi Ahmad,
Would you tell the performance requirements such as the desired settling time and allowable percentage overshoot?
These information are important to the compensator design.
Accepted Answer
  Paul
      
      
 on 29 Dec 2023
        Hi ahmad,
Neither Simulink nor the Control System Toolbox support any model with symbolic parameters. In both tools, everything has to have a value at the time of evaluation.
If you just want to see the form of the transfer functions, then the Symbolic Math Toolbox offers a solution. Here's an example that maybe you can adapt to your needs
syms s K
P(s) = 1/(s + 1);
H(s) = simplify(K*P/(1 + K*P))
However, your question also mentions root locus, which usually means the closed loop poles as a single gain varies. In this problem there are two gains, so is the plan to fix one to some value and find the root locus with respect to the other?  If that's the case, there's no need to use the Symbolic Math Toolbox. Just set the value of the known gain, find the open-loop transfer function at the other gain, and plot root locus. 
0 Comments
More Answers (1)
  Sam Chak
      
      
 on 30 Dec 2023
        This is not a complete solution but rather guidance to assist in finding the closed-loop transfer function of the system enclosed in the blue box. The idea is to perform block diagram reduction until a single transfer function is obtained, which is simply the product of the individual transfer functions.
As indicated in the image below, you need to follow the colors of the rainbow in order: red, orange, yellow, green, blue, and violet. However, violet is unused in this tutorial, so there are only 5 steps. It is recommended to perform these tasks manually to enhance your understanding of finding the closed-loop transfer function. If this is an assignment, it is likely that you are required to demonstrate the steps and write out the equations. 






Upon successful completion of the tasks, you should obtain the following closed-loop transfer function, which you can then verify using MATLAB:

If you had previously designed for  and
 and  , you can substitute the values and obtain the closed-loop transfer function. When applying the final value theorem, it's important to note that achieving zero steady-state error on a Type-0 Plant (
, you can substitute the values and obtain the closed-loop transfer function. When applying the final value theorem, it's important to note that achieving zero steady-state error on a Type-0 Plant ( ) with a Rate Feedback PD controller alone is impossible.
) with a Rate Feedback PD controller alone is impossible.
 and
 and  , you can substitute the values and obtain the closed-loop transfer function. When applying the final value theorem, it's important to note that achieving zero steady-state error on a Type-0 Plant (
, you can substitute the values and obtain the closed-loop transfer function. When applying the final value theorem, it's important to note that achieving zero steady-state error on a Type-0 Plant ( ) with a Rate Feedback PD controller alone is impossible.
) with a Rate Feedback PD controller alone is impossible.In the simulation below, the steady-state value to a unit step input signal is 0.9584. At this stage, zero steady-state error can be achieved either by using a pre-filter to cancel out the zero of the closed-loop transfer function, or by placing a scaling factor at the input signal.
s   = tf('s');
k1  = - 8.81311264367816;
k2  = -10.908826106487;
Gp  = (- 0.125*s - 0.054375)/(s^3 + 1.456*s^2 + 0.2948*s + 0.020787);
Ga  = 2/(s + 2);
G1  = series(Ga, Gp);
G2  = feedback(G1, k2*s);
Gcl = minreal(feedback(k1*G2, 1))
step(Gcl, 20), grid on
%% Method 1: use a Prefilter, Gf
[numGcl, denGcl] = tfdata(Gcl, 'v');
Gf = tf(1, [numGcl(4), numGcl(5)])
step(Gf*Gcl, 20), grid on
%% Method 2: scale the input signal, sf
sf  = 1/dcgain(Gcl);    % 1.04337737081423 <-- the unit step value (1) is amplified to 1.0434;
step(sf*Gcl, 20), grid on
0 Comments
See Also
Categories
				Find more on Classical Control Design in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





