• Nie Znaleziono Wyników

Automation Systems - laboratory 1 Modelling and analysis of DC motor Jakub Mozaryn, e-mail: j.mozaryn@mchtr.pw.edu.pl May 16, 2017

N/A
N/A
Protected

Academic year: 2021

Share "Automation Systems - laboratory 1 Modelling and analysis of DC motor Jakub Mozaryn, e-mail: j.mozaryn@mchtr.pw.edu.pl May 16, 2017"

Copied!
13
0
0

Pełen tekst

(1)

Automation Systems - laboratory 1

Modelling and analysis of DC motor

Jakub Mozaryn, e-mail: j.mozaryn@mchtr.pw.edu.pl May 16, 2017

Contents

1 Aims of the laboratory 2

2 Theoretical preliminaries 2

2.1 Introduction . . . 2

2.2 Construction and performance of DC motor . . . 2

2.3 Mathematical model of DC motor in a form of differential equations 4 2.3.1 Simplified scheme of DC motor . . . 4

2.3.2 Electrical equation of DC drive . . . 5

2.3.3 Mechanical equation of DC drive . . . 5

2.4 Transfer function of the DC motor . . . 7

2.5 Exemplary parameters of DC motor . . . 8

3 To Do 9 3.1 Simulation of the DC drive - control of angular velocity . . . 9

3.2 Influence of DC motor parameters on its dynamics - control of angular velocity . . . 9

3.3 Simulation of the DC motor - control of angular position . . . 10

3.4 Impulse response of DC motor - control of angular velocity and angular position . . . 10

4 Usefull MATLAB functions 11 4.1 Transfer function . . . 11

4.2 Step response . . . 11

4.3 Poles calculation . . . 11

4.4 Poles and zeroes mapping . . . 12

4.5 Nyquist plot . . . 12

4.6 Bode plots . . . 12

4.7 Gain and phase margins . . . 13

(2)

1 Aims of the laboratory

There are following aims of the laboratory:

• Familiarize with principles of a DC motor performance.

• Learn how to create a model of DC motor in the form of differential equations, a block diagram, and a transfer function.

• Learn how to model and simulate a model of DC motor in MATLAB environment.

• Determine and plot the step response of DC motor in MATLAB environ- ment,

• Study and explore the influence of DC motor parameters on the pole placement and step response of its mathematical model.

2 Theoretical preliminaries

2.1 Introduction

DC (direct current) motors are often used as actuators in control systems.

Advantages:

• high torque,

• good performance,

• small size.

Disadvantages:

• sparks (industrial disturbances),

• wear of the commutator brushes.

In last few years, there was created a vast amount of different designs of DC motors with very good dynamic properties.

2.2 Construction and performance of DC motor

A schematic diagram of DC motor with permanent magnets (PM) is shown in Fig. 1. The torque in DC motor arises as an effect of an interaction between an external magnetic field and a magnetic field along a circuit through which a current flows.

In DC motors of low power, the magnetic field is produced by permanent mag- nets arranged in a stationary housing called a stator.

A rotor, located in the magnetic field of the stator, contains windings made of many frames of wires connected to the commutator. Typically, these windings

(3)

Figure 1: Schematic design of a DC motor with permanent magnets

due to the mutual influence of the stator flux and the current flow in rotor’s windings.

To obtain the maximum torque, magnetic flux vectors of the rotor and stator should be orthogonal. This is provided by a commutator, which switches frames of rotor windings, causing a corresponding change in a direction of the current flow.

The voltage is supplied by commutator brushes, made of specially crafted carbon. In DC motors the control path is always performed by the rotor circuit.

Changes in the input voltage changes the torque value and thus, at a prede- termined load torque of the rotor, change the angular velocity of the rotor.

(4)

2.3 Mathematical model of DC motor in a form of differ- ential equations

2.3.1 Simplified scheme of DC motor

