I need to find the transfer function of the close loop with the two variables gains using Simulink and math formulation
24 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1578961/image.png)
1 个评论
Sam Chak
2023-12-29
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.
采纳的回答
Paul
2023-12-29
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 个评论
更多回答(1 个)
Sam Chak
2023-12-30
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579116/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579121/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579126/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579131/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579136/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579141/image.png)
Upon successful completion of the tasks, you should obtain the following closed-loop transfer function, which you can then verify using MATLAB:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579146/image.png)
If you had previously designed for
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 (
) with a Rate Feedback PD controller alone is impossible.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579151/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579156/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1579161/image.png)
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!