Skip to content

Commit

Permalink
Removed :name: directives as advised by Henry
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Nov 30, 2023
1 parent cc379ed commit f95a474
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions copter/source/docs/systemid-mode-operation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ main loop frequency divided by a sub-sample factor.
The next figure depicts the :ref:`SID_AXIS<SID_AXIS>` injection points in yellow and some details of the most inner PID loops when :ref:`ATC_RATE_FF_ENAB<ATC_RATE_FF_ENAB>` == 0.

.. image:: ../images/ArduCopter4.1-PID-loops_FF_dis.png
:name: fig-ArduCopter4.1-PID-loops_FF_dis
fig-ArduCopter4.1-PID-loops_FF_dis

The next figure depicts the :ref:`SID_AXIS<SID_AXIS>` injection points in yellow and some details of the most inner PID loops when :ref:`ATC_RATE_FF_ENAB<ATC_RATE_FF_ENAB>` == 1.

.. image:: ../images/ArduCopter4.1-PID-loops_FF_en.png
:name: fig-ArduCopter4.1-PID-loops_FF_en
fig-ArduCopter4.1-PID-loops_FF_en


Identification of a Multicopter
Expand All @@ -129,13 +129,13 @@ This ensures that the waveforms at the inputs of the plant model are mostly chir
With the default controller parameters, which are quite low, the magnitude of the rate controller outputs are relatively low.

.. image:: ../images/ControlSystemDiagram.png
:name: fig-ctrl-sys-ardupilot
fig-ctrl-sys-ardupilot

Model Structure
---------------

.. image:: ../images/bodyDiagramQuad.PNG
:name: fig-body-diagram
fig-body-diagram

