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.
96 lines
3.2 KiB
96 lines
3.2 KiB
within AIDAModelica; |
|
model ControlYawAngle "[SF2.3.5] Control yaw angle" |
|
Modelica.Blocks.Interfaces.RealInput YawConsign( |
|
quantity="Mechanics.Rotation.Angle", |
|
displayUnit="rad") "Desired momentum at axe Z" annotation(Placement( |
|
transformation(extent={{-135,30},{-95,70}}), |
|
iconTransformation(extent={{-120,30},{-80,70}}))); |
|
Modelica.Blocks.Interfaces.RealInput Yaw( |
|
quantity="Mechanics.Rotation.Angle", |
|
displayUnit="rad") "'input Real' as connector" annotation(Placement( |
|
transformation(extent={{-135,0},{-95,40}}), |
|
iconTransformation(extent={{-120,-20},{-80,20}}))); |
|
Modelica.Blocks.Interfaces.RealInput AngularSpeedZ( |
|
quantity="Mechanics.Rotation.RotVelocity", |
|
displayUnit="rad/s") "'input Real' as connector" annotation(Placement( |
|
transformation(extent={{-135,-30},{-95,10}}), |
|
iconTransformation(extent={{-120,-70},{-80,-30}}))); |
|
Modelica.Blocks.Interfaces.RealOutput MomentumZ( |
|
quantity="Mechanics.Rotation.Torque", |
|
displayUnit="Nm") "'output Real' as connector" annotation(Placement( |
|
transformation(extent={{30,10},{50,30}}), |
|
iconTransformation(extent={{86.7,-10},{106.7,10}}))); |
|
ZAngularSpeedErrorModel zAngularSpeedErrorModel1 "Z angular speed error calculation model" annotation(Placement(transformation(extent={{-55,10},{-35,30}}))); |
|
Modelica.Blocks.Continuous.PID PID2( |
|
k=0.1, |
|
Ti=2, |
|
Td=0.1, |
|
initType=Modelica.Blocks.Types.InitPID.InitialState, |
|
Add( |
|
k1=-1, |
|
k2=-1, |
|
k3=-1)) "PID-controller in additive description form" annotation(Placement(transformation(extent={{-10,10},{10,30}}))); |
|
equation |
|
connect(PID2.y,MomentumZ) annotation(Line( |
|
points={{11,20},{16,20},{35,20},{40,20}}, |
|
color={0,0,127}, |
|
thickness=0.0625)); |
|
|
|
|
|
|
|
connect(zAngularSpeedErrorModel1.YawCosign,YawConsign) annotation(Line( |
|
points={{-55,25},{-60,25},{-110,25},{-110,50},{-115,50}}, |
|
color={0,0,127}, |
|
thickness=0.0625)); |
|
connect(zAngularSpeedErrorModel1.Yaw,Yaw) annotation(Line( |
|
points={{-55,20},{-60,20},{-110,20},{-115,20}}, |
|
color={0,0,127}, |
|
thickness=0.0625)); |
|
connect(zAngularSpeedErrorModel1.AngularSpeedZ,AngularSpeedZ) annotation(Line( |
|
points={{-55,15},{-60,15},{-110,15},{-110,-10},{-115,-10}}, |
|
color={0,0,127}, |
|
thickness=0.0625)); |
|
connect(PID2.u,zAngularSpeedErrorModel1.AngularSpeedZError) annotation(Line( |
|
points={{-12,20},{-17,20},{-30.3,20},{-35.3,20}}, |
|
color={0,0,127}, |
|
thickness=0.0625)); |
|
annotation( |
|
YawConsign(flags=2), |
|
Yaw(flags=2), |
|
AngularSpeedZ(flags=2), |
|
MomentumZ(flags=2), |
|
zAngularSpeedErrorModel1( |
|
YawCosign(flags=2), |
|
Yaw(flags=2), |
|
AngularSpeedZ(flags=2), |
|
AngularSpeedZError(flags=2), |
|
eyaw(flags=2), |
|
wzd(flags=2)), |
|
PID2( |
|
u(flags=2), |
|
y(flags=2), |
|
P( |
|
u(flags=2), |
|
y(flags=2)), |
|
I( |
|
u(flags=2), |
|
y(flags=2)), |
|
D( |
|
u(flags=2), |
|
y(flags=2), |
|
x(flags=2)), |
|
Gain( |
|
u(flags=2), |
|
y(flags=2)), |
|
Add( |
|
u1(flags=2), |
|
u2(flags=2), |
|
u3(flags=2), |
|
y(flags=2))), |
|
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -103.3}}), Text(origin = {-4, 0}, extent = {{-16, 8}, {16, -8}}, textString = "%name")}, coordinateSystem(initialScale = 0.1)), |
|
experiment( |
|
StopTime=1, |
|
StartTime=0, |
|
Interval=0.002, |
|
MaxInterval="0.001")); |
|
end ControlYawAngle;
|
|
|