// CP: 65001 // SimulationX Version: 3.8.2.45319 x64 within AIDAModelica; model XAngularSpeedErrorModel "X angular speed error calculation model" Modelica.Blocks.Interfaces.RealInput RollConsign( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "'input Real' as connector" annotation(Placement( transformation(extent={{-20,-20},{20,20}}), iconTransformation(extent={{-120,30},{-80,70}}))); Modelica.Blocks.Interfaces.RealInput Roll( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "'input Real' as connector" annotation(Placement( transformation(extent={{-20,-20},{20,20}}), iconTransformation(extent={{-120,-20},{-80,20}}))); Modelica.Blocks.Interfaces.RealInput AngularSpeedX( quantity="Mechanics.Rotation.RotVelocity", displayUnit="rad/s") "'input Real' as connector" annotation(Placement( transformation(extent={{-20,-20},{20,20}}), iconTransformation(extent={{-120,-70},{-80,-30}}))); Modelica.Blocks.Interfaces.RealOutput AngularSpeedXError( quantity="Mechanics.Rotation.RotVelocity", displayUnit="rad/s") "'output Real' as connector" annotation(Placement( transformation(extent={{-10,-10},{10,10}}), iconTransformation(extent={{86.7,-10},{106.7,10}}))); parameter Real Kwphi=1.5 "Proportional gain Kwphi"; Real ephi( quantity="Mechanics.Rotation.Angle", displayUnit="rad") "Phi error"; Real wxd( quantity="Mechanics.Rotation.RotVelocity", displayUnit="rad/s") "Desired angular speed X"; equation // enter your equations here ephi = Roll-RollConsign; wxd = -Kwphi*ephi; AngularSpeedXError = wxd-AngularSpeedX ; annotation(Icon(graphics={ Rectangle( fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,100},{100,-100}})})); end XAngularSpeedErrorModel;