AIDA is a study case for model based system engineering, made by MOISE project. This project contains the simulation model of AIDA (made with SimulationX in Modelica)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.9 KiB

// CP: 65001
// SimulationX Version: 3.8.2.45319 x64
within AIDAModelica;
model ComputeTotalThrustCA "[SF2.4.2] Compute total thrust"
Modelica.Blocks.Interfaces.RealInput AccelerationConsign(
quantity="Mechanics.Translation.Accel",
displayUnit="m/s²") "Acceleration consign" annotation(Placement(
transformation(extent={{-20,-20},{20,20}}),
iconTransformation(extent={{-120,-20},{-80,20}})));
Modelica.Blocks.Interfaces.RealOutput TotalThrustAP(
quantity="Mechanics.Translation.Force",
displayUnit="N") "Total thrust autopilot mode" annotation(Placement(
transformation(extent={{-10,-10},{10,10}}),
iconTransformation(extent={{90,-10},{110,10}})));
parameter Real m(
quantity="Basics.Mass",
displayUnit="kg")=1.8 "Parameter m";
Real AC(
quantity="Mechanics.Translation.Velocity",
displayUnit="m/s") "Altitude consign";
parameter Real N=-1 "Acceleration linear threshold";
equation
// enter your equations here
AC = AccelerationConsign;
//TotalThrustAP =if AC<0 then -m*AC else 0;
//to prevent loss of attitude control due to a nul thrust
TotalThrustAP =if AC<N then -m*AC else -m*N*exp(1/N*(AC-N));
annotation(
Icon(graphics={
Rectangle(
fillColor={255,255,255},
fillPattern=FillPattern.Solid,
extent={{-100,100},{100,-100}}),
Text(
textString="* m",
fillPattern=FillPattern.None,
extent={{-70,26.7},{73.3,-30}}),
Line(
points={{-3.3,76.7},{-3.3,76.7},{0,-76.7}},
color={192,192,192},
arrow={Arrow.Filled,Arrow.None}),
Line(
points={{-1.1,51.1},{-1.1,51.1},{8.4,-104.1}},
color={192,192,192},
arrow={Arrow.Filled,Arrow.None},
origin={24.4,-63.7},
rotation=-93),
Line(
points={{-81.09999999999999,95.59999999999999},{8.9,-47.8},{72.2,-47.8}},
origin={-8.9,-18.9})}),
experiment(
StopTime=1,
StartTime=0,
Interval=0.002,
MaxInterval="0.001"));
end ComputeTotalThrustCA;