Do My Homework / Homework Help Answers / Engineering Homework Help / Using MATLAB and a paper Writeup

Using MATLAB and a paper Writeup

Need help with this question or any other Engineering assignment help task?

There are two portions, A MATLAB section and a writeup. For the MATLAB section I will need annotations so I can determine if I need to make changes to the code. I say this because I am limited with regards to the material I am allowed to use. The templet for the writeup is referred to in the file. I will provide the file indicating the limits of what can be used. In addition to that there are some MATLAB files I will need to provide you
Additional Instructions:
Introduction The HL-20 is a prototype design for a re-entry vehicle that evolved primarily at NASA Langley Research Center. The goal was to make a cost-effective and reusable launch vehicle capable of completing routine missions to and from the International Space Station (ISS). Although the HL-20 is much smaller than the Space Shuttle orbiter, it was expected to be significantly cheaper, safer, and more practical in comparison. A nonlinear flight dynamics simulation for the longitudinal axis of the HL-20 was constructed in Simulink®. Your first job for this final project is to use that simulation and other distributed data to design the flight control laws for the pitch axis during the approach and landing phase of the envisioned mission. Your second job is to document your design in a technical paper worthy of being accepted to and presented at the AIAA Guidance, Navigation, and Control (GNC) conference held during the SciTech Forum each January. Vehicle Description The HL-20 was was designed to hold a crew of 8–10 people and other cargo. The wing span was 13.89 ft, the mean aerodynamic chord was 28.24 ft, and the wing reference area was 286.45 ft2. At landing conditions, the vehicle was designed to have weight 19,100 lbf and center of mass at 55% its length. A photograph of a full-scale mock-up used to study human factors is shown in Fig. 1(a), and a three-view drawing of the vehicle is shown in Fig. 1(b). (a) Photograph (credit: NASA Lang- ley Research Center). (b) 3-view drawing [1]. Figure 1: HL-20 personnel launch system vehicle. The HL-20 design had seven aerodynamic control surfaces, including left and right wing flaps, upper and lower body flaps on the left and right sides, and an all-moving vertical fin (rudder). For longitudinal flight during the subsonic approach and landing phase of the mission, pitch control was primarily achieved using symmetric deflection of the left and right wing flaps, which is referred to here as the elevator deflection. The vehicle does not produce propulsive thrust during this phase of the mission. For additional information on the HL-20, see Refs. [2, 3, 4] and the references therein. Several of these papers can be found on the NASA Technical Reports Server (NTRS) [5], which archives all papers, reports, and presentations created by NASA and the NACA. Simulation Model Description A longitudinal flight dynamics simulation has been constructed and distributed with this final project as the collection of Simulink® models named hl20LonSim R20*.slx. The models are all identical, but have 2 been exported from R2022a to various previous versions of Simulink®. Upon opening the model, a block for the flight control system (FCS) and the HL-20 longitudinal plant model are visible. The FCS takes input from the pilot commands and from the available sensors, and computes the control signals sent to the HL-20 using your (to-be supplied) control laws. Initially, the FCS is set up to terminate the sensor outputs and feed through the pilot input directly to the vehicle. In this initial configuration, the pilot input commands the desired elevator control surface deflection, known as “stick to surface.” The plant model consists of three components: an actuator model, the bare-airframe dynamics, and sensor models. The actuator is modeled in this flight condition as the first-order lag δ(s) δc(s) = 20 s+ 20 (1) where δc is the commanded elevator deflection and δ is the actual elevator deflection. The convention for elevator deflection is that δ > 0 is a trailing-edge down deflection, which in turn creates a negative (nose- down) moment on the vehicle. The elevator deflections δ(t) are limited to ±30 deg, and the elevator rates δ̇(t) are limited to ±20 deg/s. To account for added phase loss from neglected higher-order actuator dynamics, a 0.010 s delay is also included in the actuator model. The bare-airframe dynamics relate the control surface deflections to the resulting motion of the HL-20. Although this model only includes the longitudinal axis of the vehicle (i.e., no lateral-directional dynamics), the rigid-body dynamics are inherently nonlinear. The aerodynamics are also nonlinear and come from wind-tunnel tests that resulted in identified nonlinear polynomial models describing the nondimensional aerodynamic force and moment coefficients imparted on the vehicle [3, 6, 7]. A disturbance input for the angle of attack “gust” αg(t) is also included in this model. The sensor models produce measurements of the vehicle motion that can be used for feedback or general monitoring of the system. Representative measurement noise, quantization effects, and delays are added to these data. Place-holders for bias and scale factor errors are also present, but are nominally zero. Note that while you have access to every part of the nonlinear simulation model, understanding each part (beyond the summary overview description above) is not needed for this project. Do not get hung up on the minutiae of these details, as your primary concern is to wrap a control law around a simplistic model of these dynamics. The simulation can be run using the supplied run hl20.m file. This file first calls the script setup hl20.m which defines many of the parameters used by the model. Afterwards, the pilot and disturbance inputs are defined, the simulation is performed using the selected inputs, and observed data are logged to the MATLAB® workspace and plotted. In run hl20.m, be sure to change the model name to correspond to the version of MATLAB® you are running. Several simulation maneuver cases are already included in the file, as examples, but add to these to suit your analysis. The supplied cases include: • Case 1: This runs the simulation with the trim inputs and without excitation from the pilot or gust disturbance. All input and output flight variables are held at their trim values (because the aircraft is stable in this condition), albeit with noise on the output measurements. • Case 2: This is the same simulation as in Case 1 except at 2 s into the simulation, a 4 deg alpha gust is turned on as a step input. • Case 3: This is the same simulation as in Case 1 except that “light” turbulence is applied using the continuous Dryden turbulence model [8]. This alpha gust signal is created by passing Gaussian white noise through a transfer function with parameters that depend on the aircraft altitude and airspeed. • Case 4: This is the same simulation as in Case 1 except that a piloted doublet is super-imposed on the trim input. The doublet is a 2 deg step up from the trim value, held for 3 s, and then a 2 deg step down from the trim value, held for another 3 s. For the initial stick-to-surface configuration, the pilot doublet commands the control surface deflection. Note that although the simulation is nonlinear, it behaves similarly to a linear simulation for “small” perturbations about a specified reference flight condition. For this project, that condition is flight at 0.41 Mach at an altitude of 8,000 ft, as the HL-20 is executing an approach for landing. An optimization has 3 been run to determine the other following trim variables: angle of attack α is 10.7 deg, pitch angle θ is −9.3 deg, elevator deflection δ is 0.05 deg, airspeed V is 442 ft/s, and pitch rate q is 0 deg/s. These values are consistent with those shown when running the provided Case 1 maneuver discussed above. Here “small perturbations” basically means keeping the angle of attack within about 5 deg of the trim value. As the angle of attack (and other variables) incurs larger deviations from trim, the local linear model approximation for the system changes and/or deteriorates in accuracy with respect to the nonlinear simulation. The simulation is configured to run at a sampling rate of 1/0.01 s or 100 Hz. Do not change this rate as it will affect the statistical noise and disturbance characteristics of the simulation. The nominal time duration is set as T = 15 s by default, but this can be arbitrarily changed. Analysis Part I — System Identification To obtain a linearized model of the nonlinear bare-airframe dynamics about the reference flight condition, that block was detached from the rest of the simulation, special excitations were applied to the elevator control surface deflection input, outputs were recorded, and a system identification analysis was performed. Frequency responses were computed from the elevator deflection in rad to the true airspeed (TAS) V in ft/s, angle of attack at the center of mass α in rad/s, pitch rate q in rad/s, pitch angle θ in rad, and vertical accelerometer at the center of mass az in g units. These frequency response data are supplied in the file frf bair.mat, where the variable w is the vector of frequencies in rad/s and frf are the corresponding frequency response evaluations. Note that these frequency responses are only for the bare-airframe dynamics, and do not include the effects of the actuators or sensors. As frequency responses represent a linear model, they are only valid for small perturbations about the reference flight condition. Use the provided frequency response data to obtain a transfer function model for the elevator to pitch rate dynamics, q(s)/δ(s). Although the other frequency response data are not necessarily needed, they may be helpful in more quickly or easily extracting some of the modal characteristics. Each transfer function contains the same exact poles as the other transfer functions, but in general has a different gain and zeros. From flight dynamics theory [9, 10, 11], the transfer functions have the following structures: V (s) δ(s) = KV (s− zV1)(s− zV2)(s− zV3)[ s2 + 2ζphωphs+ ω2ph ] [ s2 + 2ζspωsps+ ω2sp ] (2a) α(s) δ(s) = Kα[s 2 + 2ζα1ωα1s+ ω 2 α1 ](s− zα1)[ s2 + 2ζphωphs+ ω2ph ] [ s2 + 2ζspωsps+ ω2sp ] (2b) q(s) δ(s) = Kθ s (s− zθ1)(s− zθ2)[ s2 + 2ζphωphs+ ω2ph ] [ s2 + 2ζspωsps+ ω2sp ] (2c) θ(s) δ(s) = Kθ(s− zθ1)(s− zθ2)[ s2 + 2ζphωphs+ ω2ph ] [ s2 + 2ζspωsps+ ω2sp ] (2d) az(s) δ(s) = Kaz [s 2 + 2ζazωazs+ ω 2 az](s− zaz1)(s− zaz2)[ s2 + 2ζphωphs+ ω2ph ] [ s2 + 2ζspωsps+ ω2sp ] (2e) Note that the transfer functions from elevator to pitch rate and pitch angle differ only by a zero at the origin because of the kinematic relationship q(t) = θ̇(t). Equations (2a)–(2e) contain two second-order modes. The first is the phugoid mode (denoted by the subscript “ph”). This is a relatively slow oscillatory mode with a period on the order of 60 s, where airspeed and pitch angle are exchanged at approximately constant angle of attack and pitch rate. The second mode is the short period mode (denoted by the subscript “sp”). This mode is faster with a period around 2.5 s, where angle of attack and pitch rate are exchanged at approximately constant airspeed and pitch angle. Once you have used the supplied frequency response data to identify numerical values for the transfer function q(s)/δ(s), which is given by Eq. (2c), truncate (i.e., remove) the phugoid mode poles, the zero at 4 the origin, and the low-frequency zero to obtain the corresponding short period approximation, given by q(s) δ(s) ' Kθ(s− zθ2) [s2 + 2ζspωsps+ ω2sp] (3) This approximation is generally good for short time durations and for frequencies higher than the phugoid mode and lower than and structural modes. This transfer function in Eq. (3) will serve as a basis for control design in the remainder of this final project. In your documentation, include the following: 1. Your identified transfer function corresponding to Eq. (2c). 2. Your simplified transfer function corresponding to Eq. (3). 3. A bode plot showing the provided frequency response data as well as frequency responses for your two aforementioned elevator to pitch rate transfer functions. Analysis Part II — Stability Augmentation System Design As you can see from your identified transfer functions, the short period mode for the HL-20 in this flight condition has very low damping, which would lead to poor handling qualities ratings from the pilot. Using your truncated model for q(s)/δ(s) from Eq. (3), feed back the measured pitch rate to the elevator input with a gain Kq < 0 to increase the closed-loop damping ratio of the short period mode. The gain is negative because of the convention that positive control surface deflections create negative moments on the vehicle. As you increase the damping, make sure the short period mode remains second order (oscillatory) and has a closed-loop damping ratio in the range ζsp ∈ [0.3, 1.0] to meet requirements in MIL-STD-1797A [8]. The closed-loop natural frequency of the short period mode will also shift, but should stay within a few rad/s of the original open-loop value. Due to decoupling of the modes and frequency separation, the phugoid mode will generally not be affected by this loop closure. This type of control law is known as an inner-loop stability augmentation system (SAS), and is used to correct the modal characteristics apparent to the pilot to within generally acceptable levels. A block diagram for the loop is shown in Fig. 2. The resulting control law to implement this SAS is δc(t) = δp(t)−Kq q(t) (4) where δp is the pilot command. In this configuration, the pilot input still commands the control surface deflection; the feedback just adds additional inputs to move the closed-loop characteristics of the short period mode. To attenuate the amount of noise injected into the feedback loop, a first-order low-pass filter with the corner frequency around 10 rad/s is commonly used in conjunction with the gain Kq. You may choose to add this filter to your design (and you may certainly adjust the corner frequency), at the cost of added complexity and additional phase lag. In your analysis model, the SAS loop can be closed to obtain the “augmented system” G(s) (shown as the blue dashed block in Fig. 2) using transfer function block-diagram algebra. This G(s) transfer function will serve as the plant model for the control design in the following section. This loop can also be closed using the feedback.m command in MATLAB®. In this latter case, the first argument to the function is the transfer function of the forward path, q(s)/δc(s), and the second argument is the transfer function of the feedback path, Kq and any applied filter. This closed-loop system can be considered an augmented model of the short period dynamics that includes the SAS and elevator actuator. At this point, the pilot still commands the elevator deflection, but there is an extra amount of feedback from the SAS to augment the modes apparent to the pilot, as in Eq. (4). In your documentation, include the following: 1. The transfer function for your augmented system, G(s), as depicted by the blue dashed block in Fig. 2. 2. A screenshot showing your control law implementation in Simulink®. 5 q(s) δ(s) δ(s) δc(s) Kq – δp δc δ q Augmented system, G(s) Figure 2: Longitudinal stability augmentation system block diagram. 3. A comparison of time histories between SAS-off (Kq = 0) and SAS-on (Kq 6= 0) using the nonlinear simulation and a step input. Also add time histories for q(t) based on your nominal open-loop (SAS-off) and closed-loop (SAS-on) short period models. Analysis Part III — Pitch-Rate Command System Design Using your augmented plant dynamics from the previous section, G(s), design an outer-loop pitch-rate command system H(s) to work alongside your inner-loop SAS design. This is shown as a block diagram in Fig. 3. In this control mode, the pilot longitudinal stick commands a desired pitch rate yd(t) = qd(t) for which your control law should track with the output y(t) = q(t) with small error e(t) = qe(t). This rate-command type of system is common in fixed-wing aircraft, particularly at low speeds such as during approach and landing, but is also used in rotary-wing aircraft and spacecraft. G(s)H(s) – qd qe u q Figure 3: Longitudinal pitch-rate command system block diagram. In designing your control law for the pitch-rate command system, your design must meet the following specifications: • The nominal closed-loop system model for q(s)/qd(s) must be stable. • The associated gain margin must be larger than 6 dB and the phase margin must be larger than 45 deg (both in absolute value). You are free to pick the magnitude crossover frequency, but note that for aircraft it is generally two to three times the largest modal frequency of interest [12] (i.e., the short period frequency), and generally resides between 1 to 10 rad/s. • The system must follow constant/step inputs from the pilot with zero steady-state tracking error. 6 • The system must have perfect rejection to constant disturbances, such as steady winds that generate step gust angles of attack αg(t). Note that maneuver Case 2 provided in run hl20.m that will simulate a step change in the angle of attack gust. • Your design must only use the measured pitch rate q(t) for control, i.e., a derivative-free implemen- tation. Although angular accelerometers exist, they are at the present time relatively noisy and not common in aerospace vehicles. • Your control law must produce actuator commands that fall within the actuator capability, as quantified by the position and rate limits of the actuator. A variety of compensators structures and gain values will sufficiently meet these requirements — there is not a single correct design. Determine a simple control law that will do the job, verify your design with the nonlinear simulation, document your results and defend your choices, and then move on. Do not attempt to significantly improve your design over the requirements or optimize your design for a particular set of goals. In your documentation, include the following: 1. A Nyquist analysis proving your nominal model is stable. 2. A Nichols chart with labeled gain and phase margins. 3. The transfer function for your pitch-rate command system. 4. A plot showing the poles and zeros of your closed-loop transfer function q(s)/qd(s). Label each pole and zero indicating its physical origin. For example, you might add the annotations “actuator pole” and “short period zero.” 5. A screenshot showing your control law implementation in Simulink®. 6. Demonstrate the required tracking ability to an appropriate doublet input, and demonstrate the re- quired disturbance rejection capability to an appropriate angle of attack disturbance using the nonlinear simulation, with comparisons to your nominal model. Discuss control activity for this case. 7. How does your system contend with model errors in your plant model of G(s)? Do a multiplicative robustness test for your nominal closed-loop design using (a) The dynamics associated with the phugoid mode, which you identified for Eq. (2c) but neglected in Eq. (3) and the ensuing control designs. (b) The first structural mode of the vehicle, which based on a ground vibration test (GVT) is expected to contribute the mode/poles [s2 + 1.26s+ 3944] to your plant model. What are the implications of these robustness tests? Note that the pilot can be expected to provide some stabilizing feedback, up to about 10 rad/s, and can even be expected to compensate for slow instabilities. Also note that these test considered model structure error and not parametric modeling error. 7 Technical Paper Write-Up Document your results in the form of an AIAA conference paper, to be (hypothetically) presented at the GNC conference held during the SciTech Forum each January. Templates for these conference papers can be found in Ref. [13], formatted in both MS Word and LATEX, by following the links called “Manuscript Tem- plate.” A particularly effective and efficient discussion on technical writing is given in Ref. [14], specifically pages 8–15 on organization. The audience to whom you are writing this paper should include two groups of people. The first group is your instructor, who is looking for the thought process behind your design, your ability to apply skills and concepts from this course, and clear communication. The second group includes peers attending the conference with at least a fundamental understanding of feedback control theory, who may read your paper, listen to your presentation, and ask critical questions of you in front of the live audience. Here is a brief overview of how to structure your paper: • Abstract. Give a few sentences summarizing what was done, what was found, and of what use the work may be. • Nomenclature. Define any symbols not explicitly defined in the text of your paper, including units. • Introduction. Provide a short introduction, say three paragraphs or so, describing what the paper is about and how it is organized. • Body. The body of the text may be split into sections and subsections, as you see fit, to document your design choices and results in a logical fashion. This will be the largest part of the paper, and should include several figures and equations to support your narrative discussion. • Conclusions. Briefly summarize your paper and the main points for the reader, and reflect on the overall work. • References. Include any references that are relevant to your arguments, are useful to the reader, and that supply further evidence to support your statements. 8 References [1] K. Dutton, “Optimal control theory determination of feasible return-to-launch-site aborts for the HL-20 personnel launch system vehicle.” NASA TP-3449, July 1994. [2] B. Jackson, C. Cruz, and W. Ragsdale, “Real-time simulation model of the HL-20 lifting body.” NASA TM-107580, July 1992. [3] B. Jackson and C. Cruz, “Preliminary subsonic aerodynamic model for simulation studies of the HL-20 lifting body.” NASA TM-4302, August 1992. [4] Anon., “Wikipedia / HL-20 personnel launch system.” Personnel_Launch_System, accessed April 2022. [5] Anon., “NASA technical reports server (NTRS).”, accessed April 2022. [6] G. Ware and C. Cruz, “Subsonic aerodynamic characteristics of the HL-20 lifting-body configuration.” NASA TM-4515, November 1993. [7] F. Garza and E. Morelli, “A collection of nonlinear aircraft simulation in matlab.” NASA TM-2003- 212145, January 2003. [8] Anon., “Flying qualities of piloted aircraft.” MIL-STD-1797A, January 1990. [9] D. McRuer, I. Ashkenas, and D. Graham, Aircraft Dynamics and Automatic Control. Princeton, NJ: Princeton University Press, 1973. [10] E. Morelli and V. Klein, Aircraft System Identification: Theory and Practice. Williamsburg, VA: Sun- flyte Enterprises, 2nd ed., 2016. [11] B. Stevens, F. Lewis, and E. Johnson, Aircraft Control and Simulation. Hoboken, NJ: John Wiley & Sons, 3rd ed., 2016. [12] M. Tischler, T. Berger, C. Ivler, M. Mansur, K. Cheung, and J. Soong, Practical Methods for Aircraft and Rotorcraft Flight Control Design. Reston, VA: AIAA, 2017. [13] AIAA, “Technical presenter resources.” Technical-Presenter-Resources, accessed April 2022. [14] S. Katzoff, “Clarity in technical reporting.” NASA SP-7010, March 1964. 9
There are no answers to this question.
Login to buy an answer or post yours. You can also vote on other others

Get Help With a similar task to - Using MATLAB and a paper Writeup

Popular Services
Tutlance Experts offer help in a wide range of topics. Here are some of our top services: