你怎样用MATLAB得到response graph,当分析一个负反馈回路,使用pid串联,且the step time=3,initial value=0,final value=20,sample time =0.05, the process transfer = 49/(12s^2+8.4s+49), the feedback transfer = 1.5/(0.5s+1.5), the gains Kp = 0.3, Ki = 2.4 , Kd=0.01, 怎样出入到MATLAB的命令窗口
Question
你怎样用MATLAB得到response graph,当分析一个负反馈回路,使用pid串联,且the step time=3,initial value=0,final value=20,sample time =0.05, the process transfer = 49/(12s^2+8.4s+49), the feedback transfer = 1.5/(0.5s+1.5), the gains Kp = 0.3, Ki = 2.4 , Kd=0.01, 怎样出入到MATLAB的命令窗口
Solution
首先,我们需要定义系统的传递函数。在MATLAB中,我们可以使用tf函数来定义传递函数。以下是如何定义过程传递函数和反馈传递函数的步骤:
s = tf('s');
process_transfer = 49/(12*s^2+8.4*s+49);
feedback_transfer = 1.5/(0.5*s+1.5);
接下来,我们需要定义PID控制器。在MATLAB中,我们可以使用pid函数来定义PID控制器。以下是如何定义PID控制器的步骤:
Kp = 0.3;
Ki = 2.4;
Kd = 0.01;
controller = pid(Kp,Ki,Kd);
然后,我们需要定义负反馈回路。在MATLAB中,我们可以使用feedback函数来定义负反馈回路。以下是如何定义负反馈回路的步骤:
sys_cl = feedback(controller*process_transfer,feedback_transfer);
最后,我们可以使用step函数来得到response graph。以下是如何得到response graph的步骤:
step_time = 3;
initial_value = 0;
final_value = 20;
sample_time = 0.05;
t = initial_value:sample_time:final_value;
step(sys_cl,t);
以上就是如何在MATLAB中得到response graph的步骤。
Similar Questions
Rate determining steps with the graphs also
Parameters of the following transfer function are given as: k=3.1, a=9.8, and b=4.2, calculate the gain constant K of the control system. (please keep four digits after decimal point)𝑇𝐹=𝑘𝑎𝑠+𝑏
Why does the step response of the system differ from the ideal exponential response obtainedfrom the measured gain and time response?
Use the following information to answer next questions. Consider an economy for which y = Akθ with the parameter values as listed: A=11, s=0.2, n=0.2, d=0.3 ,θ=0.6 . Compute the steady state values for k based on the parameters up to one decimal point. Report the value of k*.
When comparing different rate graphs, which of the following profiles shows the highest rate of reaction?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.