0% found this document useful (0 votes)
13 views11 pages

Control Lab5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Control Lab5

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Master in Aerospace Engineering

Control I

Representation and Analysis of Dynamic


Systems

Authors :
Andrea Talamonti, Aldo Tonnini

November 24, 2024


1 Introduction

Figure 1: the Quanser Aero experiment configured as a half quadrotor system

The Quanser Aero Experiment setup is a versatile and sophisticated system designed to simulate
the dynamics of a half-quadrotor configuration. In this setup, the front and back rotors are
aligned horizontally to the ground, enabling controlled motion primarily about the yaw axis.
By varying the direction and rotational speeds of the rotors, it is also possible to adjust the
pitch axis angle, providing greater flexibility in simulating aerial dynamics.
In previous laboratory sessions, the fundamental electrical and mechanical characteristics of
the system were studied in detail. These sessions involved deriving and analyzing the governing
equations of motion, which describe the relationships between the system’s inputs, such as
voltage, and outputs, such as angular position and thrust. Laboratory sessions 3 and 4 laid the
groundwork for modeling these dynamics in MATLAB and Simulink, creating a platform for
further exploration of the system’s behavior.
The focus of the current laboratory session is to build upon this foundation by implement-
ing and validating a closed-loop controller. This controller, developed in Lab 4, is designed to
precisely regulate the system’s response to changes in desired angular positions. The experi-
mental validation involves comparing the real-world behavior of the Quanser Aero system with
the predicted results from MATLAB Simulink simulations. By juxtaposing these results, the
accuracy of the model and the effectiveness of the control strategy can be evaluated, providing
valuable insights into the dynamics and controllability of aerial systems.

2 Experimental Setup and Procedure


2.1 Modelling of the Electrical and Mechanical part
Prior to the analysis of the full system, it was necessary to model in Simulink the actual motors
powering it. Below, figures of such scheme and of the Simulink model. The Quanser Aero
is equipped with two thruster modules, each powered by a DC motor. The DC motor shaft
is linked to the propeller hub, which is a collet clamp utilized for propeller mounting onto
the motor. We formulated the electrical and mechanical differential equations governing the
system. The input is denoted as voltage V (t), and the output is represented by the thrust
F(t). I(t) is output [3], output [2] is the propeller rotation speed Ω and output [1] is the thrust.

1
Figure 2: Motor architecture.

Figure 3: Motor on Simulink.

Having determined the equilibrium point and analyzed the system’s properties, the mechan-
ical system has been derived:

Figure 4: Mechanical system.

We can now analyze the behavior of the entire system using the Bode diagram: The objective
was to design a control law for the pitch angle of the quadrotor. The target was to achieve a
closed-loop bandwidth of 2 rad/s, starting from the full nonlinear model. The system exhibited
poor damping with proportional control, and for Kp = 74, it became unstable.

2
Figure 5: Left: Bode diagram for the open-loop mechanical system. Right: Step response for
the same system: poorly damped.

Figure 6: Proportional (P) controller: a value of kp = 74 rendered the system unstable.

To address this issue, an inner loop with derivative action was introduced, aiming for a higher
bandwidth of 7 rad/s. A straightforward controller F = Gs was implemented with G = 0.1.
Additionally, the Kv value was recalculated to approximately 70. For the outer loop, the pure
proportional controller was fine-tuned to achieve the desired bandwidth, resulting in Kp = 141
(PD controller). The implementation of a full PID controller will be evaluated in the later

Figure 7: Left: Bode diagram for the open loop of the PD mechanical system. From here the
value of kp for a bandwidth of 2 rad/s has been obtained. Right: Step response for the closed
loop PD system: well damped, but the static error is still not zero.

3
section, aimed at eliminating static error.

3 Open-Loop Analysis
To begin the analysis, an open-loop simulation of the system was conducted. The Simulink
model incorporates both the real system and the simulated system, as shown in Figure 8. An
input step signal with an amplitude of 10 V was applied at t = 2 seconds in the simulation.
A preliminary simulation was performed to ensure that the input voltage remained below 24
V, and the amplitude of oscillations during upward and downward motion was acceptable
(i.e., below 30°). After confirming these parameters, a second 40-second simulation was run in
external mode (hardware) to capture the real system’s response, denoted as θR .
Following this, the open-loop non-linear Simulink model was simulated, and its results were
compared to those of the real system. The non-linear system’s response is denoted as θN L .

Figure 8: Open-Loop Simulink Model of the System.

