📄 level1.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="fdchelp.css">
<title>
FDC help: Level 1
</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body bgcolor="#DDDDDD"><div>
<h2>
Level 1 of the system <i>Beaver</i>
</h2>
<p>The first level of the <i><a href="beaver.htm">Beaver</a></i> model
contains the <i>Inport</i> and <i>Outport</i> blocks to and from the
non-linear aircraft model, <i>To Workspace</i> blocks to store the input
and outputvectors and a time-vector in the Matlab workspace,
<i>Mux</i> blocks to combine the scalar signals from the different
<i>Inport</i> blocks into vector signals, and <i>Demux</i> blocks to extract
scalar output signals from the different output vectors.</p>
<p>The actual model of the 'Beaver' dynamics is contained in the subsystem <i><a href="level2.htm">Beaver dynamics and output equations</a></i> (shortly denoted
as <i>Level 2</i>), whereas the first level (in short: <i>Level 1</i>) was created for input/output handling only.</p>
<p>Please notice that the current model architecture is still influenced visibly by limitations of earlier Simulink versions, which is e.g. reflected by the use of scalar <i>Inports</i> and <i>Outports</i> in <i>Level 1</i> of the system. In future versions of the toolbox, it is planned to either eliminate this I/O level altogether, or at least simplify this level as far as possible.</p>
<h3>
Connection I/O versus Workspace I/O
</h3>
<p>It is important to notice that the number of outputs which are send to the
Matlab workspace by means of <i>To Workspace</i> blocks is considerably
larger than the number of <i>Outport</i> blocks in <i>Level 1</i>. The latter make it possible to connect the aircraft model to other systems, such as automatic flight controllers or sensor models, and to access the system <i>Beaver</i> directly from the Matlab workspace, while the results which are sent to the workspace are meant primarily for post-simulation analysis.</p>
<p>For practical reasons, it was decided to connect only the sixteen outputs which were needed to simulate the
'Beaver' <a href="apilot.htm">autopilot models</a> to <i>Outport</i> blocks; all other outputs are sent to the workspace only. If that list of 'connection outputs' is not sufficient for certain applications, it will be necessary to add more <i>Outport</i> blocks to the first level of the aircraft model. Similarly, if different inputs are required, more <i>Inport</i> blocks may have to be added. For instance: if you want to examine new control laws that use accelerations as reference signals, these signals must be connected to new <i>Outport</i> blocks in the first level of the <i>Beaver</i> model; currently the acceleration outputs are sent to the Matlab workspace only.</p>
<p>However, please be aware that changes in the I/O definitions of <i>Level 1</i> may affect other systems that make use of the aircraft model, as well as Matlab programs that access this model. For this reason, if I/O changes are really necessary, it is probably a better idea to create an independent copy of the aircraft model first (copy from the model library, then break the library links!) and modify this copy, rather than the original.</p>
<h3>
'Connection inputs'
</h3>
<pre>
deltae, deltaa, deltar, deltaf, n, pz, uw, vw, ww,
uwdot, vwdot, and wwdot
</pre>
<p>If you want to access the system <i>Beaver</i> directly from the Matlab command-line, a vector of length twelve must be used as inputvector:</p>
<pre>
u = [deltae, deltaa, deltar, deltaf, n, pz, uw, vw, ww,
uwdot, vwdot, wwdot]'
</pre>
<p>During simulations, the time-trajectories of these twelve 'connection inputs' will be sent to the matrix <i>In</i> in the Matlab workspace.</p>
<h3>
'Connection outputs'
</h3>
<pre>
V, alpha, beta, p, q, r, psi, theta, phi, xe, ye, H,
Hdot, pb/2V, qc/V, rb/2V
</pre>
<p>The first thirteen outputs (i.e. the twelve state variables and the climb velocity <i>Hdot</i>) are needed
by the control laws of the 'Beaver' autopilot; the last three
outputs (dimensionless rotational velocities) are needed by the linear
state-space model of the dynamics of the steering column/steering wheel,
cables, control surfaces, and hydraulic actuators, used in the
'Beaver' autopilot. These sixteen 'connection outputs' form
a subset of the 89 outputs which are sent to the matrix <i>Out</i> in the
Matlab workspace during simulations.</p>
<p>See the lists of <a href="inputs.htm">input</a> and <a href=
"outputs.htm">output</a> variables for the exact definitions of these
signals.</p>
<h3>
'Workspace inputs' and 'workspace outputs'
</h3>
<p>There are three <i>To Workspace</i> blocks in <i>Level 1</i>. The first one is used to send
the inputs to the system <i>Beaver</i> to the matrix <i>In</i> in the
Matlab workspace, including the wind and turbulence velocity components and
their time-derivatives. The second <i>To Workspace</i> block sends
<i>all</i> outputs to the matrix <i>Out</i> in the Matlab workspace. In
order to be able to plot the results against time, a third <i>To
Workspace</i> block is connected to a <i>Clock</i> block, which yields a
time-axis in the vector <i>time</i>.</p>
<p>Simulation results can thus be plotted by typing:</p>
<pre>
plot(time,Out(:,1))
plot(time,In(:,6))
</pre>
<p>and so on. The exact definitions of the matrices <i>In</i> and <i>Out</i>
can be found by double-clicking the corresponding <i>Mux</i> blocks in the
first level of <i>Beaver</i>, or by viewing the complete lists of <a href=
"inputs.htm">inputs</a> and <a href="outputs.htm">outputs</a> (or by consulting the FDC user-manual).</p>
<h3>
The macro <i>RESULTS</i>
</h3>
<p>Instead of directly using the matrices <i>In</i> and <i>Out</i> for
plotting and analyzing simulation results, it is also possible to run
the Matlab program <i><a href="results.htm">RESULTS</a></i> first. This program will
extract the trajectories of individual inputs from the vector <i>In</i> and
the trajectories of individual outputs from the vector <i>Out</i>. The
plot commands given above can then be replaced by:</p>
<pre>
plot(time,V)
plot(time,pz)
</pre>
<p>Note: <i>RESULTS</i> can be used only for the default definitions of the
matrices <i>In</i> and <i>Out</i>, as used in the current implementations of the <i>Beaver</i> model. If you change these definitions, it will be necessary to adapt the source-file <small>RESULTS.M</small> also.</p>
<h3>
More information
</h3>
<p>See the lists of <a href="inputs.htm">inputs</a>, <a href=
"outputs.htm">outputs</a>, and <a href="colors.htm">color definitions</a>
for more details about the <i><a href="beaver.htm">Beaver</a></i> model and the other FDC block-diagrams. See the description of <i><a href="level2.htm">Level 2</a></i> for more information about the actual structure of the aircraft model.</p>
</div></body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -