- Index
- » Programming
- » Modelica Language
- » hybrid system
hybrid system
hybrid system
In the simple model shown, the accelleration should be zero when V_MAX is reached. But in the simulation it doesn't happen. Using 'when' instead, the system becomes overdetermined.
model Attitude_manover
parameter Real D_F = 1000, V_MAX = 100, G = 9.81;
//Real N(start = 0);
//Real E(start = 0);
Real D(start = 0);
//Real VN = 0;
//Real VE = 100;
Real VD(start = 0);
Real AD;
equation
// der(N) = VN;
// der(E) = VE;
der(D) = VD;
der(VD) = AD;
AD = G * sign(D_F);
if abs(VD) >= V_MAX then
AD = 0;
end if;
/* when abs(D) > abs(D_F) then
D = D_F;
end when;
*/
end Attitude_manover;
- Index
- » Programming
- » Modelica Language
- » hybrid system