## Frequently Asked Questions

- Which FDC version is compatible with my Matlab/Simulink setup?
- I have Matlab 5.0 and Simulink 2.0. Can I still use the FDC toolbox?
- There aren't any control system design tools included, so why call it 'Flight Dynamics and Control toolbox'?
- Can I use the FDC toolbox on non-Windows systems?
- Is FDC 1.3 compatible with the student edition of Matlab?
- When I open a Simulink system from FDC 1.3 in Simulink 2.2 or newer, I get the following warning message: "Warning: Run 'slupdate('[system name]')' to convert the block diagram to the format of the current version of Simulink". What does this mean?
- How can I use MODBUILD to implement a model of another aircraft?
- When I run a simulation starting with a trimmed flight condition, the aircraft motion is divergent. How can this be possible?
- Can you help me with... (designing an autopilot, building fault-tolerant systems, creating a new fuzzy-logic controller, finding information about adaptive flight controllers, converting the toolbox for a space vehicle simulation, implementing a [specific type of aircraft] model in FDC, creating a simulation of an UAV, ...)?
- Where can I obtain your MSc-thesis "A Simulink environment for Flight Dynamics and Control analysis - application to the DHC-2 'Beaver'"? Do you have an on-line version of this report? Is it useful to obtain this thesis?
- Where can I obtain the report from Tjee and Mulder, "Stability and Control Derivatives of the De Havilland DHC-2 'Beaver' Aircraft"? Is this report available on-line?
- Where can I obtain a hard-copy of the FDC 1.2 user-manual?
- Is it possible to donate money to this project, to show my appreciation?

**Q:**Which FDC version is compatible with my Matlab/Simulink setup?

**A:** FDC 1.2 was designed for Matlab 4.2c / Simulink 1.3; this version is not compatible with Matlab Release 9 (Matlab 5.0 / Simulink 2.0) or *later*! The latest version of this release is FDC 1.2.1, which features some small improvements over the original version, and which is governed by new licensing terms.

FDC 1.3 was designed for Matlab R9 (Matlab 5.1 / Simulink 2.1). This version is not compatible with *earlier* versions of Matlab and Simulink! The latest FDC 1.3 version is FDC 1.3.3, which fixes some problems of earlier FDC 1.3 releases, and comes with a true open source license. FDC 1.3.3 does not add any new functionality to the toolbox itself. FDC 1.3 has been tested successfully with Matlab R11 (Matlab 5.3 / Simulink 3.0) and is therefore expected to be compatible with Matlab R10 (Matlab 5.2 / Simulink 2.2) as well. According to independent user-feedback, this version of the toolbox should also work well under Matlab R12 (Matlab 6/ Simulink 4).

**Q:** I have Matlab 5.0 and Simulink 2.0. Can I still use the FDC toolbox?

**A:** Neither FDC 1.2, nor FDC 1.3 is fully compatible with Matlab 5.0 / Simulink 2.0, so you must make the necessary adaptations yourself. I suggest first to download both versions. Start by trying to run FDC 1.3 first. In particular, try to open each individual Simulink model (that is: each individual MDL-file in the FDC subdirectories) and subsequently save these models to convert them to the Simulink 2.0 model format.

The Mathworks provide some background information about 'downgrading' new Simulink models in their support document 9388: *"Can I open my current Simulink models in previous versions of Simulink?"*, so this might work. Try to run the initialization routine FDCINIT, but if that doesn't work, put all FDC subdirectories into the Matlab path manually. Next, try to run LOADER, INCOLOAD, FIXSTATE, ACTRIM, ACLIN, and TRIMDEMO. With a little luck this will work and no further changes will be necessary.

However, if the above steps turn out to be impossible, you will need to upgrade the FDC 1.2 models instead. Version 1.2 differs from 1.3 in three major areas: (i) the aircraft model is treated as a block-diagram *S-function* instead of a subsystem (this Simulink 1.x feature is not supported by newer Simulink versions), (ii)the models are stored in the Simulink 1.x file format, which differs from later Simulink versions, and (iii) the Simulink models are not compiled before being called by from Matlab programs, as the concept of 'compiling a system' did not exist in Simulink 1.x.

To bypass the first two differences, proceed as follows: first find the FDC 1.2 M-files that corresponds with the FDC 1.3 MDL-files to identify the Simulink models. Next, open and save each model individually to convert them to the new MDL file-format. Next, open a new system, insert an empty Subsystem, and copy the entire contents of BEAVER.MDL to this subsystem. Replace the S-function blocks in the systems OLOOP1, OLOOP2, OLOOP3, APILOT1, APILOT2, and APILOT3 by a copy of this subsystem and fix the connections (this necessitates a Mux-block at the output-side of the subsystem; see appendix E in the user-manual for the I/O definitions). Finally, connect the loose ends in the top-levels of all systems to Ground and Terminator blocks.

