I'm trying to create a centrifuge compressor in simulink for surge study.

4 ビュー (過去 30 日間)
aziz
aziz 2025 年 5 月 30 日
回答済み: Sam Chak 2025 年 6 月 4 日
Hi, i'm a beginner at simulink and i've been trying to create a centrifuge compressor to analyse surge and i tried to recreate this one <> but had a lot of errors, i have the equation needed but don't know how to work with them.

採用された回答

Sam Chak
Sam Chak 2025 年 6 月 4 日
I suggest that you run the simulation of the compressor equation in MATLAB. If it works in MATLAB, it is generally easier to migrate the MATLAB code to the Simulink environment. With MATLAB code, you have almost complete control over the solution.
In Simulink, if you are not using the code migration approach, you will need to construct multiple blocks to perform the necessary mathematical operations described in the compressor equation. Without a basis for verifying the results, you may feel compelled to "trust" that the Simulink blocks are 100% accurate. However, if you have the MATLAB simulation results, you can always make a comparison.
Here is a sample code:
%% equations of the system
function dx = DifferentialEquation(t, x)
dx = zeros(2, 1);
dx(1) = (- 3.5 - 1.5*sin(x(1)))*x(1) - 4*x(2);
dx(2) = ( 9.5 - 10.5*sin(x(1)))*x(1) - 2*x(2);
end
%% run the simulation
tspan = [0, 3];
x0 = [1; 0];
[t, x] = ode45(@DifferentialEquation, tspan, x0);
%% plot results
plot(t, x), grid on
xlabel('t'), ylabel('\bf{x}(t)')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by