I'm trying to create a centrifuge compressor in simulink for surge study.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
aziz
el 30 de Mayo de 2025
Respondida: Sam Chak
el 4 de Jun. de 2025
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.
0 comentarios
Respuesta aceptada
Sam Chak
el 4 de Jun. de 2025
Hi @aziz
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 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