To solve the remaining problem, compare the source-codes of the FDC 1.2 tools with the corresponding FDC 1.3 codes to find the places where Simulink systems are pre-compiled, and change the FDC 1.2 code where necessary. Or try to use the FDC 1.3 programs directly - perhaps it will work.

**Q:** There aren't any control system design tools inluded, so why call it 'Flight Dynamics and Control toolbox'?

**A:**The FDC toolbox implements nonlinear simulation models within the Matlab/Simulink environment. These models can be used for flight simulation and flight dynamics research, they can be studied to understand the general structure of the equations of motion, and they can be accessed by a multitude of Matlab tools. There are a number of very powerful toolboxes for control system design, both from The Mathworks and other parties, making the Matlab environment particularly useful for flight control system design.

The FDC toolbox does not intend to copy the functionality from those toolboxes. Instead, it focuses on offering easy access to the dynamic models and it provides some basic tools for dealing with those models. Flight control system design is a major *potential* application of the toolbox, as illustrated by the 'Beaver' autopilot case study, but it is up to the user to select which other Matlab toolboxes are required for such tasks. The toolbox itself is a direct spin-off from the 'Beaver' autopilot project, as outlined on the objectives page.

It is planned to expand the autopilot case study, and include additional tools for flight dynamics analysis in future versions of the toolbox.

**Q:** Can I use the FDC toolbox on non-Windows systems?

**A:** Although I haven't been able to test it myself, I believe that the latest FDC versions are pretty much system-independent. However, if you use FDC 1.2, you may encounter some problems which are caused by platform-specific path-declarations. See the list of known problems for more information.

**Q:** Is FDC 1.3 compatible with the student edition of Matlab?

**A:** Well, to start with, there are two different student versions of Matlab: the Prentice Hall 'Student Version' and the 'Student Edition' from The Mathworks. Only the last package includes Simulink, and hence, only the last version in theory could be suitable for the FDC toolbox. (For questions about these student versions, contact The Mathworks.)

The 'Student Edition' has one major limitation that may affect the usability of the FDC toolbox: the maximum number of blocks in a Simulink system is limited. Since I don't know the exact limit and haven't counted the number of blocks in FDC 1.3, I can't tell whether that will limit the use of the FDC toolbox. The autopilot model in particular is quite large, so problems may be expected there.

If necessary, the number of blocks can be reduced. In the aircraft model, you can safely delete the subsystem 'Additional Outputs Group' and the blocks AIRDATA2 and AIRDATA3 from the 'Airdata Group'. In addition, all title blocks can be deleted from the Simulink block-diagrams (including the ones in the Masked subsystems), although this will break the on-line HTML help links. Simplified versions of the full autopilot model APILOT3 are already available (APILOT1 and APILOT2), but here too the title blocks can be removed if required.

However, even if that still isn't sufficient to run the toolbox in the 'Student Edition', you may still want to take a look at the user-manual; it contains much information that may be useful if you decide to build a flight simulation model yourself.

**Q:** When I open a Simulink system from FDC 1.3 in Simulink 2.2 or newer, the following warning message is displayed:

`Warning: Run 'slupdate('[system name]')' to convert the block diagram to the format of the current version of Simulink`

What does this mean?

**A:** Version 1.3 was designed for Matlab 5.1 / Simulink 2.1. It *is* compatible with Matlab 5.3 / Simulink 3.0, and should work with Matlab 5.2 / Simulink 2.2 too. However, if you try to open Simulink 2.1 systems in a newer Simulink version, you will receive the above mentioned warning message.

To eliminate this warning, just follow the instructions in the warning message itself: after opening the system, run `slupdate` and save the system thereafter. If you re-open the saved system the warning message will be gone. Some Matlab utilities from the FDC toolbox may also generate warning messages when using Matlab 5.2 or newer. While those warning messages can be turned off with the `warning off` command, it is recommended to take appropriate action as indicated in the message. Matlab warnings differ from errors in that they don't stop program execution and usually don't affect the results.

**Q:** How can I use MODBUILD to implement a model of another aircraft?

**A:** I'm afraid it's not as simple as that. Unfortunatly, the name MODBUILD.M raises false expectations regarding its function. In reality, this routine does two things only: it defines the model parameter matrices (as defined by the user in the source code!) and it saves these parameters to a datafile for later use. To implement a model of another aircraft, here's the recipe in a nutshell:

- create a copy of BEAVER.MDL (e.g. copy the model to B747.MDL if you want to implement a Boeing 747 model),
- identify the aircraft-dependent blocks in this model,
- replace these blocks by equivalent functions for the new aircraft model,
- if necessary, fix the input/output lines for the new model,
- create a copy of MODBUILD.M (e.g. B747_PARAMS.M),
- replace all Beaver-specific parameters by the required parameters for the new aircraft model,
- fill in the inertia data, mass, and geometrical data for the new aircraft model,
- check whether it is necessary to create customized versions of ACTRIM and ACLIN for the new aircraft model.