The quadcopter model is based on its equations of motion.
Looking at the quadcopter as a rigid body, it has 6 degrees of freedom, consisting of three translational and three rotational motions.
Expand All @@ -145,21 +145,21 @@ Its axes are represented by the vectors (:math:`b_{x}`, :math:`b_{y}`, :math:`b_
The equations of motion within the body-fixed frame can be expressed as

.. image:: ../images/EquationsOfMotion.PNG
:name: fig-eq-motion
fig-eq-motion

where :math:`u`, :math:`v` and :math:`w` are the velocities in :math:`b_{x}`, :math:`b_{y}`, :math:`b_{z}` direction respectively, whereas :math:`p`, :math:`q`,
:math:`r` represent the angular velocities about the :math:`x`, :math:`y` and :math:`z` axis of the body-frame.
The variables :math:`X`, :math:`Y`, :math:`Z` and :math:`L`, :math:`M`, :math:`N` represent forces and torques acting on the airframe due to thrust :math:`T_i` and reaction torque :math:`Q_i` generated by the propellers as well as external forces and moments caused by air resistance and wind. [#f2]_
:math:`\phi` and :math:`\theta` are the Euler angles, that describe the orientation of the copter within the earth-frame. Thrust and reaction torque can be calculated by the following equations

.. image:: ../images/EquationsThrustReactionTorque.PNG
:name: fig-eq-thrust-torque
fig-eq-thrust-torque

with :math:`\omega_i` being the propellers angular velocity and :math:`C_T` as well as :math:`C_Q` standing for constants dependent on the propeller geometry.
Based on these two quantities, the created forces and torques by the propulsion system acting on the copter's airframe for an X-configuration can be written as

.. image:: ../images/EquationForceTorqueAllocation.PNG
:name: fig-eq-force-torque-prop
fig-eq-force-torque-prop

where :math:`d` represents the arm length between the respective propeller and the airframe's center of gravity, while :math:`\varphi_i` stands for the angle of the propeller's arm in regard to the :math:`b_x` axis of the copter. [#f3]_
:math:`\Gamma` is called the allocation matrix.
Expand All @@ -171,28 +171,28 @@ This assumes that the parameter :ref:`MOT_THST_EXPO<MOT_THST_EXPO>` has been :re
As an example, the lateral velocity :math:`u` can then be expressed by its stationary condition :math:`u_0` and its perturbation :math:`\Delta u`

.. image:: ../images/SmallPertU.PNG
:name: fig-eq-small-pert-u
fig-eq-small-pert-u

While hovering, the stationary condition of every state and input quantity is 0, since there is no translational or rotational motion of the vehicle. [#f4]_
The equations of motion can then be simplified to

.. image:: ../images/equationsOfMotionLin.PNG
:name: fig-eq-motion-lin
fig-eq-motion-lin

This linearization removes the interdependencies between the pitch, roll and yaw motions of the copter, thereby yielding three decoupled systems.
Next, the perturbations in each force and torque are modeled to obtain the influences of these system inputs on the state variables.
By using a Taylor series expansion, the forces and torques are described as a linear function of the disturbances in the state and input variables that they depend on.
The coefficients of each state variable are the so-called stability or control derivatives of the respective force and torque. [#f4]_ [#f5]_

.. image:: ../images/perturbedForcesTorques.PNG
:name: fig-eq-pert-forces-torques
fig-eq-pert-forces-torques

By inserting these descriptions of forces and torques, the linearized equations of motion are rewritten in a state-space representation,
with the control forces :math:`F_{c}` and torques :math:`M_{c}` generated by the propellers being the model inputs.
Since only perturbed quantities are contained in the equations, the :math:`\Delta` indicating the small perturbations is left out.

.. image:: ../images/equationsOfMotionLinPerturbation.PNG
:name: fig-eq-motion-lin
fig-eq-motion-lin

The actual control inputs of the system are the rate controller outputs as shown in the :ref:`control diagram<fig-ctrl-sys-ardupilot>`.
The motor mixer converts the controller outputs to thrust demands for each motor.
Expand All @@ -207,13 +207,13 @@ The acceleration or deceleration of the motor leads to an additional, dynamic re
The transfer function can then be written as

.. image:: ../images/motorModel.PNG
:name: fig-eq-motor-model
fig-eq-motor-model

The thrust demands of the motors are calculated from the controller outputs by inverting the :ref:`allocation matrix<fig-eq-force-
torque-prop>` [#f9]_

.. image:: ../images/ctrlOutputsToThrstCmds.PNG
:name: fig-eq-ctrlout-thrstCmds
fig-eq-ctrlout-thrstCmds

As a consequence, the inverted matrix above and the :ref:`allocation matrix<fig-eq-force-torque-prop>` cancel each other out,
thereby leaving the following four separated control paths: heave, roll, pitch and yaw.
Expand All @@ -223,7 +223,7 @@ To model this in a state-space representation, control forces and torques are ad
The state-space models for the roll, pitch and yaw axis are formulated as

.. image:: ../images/axisModels.PNG
:name: fig-eq-axis-models
fig-eq-axis-models

The used transfer function model of each axis is derived from the state-space models above through Laplace-Transformation and
by solving for the angular velocities :math:`p`, :math:`q` and :math:`r` as the outputs of each model.
Expand All @@ -232,7 +232,7 @@ Also, dead time terms are added to account for delays, that were not regarded in
These three transfer functions represent the model structures used in the identification for the pitch, roll and yaw axes.

.. image:: ../images/axisModelsTf.PNG
:name: fig-eq-axis-models-Tf
fig-eq-axis-models-Tf


Example of Identification Process
Expand Down Expand Up @@ -299,15 +299,15 @@ The reason for the sweep attenuation is the amplified controller output due to t
Although attenuated, the system excitation is still large enough to obtain a reliable frequency response with a sufficiently high coherence as shown in the following paragraph.

.. image:: ../images/rollSweepPlantInput.png
:name: fig-sweep-rll
fig-sweep-rll


.. image:: ../images/pitchSweepPlantInput.png
:name: fig-sweep-pit
fig-sweep-pit


.. image:: ../images/yawSweepPlantInput.png
:name: fig-sweep-yaw
fig-sweep-yaw

The frequency response of each axis is obtained through spectral analysis of the flight data.
Only test flights with a sufficient coherence between input and output are used for the system identification.
Expand All @@ -316,35 +316,35 @@ The following diagrams show the data-based frequency responses of all three axes
The bottom plot shows the coherence between input and output which quantifies the linearity between input and output.

.. image:: ../images/bodeDataRll.png
:name: fig-bode-data-rll
fig-bode-data-rll


.. image:: ../images/bodeDataPit.png
:name: fig-bode-data-pit
fig-bode-data-pit


.. image:: ../images/bodeDataYaw.png
:name: fig-bode-data-yaw
fig-bode-data-yaw

The composite frequency responses are used to determine the parameters of the :ref:`transfer function models<fig-eq-axis-models-Tf>`.
The parameters of the plant model transfer functions are optimized to maximize their fit to the collected real-world data frequency responses.
The result is shown in the following three figures.

.. image:: ../images/bodeTfRll.png
:name: fig-bode-data-rll
fig-bode-data-rll


.. image:: ../images/bodeTfPit.png
:name: fig-bode-data-pit
fig-bode-data-pit


.. image:: ../images/bodeTfYaw.png
:name: fig-bode-data-yaw
fig-bode-data-yaw

The derived transfer function models are as follows:

.. image:: ../images/identifiedAxisModelsTf.PNG
:name: fig-identified-models
fig-identified-models

Example of Identification Results and Model Verification
--------------------------------------------------------
Expand All @@ -364,43 +364,43 @@ As seen in the following three figure, each model is capable of reproducing the
Roll:

.. image:: ../images/modelValidationSweepRoll.png
:name: fig-val-sweep-rll
fig-val-sweep-rll

Pitch:

.. image:: ../images/modelValidationSweepPitch.png
:name: fig-val-sweep-pit
fig-val-sweep-pit

Yaw:

.. image:: ../images/modelValidationSweepYaw.png
:name: fig-val-sweep-yaw
fig-val-sweep-yaw

Since the frequency-sweeps are used for the identification, it is important to test the models against another test signal to check for their robustness.
A widely recommended verification signal is the so called doublet maneuver that is basically a double step [#f8]_.
For time-domain validation, a similar signal is used as the input of the stabilize controller.
As shown in the following figure for the roll axis, it consists of two consecutive doublet maneuvers.

.. image:: ../images/modelValidationDoublet.png
:name: fig-val-doublet
fig-val-doublet

The next three figures contain the angular rates of the axis models compared to the measured ones during the validation flights.
Due to the high fitting between model outputs and measured angular rates, the fidelity of the models is seen as satisfactory.

Roll:

.. image:: ../images/modelValidationRollAng.png
:name: fig-val-doublet-rll
fig-val-doublet-rll

Pitch:

.. image:: ../images/modelValidationPitchAng.png
:name: fig-val-doublet-pit
fig-val-doublet-pit

Yaw:

.. image:: ../images/modelValidationYaw.png
:name: fig-val-doublet-yaw
fig-val-doublet-yaw


.. rubric:: References
Expand Down

0 comments on commit f95a474

Please sign in to comment.