Simplified scheme of a DC motor, with distinguished electrical and mechanical parts, is presented in Fig. 2.

Figure 2: Simplified scheme of a DC motor.

Electrical parameters of DC motor are:

• Uz a voltage supply of the rotor,

• iw a current in the rotor windings,

• Rw a resistance of the rotor windings,

• Lw an inductance of the rotor windings,

• E an induced EMF (electromotive force),

• ωs an angular velocity of the rotor.

Mechanical parameters of DC motor are:

• Ms a torque of the rotor shaft,

• ωs an angular velocity of the rotor shaft,

• B a viscous friction coefficient reduced to the rotor shaft,

• J a moment of inertia reduced to the rotor shaft,

• iw the current flowing in the rotor windings,

• Mobc a constant load torque (changing, a disturbance).

When creating a mathematical model of DC motor, it’s important to draw attention to find the relationship between the motor supply voltage (Uz) and the angular speed of the rotor shaft (ωs).

Considering separately electrical and mechanical parts of the rotor circuit, one can write two equations modeling it’s behaviour - an electrical equation and a mechanical equation.

(5)

2.3.2 Electrical equation of DC drive

Based on the equivalent circuit and 2nd Kirchhoff ’s law, the electrical relation- ship can be written as:

Uz= URw+ ULw+ E (1)

The voltage dependent of the resistance of rotor windings is proportional to the current flowing through them, and can be written as follows:

URw= Rwiw (2)

The voltage depending on the inductance of rotor windings is proportional to the changes of the current (the losses in the magnetic circuit are omitted here) as follows:

ULw= Lw

diw

dt (3)

When the rotor rotates, in it’s windings electromechanical force - EMF is induced. EMF is proportional to the angular velocity of the rotor shaft, i.e.

E = keωs (4)

where ke is an electric constant, dependent on the magnetic flux of the stator and the number of coils in the rotor windings.

Substituting (2)-(4) in (1) leads to the following equation:

Uz= Rwiw+ Lw

diw

dt + keωs (5)

2.3.3 Mechanical equation of DC drive

A rotor torque, that overcomes torques opposing the rotor movement, can be written as

Ms= Ma+ Mv+ Mobc (6)

Assuming that the stator’s magnetic flux has constant value, the rotor torque is proportional to the rotor’s current flow, and therefore

(6)

Ms= kmiw (7)

where km is mechanical constant.

The torque associated with an angular acceleration of the rotor is in the form

Ma = Jdωs

dt (8)

The torque, associated with the viscious friction of the rotor is described as

Mv= Bωs (9)

Substituting components (7)-(9) to equation (6) leads to the following equation

kmiw= Jdωs

dt + Bωs+ Mobc (10)

The system of equations, that linkis an electrical (5) and a mechanical (10) performance of DC motor can be written as





Uz= Rwiw+ Lwdiw dt + keωs kmiw= Jdωs

dt + Bωs+ Mobc

(11)

Using Laplace transform, system (11) can be transformed to

 Uz(s) = Rwiw(s) + Lwiw(s)s + keωs(s)

kmiw(s) = J ωs(s)s + Bωs(s) + Mobc (12)

Choosing iw(s) as the binding variable, (12) can be rewritten as follows





iw(s) = Uz(s) − keωs(s) Rw+ Lws

iw(s) = J ωs(s)s + Bωs(s) + Mobc

km

(13)

Therefore

Uz(s) − keωs(s)

Rw+ Lws =J ωs(s)s + Bωs(s) + Mobc km

(14)

(7)

Based on (14), a binding equation of a supply voltage and an angular velocity of the rotor, can be written as

kmUz(s) − kmkeωs(s) = (Rw+ Lws)(J ωs(s)s + Bωs(s) + Mobc) (15) A block diagram of DC motor based on (15) is presented in Fig. 3.

Figure 3: A block diagram of DC motor

2.4 Transfer function of the DC motor