Obviously, the aircraft-dependent blocks mentioned in step 2 can be found in the subsystems 'Aerodynamic Group' and 'Engine Group', but you also may have to update the block XDOTCORR in 'Aircraft Equations of Motion' (or delete this blok altogether if it's not needed anymore). The Beaver-specific parameters in step 6 are the parameters for the aerodynamic model (`AM`) and the engine model (`EM`). Depending on the form of the replacement models in step 3, the new parameters for MODBUILD may be similar or totally different from these two matrices; it is entirely up to the user to decide how to implement these new submodels and how to store their parameters.

**Q:** When I run a simulation starting with a trimmed flight condition, the aircraft motion is divergent. How can this be possible?

**A:** No numerical trimming algorithm is 100% accurate; some derivatives will remain (slightly) non-zero no matter how tightly the cost-function for the optimization algorithm is tuned. The divergent motion is mainly caused by initial rolling and side-slipping movements, which cause the bank angle of the aircraft to slowly increase. That, in turn, effectively decreases the lift, which will result in a decreasing pitch angle, yielding a spiralling downward motion. Although I think the aircraft model is rather pessimistic about the directional stability of the 'Beaver', this behaviour is certainly not unexpected, as the spiral motion of the actual 'Beaver' aircraft is indeed not (or just barely) stable.

Now if one artificially disables the asymmetrical motions by means of the FIXSTATE utility, the resulting pitch angle will still be non-constant, but this time it will stabilize around its initial value. Perhaps it will be possible to achieve better results by tightening the minimization criteria, and it is quite possible that better initial guessing (based on available knowledge about the aircraft motions) may further enhance trimming accuracy. The only way to find out right now is to experiment a little with the trimming parameters in the source code of ACTRIM. A complete re-design of the ACTRIM program is in the planning, but this will not be available soon. Even with increased accuracy, ACTRIM will still return approximate results for a (momentary) steady flight condition only; don't expect miracle results.

It should be noted that the default trimmed flight conditions were obtained for a fixed value of the engine manifold pressure, which in general yields a non-zero flight-path angle. These conditions correspond with the conditions used in the report by Tjee and Mulder (ref.[26] from the FDC report). Using trimmed flight results for zero flight-path angle (allowing the manifold pressure to be varied) yields better results, with virtually no initial variation in altitude. Both conditions can be selected in the ACTRIM program.

**Q:** Can you help me with... (designing an autopilot, building fault-tolerant systems, creating a new fuzzy-logic controller, finding information about adaptive flight controllers, converting the toolbox for a space vehicle simulation, implementing a [specific type of aircraft] model in FDC, creating a simulation of an UAV, ...)?

**A:** I wish I had the time to do all that. Unfortunately, I do not, so the answer is: no. However, to help at least a little bit, I have created a separate page with many useful links to specialized search engines and web-directories that may help to get you started.

**Q:** Where can I obtain your MSc-thesis "A Simulink environment for Flight Dynamics and Control analysis - application to the DHC-2 'Beaver'"? Do you have an on-line version of this report? Is it useful to obtain this thesis?

**A:** A scanned version of my MSc-thesis can be downloaded in PDF format via the Other Downloads page of this website. A printed version of the thesis can be ordered via the printing-on-demand service of Lulu.com. The shipping costs are a bit steep, but the print and binding quality is good, and there are no surcharges to the manufacturing costs. For complaints and questions about delivery, you should contact Lulu.com, but as the author of these works I am also interested in your experience with this service. Visit the DutchRoll store at Lulu.com for more information.

Another possibility is to order the thesis via the STI database of NASA; the report is listed as report number NONP-NASA-SUPPL-DK-94-28027. I have never used this service myself, but NASA claims to be able to distribute hard-copies on paper or microfiche on request. However, this service is quite expensive, and as most information from the MSc-thesis is also covered in the FDC user-manual, it may not be worth the costs.

**Q:** Where can I obtain the report from Tjee and Mulder, "Stability and Control Derivatives of the De Havilland DHC-2 'Beaver' Aircraft"? Is this report available on-line?

**A:** This report was published at the Faculty of Aerospace Engineering of Delft University of Technology under report number LR-556. As far as I know, it is out of print, but you may still be able to obtain, or hire, a version at the DUT Library. However, I don't know if, and how, the university will handle such requests. Otherwise, try contacting someone at the Control & Simulation department itself.

**Q:** Where can I obtain a hard-copy of the FDC 1.2 user-manual?

**A:** A hard-copy of this report is not available. The next version of the FDC documentation will probably be distributed via the Lulu.com printing-on-demand service, but that is still a work in progress.

**Q:** Is it possible to donate money to this project, to show my appreciation?

**A:** Yes, I accept donations via PayPal. Of course, this is entirely optional; the software and documentation on this website are entirely free, and there are no plans to change this in the future. If you experience issues with the donation system, it is recommended to visit the PayPal Help Center or contact PayPal for assistance.