0% found this document useful (0 votes)
2 views

Report Anna

Uploaded by

annafriz2000
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Report Anna

Uploaded by

annafriz2000
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Laboratory of Automation Systems 2021/2022

REPORT LAB. AUTOMATION SYSTEMS .


The goal of the laboratory experience was to control a DC motor through Simulink using the control
techniques studied in the first module of LAS. We worked on a physical setup composed of one DC
and one brushless motor, a power supply unit, a microprocessor, and breaking resistors.

PI CONTROLLER FOR A DC MOTOR .


We wanted to control the DC motor with a PI controller. The available measurements we had were
the position/velocity of the rotor (possible with an encoder) and the current of the motor. We
wanted to be able to follow a set velocity.

MODEL OF A DC MOTOR:
diA(t)
ELECTRIC DYNAMICS (armature): VA(t) = RA ∗ iA(t) + LA ∗ + VM(t)
dt

(VM is the BEMF, it opposes to the motion of the rotor)


ELECTROMECHANICAL COUPLING: τ(t) = km ∗ iA(t)G
(km is the electro-mechanical constant of the motor)
dωm(t)
MECHANICAL DYNAMICS (rotor): J∗ = τm(t) − bωm(t)
dt

(b is the coefficient of friction)


MECHANO-ELECTRICAL COUPLING: VM(t) = 𝑘𝑚 ∗ ωm(t)
(BEMF effect, can be compensated with a feedforward action)

1
Laboratory of Automation Systems 2021/2022

This are all linear differential equations, therefore we can apply the Laplace transformation.
Assuming b≈0 we obtain the transfer function that describes the motor dynamics. It is a second
order system with two poles.
𝑘𝑚
Gω(s) = 2
s ∗ LA ∗ J + s ∗ RA ∗ J + 𝑘𝑚2
We cab compute two poles: if LA is sufficiently small then the two poles are real and negative
(stability of the system).
𝑘𝑚2 𝑅𝐴
p1 ≈ − p2 ≈ −
RA∗J LA

𝑘 /(𝐿 ∗𝐽) 1/𝑘𝑚


Gω(s) = 𝑘𝑚𝑚2 𝐴 𝑅𝐴 =
(s+ )∗(s+ ) (1+sτm)∗(1+sτe)
RA∗J LA

From the equations of the two poles we obtain the mechanical and electrical time constants.
RA∗J L
τm = >> τe = RA
𝑘𝑚2 A

Typically there is one order of magnitude of difference between the two constants.

CURRENT CONTROL LOOP .


In high dynamics applications, the control of an electric motor is implemented with a cascade
structure made of the position, velocity and current loop. The current loop depends only on the
motor’s properties, because we control the current that is flowing into the armature circuit, where LA
and RA are known.
The dynamics of the electrical part of the model of the motor is described by the transfer function
1 1/RA
Ge(s) = =
RA + s ∗ LA 1 + s ∗ τA
L
With τA = RA
A

In order to have null steady state errors and to obtain a desired dynamics we choose a PI controller
1 𝐾𝑝𝑖 1 + 𝑇𝑖𝑖 ∗ 𝑠
𝑅𝑖 (𝑠) = 𝐾𝑝𝑖 ∗ (1 + )= ∗( )
𝑇𝑖𝑖 ∗ 𝑠 𝑇𝑖𝑖 𝑠
The open loop transfer function will be Fi (s)
𝐾𝑝𝑖 1 + TII ∗ S 1/RA
𝐺𝑖 (𝑠) = 𝑅𝑖 ∗ Ge = ∗( )∗
𝑇𝑖𝑖 𝑠 1 + s ∗ τA
We can use choose first degree of freedom 𝑇𝑖𝑖 = τA to cancel the electric pole. The open loop
transfer function results
𝐾𝑝𝑖
𝐺𝑖 (𝑠) = 𝑅𝑖 ∗ Ge =
RA ∗ 𝑇𝑖𝑖 ∗ 𝑠
While the second degree of freedom Kpi can be used to determine the desired time constant of the
system. From the closed loop transfer function, we get
Gi 1 1
𝐹𝑖 (𝑠) = = =
1 + Gi 1 + RA ∗ 𝑇𝑖𝑖 ∗ 𝑠 1 + τ𝑖 ∗ 𝑠
𝐾𝑝𝑖