To determine the transfer fuction of DC motor with a permanent magnet, the load torque is assumed to be zero:

Mobc= 0 (16)

which leads to the following transfer function

G(s) = ωs

Us(s)= km

LwJ s2+ (RwJ + LwB)s + (kmke+ RwB) (17)

So we get a linear time invariant (LTI) system, with the oscillatory nature (denomiator is desctibed by the second-order function).

(8)

2.5 Exemplary parameters of DC motor

To carry out the numerical simulation of DC motor, its parameters (coefficients and constants) should be defined .

Exemplary parameters that can be used in a simulation can be chosen as follows:

• Rw= 2 [Ω],

• J = 0.1  kg ˙m2 s2

 ,

• Lw= 0.1 [H],

• B = 0.5  N m · s rad

 ,

• ke = 0.1  V · s rad

 ,

• km = 0.1  N m A

 ,

(9)

3 To Do

In the course of the exercise there should be done following tasks

3.1 Simulation of the DC drive - control of angular veloc- ity

1. Create an object system describing DC motor in a form of a transfer function.

2. Plot step response of a system, assuming that an input is a supply voltage of rotor windings and an output is speed of the rotor shaft.

3. Calculate roots and zeros of the system. Knowing their position on com- plex plane determine whether a system is asymptoticaly stable with / without oscillations.

4. Calculate gain and phase margins (stability margins).

5. Draw following plots:

(a) step response of the system,

(b) poles and zeros of the system on complex plane, (c) Nyquist plot (approximate stability margins), (d) Bode plots (approximate stability margins).

3.2 Influence of DC motor parameters on its dynamics - control of angular velocity

1. Create an object system describing DC motor in a form of a transfer function.

2. Plot step response of a system, assuming that an input is a supply voltage of rotor windings and an output is angular velocity of the rotor shaft.

Modify its coefficients to obtain underdamped oscillations.

3. Calculate roots and zeros of the system. Knowing their position on com- plex plane determine whether a system is asymptoticaly stable with / without oscillations.

4. Calculate gain and phase margins (stability margins).

5. Draw following plots:

(a) step response of the system,

(b) poles and zeros of the system on complex plane, (c) Nyquist plot (approximate stability margins), (d) Bode plots (approximate stability margins).

(10)

3.3 Simulation of the DC motor - control of angular posi- tion

1. Create an object system describing DC motor in a form of a transfer function.

2. Plot step response of the system, assuming that the input is the rotor windings supply voltage and the output is angular position of the rotor.

3. Calculate roots and zeros of the system. Knowing their position on com- plex plane determine whether a system is asymptoticaly stable with / without oscillations.

4. Calculate gain and phase margins (stability margins) 5. Create following plots:

(a) step response of the system,

(b) poles and zeros of the system on complex plane, (c) Nyquist plot (approximate stability margins), (d) Bode plots (approximate stability margins).

3.4 Impulse response of DC motor - control of angular velocity and angular position

1. Create an object system describing the DC motor in the form of symbolic transfer function - use Symbolic Math Toolbox in MATLAB.

2. Determine the impulse response, assuming that the input is the rotor windings voltage and the output is angular velocity of the rotor. Sketch response.

3. Determine the impulse response, assuming that the input is the rotor windings voltage and the output is angular position of the rotor. Sketch response.

(11)

4 Usefull MATLAB functions

4.1 Transfer function

tf function create transfer function model.

Syntax

sys = tf(Numerator,Denominator) Description

Function tf is used to create real- or complex-valued transfer function models (TF objects) or to convert state-space or zero-pole-gain models to transfer func- tion form. It can be also used to create generalized state-space (genss) models or uncertain state-space (uss) models.

Function tf creates a continuous-time transfer function with numerator(s) and denominator(s) specified by Numerator and Denominator. The output sys is a tf model object, when Numerator and Denominator are numeric arrays.

4.2 Step response

step function creates step response plot of dynamic system.