As observed in in Table 1, the initial open-loop Simulink model exhibited significant discrep-
ancies in both transient and steady-state responses compared to the real system. To minimize
this error, two parameters were fine-tuned: k4 (propeller constant) and Dp (pitch axis viscosity).
These parameters directly influence the system’s motion, θ. Several iterations were conducted
to find optimal values for these parameters, and the error was quantified using the sum of
squared differences as shown in Equation 1:
X
Error = (θR − θN L )2 (1)

Test k4 Dp Error
1 6.23 × 10−7 0.0071 98.668
2 8 × 10−7 0.0078 6.930
3 8 × 10−7 0.0090 4.410
4 8 × 10−7 0.0095 3.975

Table 1: Error calculation for different values of k4 and Dp .

Starting from the initial values used in Lab 4 (Test 1), the propeller constant k4 was adjusted
to match the amplitude of oscillations. Next, Dp was fine-tuned to minimize the error further,
as seen in Table 1. The final values of k4 and Dp , corresponding to Test 4, provided a good

4
enough fit to the real system. Figure 9 demonstrates the comparison between the real system
and the simulated responses after parameter adjustments. It can be observed that the fine-
tuned Simulink model closely approximates the real system’s response.

Figure 9: Comparison of Real System (θR ) and Simulated System (θN L ) Responses after Pa-
rameter Adjustment.

Through this iterative tuning process, the simulated system’s response was successfully
aligned with the real system, validating the open-loop model and ensuring its accuracy for
subsequent closed-loop control design.

4 Closed-Loop Control
To enhance the system’s performance, a closed-loop control strategy was implemented using
a Proportional-Derivative (PD) controller. The PD controller, first introduced in laboratory
session 4, was designed to modify the open-loop system’s transfer function (following the idea
of loop-shaping), improving the dynamic response and stability of the system. Specifically, the
proportional term increases the system’s bandwidth, resulting in faster tracking of the reference
input, while the derivative term counteracts rapid changes in error, reducing oscillations and
overshooting and enhancing overall stability.

Figure 10: Closed-Loop with PD controller Simulink Model of the System.

The initial parameters from Lab 4, kp = 141 and kv = 70, were determined to provide 2
rad/s of closed loop bandwidth. These parameters yielded a well-damped system with minimal
overshoot. As shown in Figure 11, the step response of the real system demonstrated good
behavior, with a fast settling time. This validated the chosen parameters and confirmed their
effectiveness in satisfying the system’s design requirements.

5
Figure 11: Step response of the closed-loop real system with initial parameters (kp = 141,
kv = 70).

To further investigate the system and explore potential improvements, the proportional gain
kp was increased to 200 while maintaining kv = 70. This adjustment accelerated the system’s
response, as evidenced by a faster rise time and shorter settling time, and even lower, but not
zero, static error. However, as seen in Figure 13, the higher kp introduced significant overshoot
and oscillations, reducing the system’s stability. This behavior was attributed to the reduction
in phase margin caused by the increased proportional gain. While the faster response may be
advantageous in certain scenarios, the stability trade-off rendered this configuration unsuitable
for the mission’s requirements. We then proceeded to increase the value of kv = 100. Such
solution eliminated overshooting and preserved the improvements made in terms of reduction
of the static error, but at the same time it increased settling time. We could have gone further
by increasing continuously kp , kv , eventually reaching a condition of almost zero static error,
but in doing so we would have saturated the system for longer periods of time, losing on
the requirement of minimizing saturation, which could lead to a fault in the system nominal
operation.

Figure 12: Step response of the closed-loop real system after increasing kp to 200 (kv = 70).

6
Figure 13: Step response of the closed-loop real system after increasing kp to 200 (kv = 100).

Analysis and Conclusion


Indeed, the initial parameters (kp = 141, kv = 70) proved to be the most effective configuration
for this control system given the requirements in bandwidth and considering that, to reach a
null steady state error while preserving stability and avoiding extensive saturation, increasing
kp and kv is not the solution. This configuration exhibited small overshoot, and rapid sta-
bilization, meeting all performance criteria with a settling time of approximately 1.3 seconds.
The increased kp configuration, while faster, compromised system stability by introducing ex-
cessive overshoot and oscillations, highlighting the importance of balancing speed and stability
in control design.
But we still did not manage to erase static error: we want the output to follow the input
as closely as possible.

5 Integral Effect
To address the limitations of the PD controller, particularly its inability to completely eliminate
static error, an integrator was added to the controller to form a PID control strategy. The
integrator improves system performance by increasing the gain at low frequencies, thereby
ensuring static error elimination. Unlike proportional and derivative actions, the integral term
enhances the system’s low-frequency response without significantly affecting phase at those
frequencies, maintaining overall system stability. The integral gain is defined as:
 ωi 
