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

6 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Simulink 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by