can I ask a several question about automatic control ?
조회 수: 1 (최근 30일)
이전 댓글 표시
답변 (2개)
Walter Roberson
2023년 11월 29일
syms u(t) y(t) sigma omega_n
dy = diff(y,t)
d2y = diff(dy, t);
eqn = d2y + 2*sigma * omega_n * dy + omega_n^2 * y == omega_n^2 * u
Y = simplify(dsolve(eqn), 'steps', 50)
댓글 수: 0
Sam Chak
2023년 11월 29일
Hi @영석 윤
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
2023년 11월 29일
Hi @영석 윤
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.
subplot(211)
sigma = 10; % largest value
Gp = tf(1, [1 2*sigma 1])
step(Gp), grid on
title('Step Response for y(t) when \sigma = 10')
subplot(212)
sigma = 0.1; % smallest value
Gp = tf(1, [1 2*sigma 1])
step(Gp, 120), grid on
title('Step Response for y(t) when \sigma = 0.1')
참고 항목
카테고리
Help Center 및 File Exchange에서 Upgrading Hydraulic Models to Use Isothermal Liquid Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!