2
Laboratory of Automation Systems 2021/2022
𝑅𝐴𝑇𝑖𝑖
We can now assign a desired time constant for the current loop τ𝑖 = = 1𝑚𝑠, as typical for
𝐾𝑝𝑖
electric drives.
L LA
𝑇𝑖𝑖 = τA = A 𝐾𝑝𝑖 =
𝑅 𝐴 τi

DISCRETIZATION OF THE PI CONTROLLER .


We now have to discretize the transfer function of the PI
controller: we choose to use the Tustin discretization method and
we found the parameters we needed doing these calculations
2 1 − 𝑧 −1
𝐾𝑝𝑖 1 + 𝑇𝑖𝑖 ∗ 𝑠 𝐾𝑝𝑖 1 + 𝑇𝑖𝑖 ∗ ∗ 𝑦
𝑇 1 + 𝑧 −1
∗( )= ∗( −1 )=
𝑇𝑖𝑖 𝑠 𝑇𝑖𝑖 2 1−𝑧 𝑥

𝑇 1 + 𝑧 −1

2 1 − 𝑧 −1
𝐾𝑝𝑖 1 + 𝑇𝑖𝑖 ∗ ∗
𝑇 1 + 𝑧 −1
𝑦= ∗( )∗𝑥
𝑇𝑖𝑖 2 1 − 𝑧 −1

𝑇 1 + 𝑧 −1

1 − 𝑧 −1 𝑇 1 − 𝑧 −1
𝑇𝑖𝑖 ∗ ∗ 𝑦 = (𝐾𝑝𝑖 ∗ ∗ +𝐾𝑝𝑖 ∗ 𝑇𝑖𝑖 ∗ )∗𝑥
1 + 𝑧 −1 2 1 + 𝑧 −1
𝑇 −1 −1
𝑇𝑖𝑖 ∗ 𝑦 𝑇𝑖𝑖 ∗ 𝑦 ∗ 𝑧 −1 𝐾𝑝𝑖 ∗ 2 ∗ 𝑥 ∗ (1 + 𝑧 ) + 𝐾𝑝𝑖 ∗ 𝑇𝑖𝑖 ∗ 1 − 𝑧 ∗ 𝑥
− =
1 + 𝑧 −1 1 + 𝑧 −1 1 + 𝑧 −1
𝐾𝑝𝑖 𝑇
𝑦= 𝑥(1 + 𝑧 −1 ) + 𝐾𝑝𝑖 ∗ (1 − 𝑧 −1 )𝑥 + 𝑦 𝑧 −1
𝑇𝑖𝑖 2
𝐾𝑝𝑖 𝑇 𝐾𝑝𝑖 𝑇 −1
𝑦= 𝑥+ 𝑥𝑧 + 𝐾𝑝𝑖 𝑥 − 𝐾𝑝𝑖 𝑧 −1 𝑥 + 𝑦 𝑧 −1
𝑇𝑖𝑖 2 𝑇𝑖𝑖 2
𝑇 𝐾𝑝𝑖 𝑇 𝐾𝑝𝑖
𝑦=( + 𝐾𝑝𝑖)𝑥 + ( − 𝐾𝑝𝑖)𝑥𝑧 −1 + 𝑦𝑧 −1
2 𝑇𝑖𝑖 2 𝑇𝑖𝑖

𝑦 = 𝑎 𝑥 + 𝑏 𝑥 𝑧 −1 + 𝑐 𝑦 𝑧 −1
𝑇 𝐾𝑝𝑖+2 𝑇𝑖𝑖 𝐾𝑝𝑖 𝑇 𝐾𝑝𝑖−2 𝑇𝑖𝑖 𝐾𝑝𝑖
With 𝑎= ; 𝑏= ; 𝑐=1
2 𝑇𝑖𝑖 2 𝑇𝑖𝑖

Where y=y(k), x=x(k), 𝑥 𝑧 −1 = 𝑥(𝑘 − 1) and 𝑦 𝑧 −1 = 𝑦(𝑘 − 1), Kpi is the proportional action
and Tii the time constant for the integral one.

3
Laboratory of Automation Systems 2021/2022