Syntax step(sys,t) Description

Function step calculates the step response of a dynamic system. When it is invoked with no output arguments, this function plots the step response on the screen.

step(sys) plots the step response of an arbitrary dynamic system model sys.

It uses the user-supplied time vector t for simulation. For continuous-time models, t should be of the form Ti:dt:Tf, where dt becomes the sample time of a discrete approximation to the continuous system

4.3 Poles calculation

pole omputes poles of dynamic system.

Syntax pole(sys) Description

Function pole(sys) computes the poles p of the SISO or MIMO dynamic system model sys.

(12)

4.4 Poles and zeroes mapping

pzmap function draws pole-zero plot of dynamic system.

Syntax

[p,z] = pzmap(sys) Description

Function pzmap(sys) creates a pole-zero plot of the continuous- or discrete- time dynamic system model sys. For SISO systems, pzmap plots the transfer function poles and zeros. For MIMO systems, it plots the system poles and transmission zeros. The poles are plotted as x’s and the zeros are plotted as o’s.

Line [p,z] = pzmap(sys) returns the system poles and (transmission) zeros in the column vectors p and z. No plot is drawn on the screen.

4.5 Nyquist plot

nyquist function create Nyquist plot of frequency response.

Syntax nyquist(sys) Description

Function nyquist creates a Nyquist plot of the frequency response of a dynamic system model. When invoked without left-hand arguments, nyquist produces a Nyquist plot on the screen. Nyquist plots are used to analyze system properties including gain margin, phase margin, and stability.

nyquist(sys) creates a Nyquist plot of a dynamic system sys. This model can be continuous or discrete, and SISO or MIMO. The frequency points are chosen automatically based on the system poles and zeros.

4.6 Bode plots

bode function creates Bode plot of frequency response, magnitude and phase of frequency response.

Syntax bode(sys) Description

Function bode(sys) creates a Bode plot of the frequency response of a dynamic system model sys. The plot displays the magnitude (in dB) and phase (in degrees) of the system response as a function of frequency. It automatically determines the plot frequency range based on system dynamics.

(13)

4.7 Gain and phase margins

margin function calculates gain margin, phase margin, and crossover frequen- cies.

Syntax

[Gm,Pm,Wgm,Wpm] = margin(sys) Description

[Gm,Pm,Wgm,Wpm] = margin(sys) computes the gain margin Gm, the phase margin Pm, and the corresponding frequencies Wgm and Wpm, given the SISO open-loop dynamic system model sys. Wgm is the frequency where the gain margin is measured, which is a 180 degree phase crossing frequency. Wpm is the frequency where the phase margin is measured, which is a 0dB gain crossing fre- quency. These frequencies are expressed in radians/TimeUnit, where TimeUnit is the unit specified in the TimeUnit property of sys. When sys has several crossovers, margin returns the smallest gain and phase margins and correspond- ing frequencies.

Cytaty

Powiązane dokumenty

The sinusoid is a unique input signal, and the resulting output signal for a linear system, as well as signals throughout the system, is sinusoidal in the steady state; it differs

The sinusoidal sygnal is an unique input signal, and a resulting output signal for a linear time invariant (LTI) system, as well as signals throughout the system, is sinusoidal in

REMARK: The number of elements present in the block diagram may be larger than the number of structural elements in the block diagram - since some components may be influenced by

In the case of controlled objects, in which increase of the control signal u causes an increase in output (transfer function G ob (s) is positive), the other action the regulator

Controlled process is a technological process that is under influence of disturbances, where an external control (control) algorithm performs the desired action and enforces

The requirements related to the steady state are formulated by determining the so-called static accuracy of the control system - perimissible values of deviations of the system

It can be used to controller tuning in the control systems where processes are described by static higher order lag elements, controller settings are selected based on the

It can be used to controller tuning in the control systems where processes are described by static higher order lag elements, controller settings are selected based on the