Simulink simulation stops due to unknown reason

1 view (last 30 days)
The simulation runs smoothly until adding the following to ADCS_Tracking/ADCS/Ideal control/Tracking control:
u_satmax = cross(w, I.*w) - K1*I.*(w - 0.45*pi/180/sqrt(3)*ones(3,1));
u_satmin = cross(w, I.*w) - K1*I.*(w + 0.45*pi/180/sqrt(3)*ones(3,1));
for i = 1:3
if u(i)*w(i) > 0 && abs(w(i)) > 0.4*pi/180/sqrt(3)
if w(i) > 0
u(i) = u_satmax(i);
else
u(i) = u_satmin(i);
end
end
end
From that point on, the simulation stops, sometimes prompting the consecutives zero crossings error (not always). This is fixed when suppressing either the ADCS_Tracking/ADCS/Gyro or the ADCS_Tracking/ADCS/Real control/MT subsystems, but I cannot find the error in either of the two.

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Tags

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!