kp 1 +
s
where ωi represents the integral bandwidth. Tuning ωi has a direct impact on the system’s
damping and stability:

• Higher values of ωi increase the integrator’s bandwidth, resulting in faster error correction
but introduce oscillations and overshoot due to reduced damping.

• Lower values of ωi improve damping and reduce oscillations but slow the static error
correction process.

The Simulink implementation of the PID controller is shown in Figure 14. Various values of ωi
were tested to evaluate the system’s behavior.

7
Figure 14: Simulink model of the closed-loop system with integral effect (PID controller).

Performance Evaluation for Different ωi Values


Case 1: ωi = 2ωCL When ωi was set to 2ωCL , the system demonstrated fast static error cor-
rection. However, the response exhibited significant oscillations and a low damping ratio. This
configuration sacrificed stability for speed, making it unsuitable for the mission requirements.

Case 2: ωi = ωCL Reducing ωi to ωCL improved the system’s stability, as the damping
ratio increased and oscillations were significantly reduced. The response results in improved
damping, though slight oscillations remain. While acceptable, further tuning was performed to
refine the system’s behavior.

Figure 15: Step response of the PID real system with ωi = ωCL .

Case 3: ωi = ωCL 2
Lowering ωi to ωCL
2
provided even greater damping and stability: oscilla-
tions were nearly eliminated, resulting in a smoother response. However, the response remained
slightly underdamped, indicating room for further optimization.

8
Figure 16: Step response of the PID real system with ωi = ωCL
2
.

Case 4: Optimal Tuning: ωi = ω2.27 CL


The optimal value of ωi was determined to be ω2.27
CL
. As
shown in Figure 17, this configuration provided a well-damped response with minimal overshoot
and a negligible static error. The system met all mission requirements:
• Overshoot: approximately 2% of the static value, which is acceptable given the specifica-
tions.
• Static Error: nearly zero, ensuring accurate tracking of the reference input.
• Settling Time: approximately t = 1.3s s, meeting the requirement for rapid stabilization.
• Very limited spike of saturation at 25 Volts.
We suspected wi had to be lower then the closed system bandwidth, because of the way the
integral effect affects frequencies lower then wi , while leaving virtually unaltered frequencies w
such that w > wi . That is why we want wcl > wi .

Figure 17: Final step response of the PID real system with ωi = ωCL
2.27
.

9
Introducing the integral effect into the control system was instrumental in eliminating static
error and achieving mission-specific performance requirements. The final tuning of ωi = ω2.27 CL

balanced the trade-offs between stability, speed, and accuracy. This analysis highlights the
importance of integral action in addressing the limitations of PD control and achieving robust
performance for dynamic systems.

6 Conclusion
This project successfully demonstrated the design, implementation, and analysis of control
strategies for a dynamic system, with a focus on open-loop and closed-loop responses. The
following key achievements were accomplished:

• The open-loop system was thoroughly analyzed by simulating and validating the model
against real-world experimental data. Parameters such as k4 (propeller constant) and
Dp (pitch axis viscosity) were fine-tuned to ensure that the simulated system closely
matched the behavior of the real system. This validation provided a strong foundation
for subsequent control system design.

• The proportional-derivative (PD) controller was implemented to improve the system’s


response time and stability. The PD controller’s parameters, kp and kv , were iteratively
adjusted to achieve a well-damped response with minimal oscillations. While the PD
controller improved the speed and stability of the system, it was unable to eliminate the
static error completely.

• To address this limitation, an integral effect was introduced, forming a proportional-


integral-derivative (PID) controller. The inclusion of the integral term successfully elimi-
nated the static error, resulting in precise tracking of the reference input. Careful tuning
of the integral bandwidth, ωi , ensured that the system remained stable and well-damped.

• The project demonstrated the importance of iterative parameter tuning and trade-offs
between speed, stability, and accuracy in control system design. By leveraging simulation
tools such as Simulink, we were able to refine the system’s behavior and optimize its per-
formance without repeated physical experimentation. We met our requirements by having
a relatively small settling time (ts =1.3 s circa) and null static error. By modeling the
closed loop system for higher bandwidth we could have achieved an even faster response,
trading in phase margin stability; but the sole scope of the project was to put in action
an integral-derivative controller that eliminated static error, guaranteeing a satisfactory
settling time of maximum 2 seconds.

In conclusion, the integration of the PID controller into the system enabled effective control
with high precision and stability.

10

You might also like