can I ask a several question about automatic control ?

조회 수: 3 (최근 30일)
영석 윤
영석 윤 2023년 11월 29일
댓글: Sam Chak 2023년 11월 29일
how to make sentence for simulink ?
i don't know anything about how to express in matlab(simulink?)
and i want to make Wn and σ
up and down the number ( assuming Wn = 1 , σ is 0,0.2,0.5,0.8,1.0,2.0,10 )
how to change it?

답변 (2개)

Walter Roberson
Walter Roberson 2023년 11월 29일
syms u(t) y(t) sigma omega_n
dy = diff(y,t)
dy(t) = 
d2y = diff(dy, t);
eqn = d2y + 2*sigma * omega_n * dy + omega_n^2 * y == omega_n^2 * u
eqn(t) = 
Y = simplify(dsolve(eqn), 'steps', 50)
Y = 

Sam Chak
Sam Chak 2023년 11월 29일
When a differential equation is given, modeling a system in Simulink requires converting the equation into integral form.
Thus, in Simulink, you need to construct the expression using fundamental blocks that provide the functions of math operators such as "Add" (which can subtract by changing the sign), "Product" (or "Gain" to directly multiply a signal by a constant), and "Math Function" (for squaring). The expression serves as the input signal to the "Second-Order Integrator" block.
If and σ (as well as the '2') are constants, you can use the "Constant" block (from the Source Library). However, I prefer using the "Gain" block for simplicity and because these values are not really a type of input source.
The double integral can be performed by using the "Second-Order Integrator" block (denoted by 1/s² in Laplace form). This block has two outputs: x for the y(t) signal and dx for the y'(t) signal. You will need these two signals to provide feedback to the mathematical operation blocks for performing the integrand expression: .
The signal should be your input signal. If it's just a constant 1, then you can use the "Step" block. Edit the Step time parameter value as necessary. You are encouraged to learn the basics of creating, editing, and simulating models in Simulink by taking this free, self-paced course:
  댓글 수: 1
Sam Chak
Sam Chak 2023년 11월 29일
I forgot to mention that you will need to connect the signals from the x and dx ports ("Second-Order Integrator" block) to a "Scope" block in order to monitor or display the time responses of the two signals, and .
Double-click the "Second-Order Integrator" block to open the block parameters menu and set the initial values for and as instructed in the homework. Since one of the σ values is 10, you should set the Simulation Time to 120 s. It will cover that range for the rest of the σ values.
sigma = 10; % largest value
Gp = tf(1, [1 2*sigma 1])
Gp = 1 -------------- s^2 + 20 s + 1 Continuous-time transfer function.
step(Gp), grid on
title('Step Response for y(t) when \sigma = 10')
sigma = 0.1; % smallest value
Gp = tf(1, [1 2*sigma 1])
Gp = 1 --------------- s^2 + 0.2 s + 1 Continuous-time transfer function.
step(Gp, 120), grid on
title('Step Response for y(t) when \sigma = 0.1')

댓글을 달려면 로그인하십시오.


Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by