From: <sv...@ww...> - 2005-04-28 06:22:52
|
Author: mkrose Date: 2005-04-27 23:22:44 -0700 (Wed, 27 Apr 2005) New Revision: 1524 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py Log: Fix a small bug in the F16 yaw control circuit. Stops rudder jitter. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1524 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:22:44 UTC (rev 1524) @@ -37,6 +37,8 @@ * Tweaked the m2k flight model slightly to allow the aircraft to reach higher AOA. The new values are entirely ad-hoc. + * Fix a small bug in the F16 yaw control circuit. Stops rudder jitter. + 2005-04-25: delta * Need to include a few headers to avoid a syntax error (g++ and vc++ don't manage forward class declaration equivalently). Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml 2005-04-28 06:22:44 UTC (rev 1524) @@ -2,7 +2,7 @@ <!-- *** WARNING: THIS IS A GENERATED FILE *** Think twice before editing this file directly! - Generated from /b/mrose/projects/csp/CSP.cockpit/CSP/CSPSim/Tools/FlightControlSystem/F16 at Mon Apr 25 23:45:46 2005 + Generated from /b/mrose/projects/csp/CSP.cockpit/CSP/CSPSim/Tools/FlightControlSystem/F16 at Wed Apr 27 23:08:32 2005 --> <Object class="FlightControlSystem"> <List name="nodes"> @@ -179,13 +179,11 @@ <Float name="dlef_qbar_ps">-9.05</Float> </Object> - <Object class="Adder3"> + <Object class="Adder"> <Key name="id">dr</Key> <Float name="gain_b">0.75</Float> - <Float name="gain_c">-0.5</Float> <Key name="input_a">limited_yaw_command</Key> <Key name="input_b">yaw_rate_f</Key> - <Key name="input_c">lateral_acceleration_compensation</Key> </Object> <Object class="LagFilter"> @@ -324,12 +322,6 @@ <String name="channel">Kinetics.AccelerationBody</String> </Object> - <Object class="Scale"> - <Key name="id">lateral_acceleration_compensation</Key> - <Float name="gain">1.97142857143</Float> - <Key name="input">lateral_acceleration</Key> - </Object> - <Object class="OutputChannel"> <Key name="id">leading_edge_deflection</Key> <String name="channel">ControlSurfaces.LeadingEdgeDeflection</String> @@ -542,6 +534,12 @@ <Float name="rate_limit_inc">1.0471975512</Float> </Object> + <!-- Roll rate in radians/sec. --> + <Object class="InputVectorYChannel"> + <Key name="id">roll_rate</Key> + <String name="channel">Kinetics.AngularVelocityBody</String> + </Object> + <Object class="OutputChannel"> <Key name="id">rudder_deflection</Key> <String name="channel">ControlSurfaces.RudderDeflection</String> Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py 2005-04-28 06:22:44 UTC (rev 1524) @@ -33,9 +33,9 @@ """Pitch rate in radians/sec.""" channel = "Kinetics.AngularVelocityBody" -#class roll_rate(InputVectorYChannel): -# """Roll rate in radians/sec.""" -# channel = "Kinetics.AngularVelocityBody" +class roll_rate(InputVectorYChannel): + """Roll rate in radians/sec.""" + channel = "Kinetics.AngularVelocityBody" class yaw_rate(InputVectorZChannel): """Yaw rate in radians/sec.""" Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py 2005-04-28 06:22:44 UTC (rev 1524) @@ -21,18 +21,42 @@ input = "yaw_rate" gain = RadiansToDegrees -class dr(Adder3): +class dr(Adder): input_a = "limited_yaw_command" input_b = "yaw_rate_f" - input_c = "lateral_acceleration_compensation" gain_b = 0.75 - gain_c = -0.5 class dr_f(LagFilter): input = "dr" a = 20.2 -class lateral_acceleration_compensation(Scale): - input = "lateral_acceleration" - gain = 19.32 / 9.8 # in g's +# TODO aoa >= 29 deg +""" +class roll_to_yaw_factor(Multiply): + input_a = roll_rate # rad/s + input_b = alpha_f # deg +class yaw_roll_target(Adder): + input_a = "yaw_rate" + input_b = "roll_to_yaw_factor" + gain_a = RadiansToDegrees + gain_b = -1.0 + +class yaw_roll_target_f(LeadLagFilter): + input = "yaw_roll_target" + a = 15.0 + b = 5.0 + c = 3.0 + +class yaw_roll_target_f2(LeadFilter): + input = "yaw_roll_target_f" + gain = 1.5 + a = 1.0 + +class yaw_target(Adder3): + input_a = "yaw_roll_target_f2" + input_b = "lateral_acceleration" + input_c = "zero" # TODO + gain_a = 0.5 + gain_b = 0.5 * 19.32 / 9.8 # in g's +""" |