We used this to create the Matlab function of our PI controller, which has four inputs:
Kpi,
Tii,
Ts (the sampling time),
In (the input of the regulator, which is the error between the desired current and the measured one)

VELOCITY CONTROL LOOP .


The dynamics of the mechanical part of the model of the motor is affected by mechanical properties
(such as inertia, friction…) and is described by the transfer function
1 1
Gm(s) = =
𝑏 + J ∗ 𝑠 1 + τ𝑚 ∗ 𝑠
J
With τm = b

In order to have null steady state errors and to obtain a desired dynamics controlling the time
constant we choose a PI controller
1 𝐾𝑝𝑣 1 + 𝑇𝑣𝑖 ∗ 𝑠
𝑅𝑣(𝑠) = 𝐾𝑝𝑣 ∗ (1 + )= ∗( )
𝑇𝑣𝑖 ∗ 𝑠 𝑇𝑣𝑖 𝑠
Since the electric part is much faster, we assume it’s dynamics negligible.
The open loop transfer function becomes
𝐾𝑝𝑣 ∗ 𝑘𝑚 1 + TVI ∗ S 1/b
𝐺𝜔(𝑠) = 𝑅𝑣 ∗ 𝐹𝑖 ∗ 𝑘𝑚 ∗ Gm ≈ ∗( )∗
𝑇𝑣𝑖 𝑠 1 + s ∗ τm

4
Laboratory of Automation Systems 2021/2022

We can use choose first degree of freedom 𝑇𝑣𝑖 = τm to cancel the mechanical pole. The open loop
transfer function results
𝐾𝑝𝑣 ∗ 𝑘𝑚
𝐺𝜔(𝑠) = 𝑅𝑣 ∗ Gm =
b ∗ 𝑇𝑣𝑖 ∗ 𝑠

While the second degree of freedom Kpv can be used to determine the desired time constant of the
system, which must be higher than the electrical one (τ𝜔 = 4 − 8τi). From the closed loop transfer
function, we get

𝐺𝜔 1 1
𝐹𝑣(𝑠) = = =
1+𝐺 b ∗ 𝑇𝑣𝑖
𝜔 1+ ∗ 𝑠 1 + τ𝜔 ∗ 𝑠
𝐾𝑝𝑣 ∗ 𝑘𝑚
We obtain
J
𝑇𝑣𝑖 = τm 𝐾𝑝𝑣 = τ𝜔∗Km

Where Km is the torque constant given by datasheet, J the total inertia.


We used the same block function of the current loop PI regulator function with the different values
for the proportional (Kpv) and integral (Tvi) actions to realise the velocity loop regulator with
Simulink, choosing 𝜏𝜔 = 6𝜏𝑖 .
The dynamic to control is of the second order, however since the current loop is negligible when
considering the velocity loop, we can approximate it with a first order system (considered that the
time constant of the pole of this 1st order system is 4-8 times higher than the time constant of the
pole of the current loop).

The blue block on the top left allows the analog reading. It has two outputs which are the measured
current, necessary for the current loop, and the supply voltage.
The PWM block is needed for supplying the motor. The output TensioneRichiesta comes from our
control system, and it represents the voltage we have to give to the motor to follow a certain desired
speed.
The encoder allows to read the measured velocity.

5
Laboratory of Automation Systems 2021/2022

ANTI WIND-UP SYSTEM .


When integral actions are used, the limited range of the current and voltage variable is an issue.
These variables are limited for physical reasons and, if an integral action is present in the control
algorithm, problems arise when the control variable saturates.
The reason of the windup is the integrator contained in the PI controller, which keeps integrating
the tracking error even if the control variable is saturating. This may require a long time to
desaturate the integral term and the overall system may therefore result unstable.
A very simple solution to this issue (that is the one that we implemented) is to take in account when
the control variable surpasses the saturation limit (HiSat or LowSat): when this occurs, we force the
output to be equal to the saturation value and the input is evaluated once again.
In the Matlab function of our controller there is a part dedicated to avoiding this problem:

We choose to limit the voltage (output of the current loop) to 20V, because the DC motor nominal
voltage is 24V, and the current output of the velocity loop to 1.5, because the nominal current is
1.9A

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy