You are on page 1of 11

Exp.No.

1
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


Exp.No.6
Exp.Name. Modeling of Shunt DC motor with PID -Controller
Purpose:

Introduction
▪ The DC motors have been popular in the industry control area for a long
time, because they have many good characteristics, for example: high start
torque characteristic, high response performance, easier to be linear
control etc. The speed of a DC motor is given be the relationship,

▪ This Equation show that the speed is dependent on the supply voltage V,
the armature circuit resistance Ra, and field flux Ф, which is produced by
the field current. This paper describes the MATLAB/ SIMULINK of the
DC motor speed control method namely field resistance, armature
voltage, armature resistance control method and feedback control system
for DC motor drives

▪ Implement a continuous or a discrete time controller (PID,PI, PD, P, or


I) in Simulink model. PID controller gains are tunable either manually or
automatically tuning requires Simulink control design software. The
controller block output is a weighted sum of the input signal, the integral
the input signal, and the derivative of the input signal. The weights are the

2
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


proportional, integral, and derivative gain parameters. A first-order pole
filters are derivative action. Configurable option in the PID Controller
block include:
1. Controller type (PID, PI, PD, P, OR I)
2. Controller form (parallel or ideal)
3. Time domain (continuous or discrete)
4. Initial conditions and reset trigger
5. Output saturation limits and built-in-wind up mechanism
6. Signal tracking for bumpless control transfer and multi loop control.

▪ PID Controller

▪ Put block (PID Controller) from Library (Continuous).


▪ And then double click on the block to (PID Controller) to make tune
for the values (KP-KI-KD) as following.

Press this bottom tune the


values (KP-KI-KD)

3
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation

Put the value is (15)

▪ Then press continuo and then OK


▪ To obtain the values of response press (Show parameters)as
following

Press this bottom

4
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


𝑣𝑎 = 𝑣𝑓
𝑖𝑡 = 𝑖𝑎 +𝑖𝑓
𝑑𝑖𝑎
𝑣𝑎 = 𝑖𝑎 (𝑡 )𝑅𝑎 + 𝐿𝐴𝐴 + 𝑏𝑒𝑚𝑓
𝑑𝑡
𝑑𝑖𝑎
𝑣𝑎 = 𝑖𝑎 (𝑡 )𝑅𝑎 + 𝐿𝐴𝐴 + 𝐿𝐴𝐹𝜔(𝑡)𝑖𝑓 (𝑡)
𝑑𝑡
𝑑𝑖𝑓
𝑣𝑓 = 𝑖𝑓 (𝑡 )𝑅𝑓 + 𝐿𝐹𝐹
𝑑𝑡
𝑇𝑒 (𝑡 ) = 𝐿𝐴𝐹𝑖𝑎 (𝑡)𝑖𝑓 (𝑡)
𝑑𝜔
𝑇𝑒 (𝑡 ) = 𝐽 + 𝐵𝑚 𝜔(𝑡 ) + 𝑇𝑙 (𝑠) = 𝐿𝐴𝐹𝐼𝑎
𝑑𝑡

By taking Laplace transform

𝑣𝑎 = 𝐼𝑎 (𝑠)𝑅𝑎 + 𝐿𝐴𝐴𝑠𝐼𝑎 (𝑠) + 𝐿𝐴𝐹𝜔 (𝑠)𝐼𝑓 (𝑠)


𝑣𝑓 = 𝐼𝑓 (𝑠)𝑅𝑓 + 𝐿𝐹𝐹𝑠𝐼𝑓 (𝑠)
𝑣𝑎 − 𝐿𝐴𝐹𝐼𝑓 (𝑠)𝜔𝑚 (𝑠)
𝐼𝑎 (𝑠) =
𝐿𝐴𝐴𝑠 + 𝑅𝑎
𝑣𝑓
𝐼𝑓 (𝑠) =
𝐿𝐹𝐹𝑠 + 𝑅𝑓
𝑇𝑒 (𝑠)𝐼𝑓 (𝑠)
𝑇𝑒 (𝑠) = 𝐽𝑠𝜔(𝑠) + 𝐵𝑚 𝜔(𝑠) + 𝑇𝑙
𝐿𝐴𝐹𝐼𝑎 (𝑠)𝐼𝑓 (𝑠) − 𝑇𝑙 (𝑠)
𝜔𝑚 (𝑠) =
𝐽𝑠 + 𝐵𝑚

5
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


Table 1: DC motor parameters
Motor Parameters Value
Input refrences 380 rad/sec
Armature Resistance (Raa) 0.013 Ω
Field Resistance (Rff) 1.43 Ω
Armature Inductance (LAA) 0.01 H
Field Inductance (LFF) 0.167 H
Armature Voltage (Va) 24 Volt
Mutual Field Inductance (LAF) 0.004 H
Frictional damping (Bm) 1.074 µNm/rads/s
Inertia (J) 0.21kg.m2
Load torque (TL) 2.49 N.m
Time operation 15sec

Simulink diagram
Part - A/ Represented Shunt DC Motor with PID-Controller by gains:
1. To simulate the mathematical model use Simulink in MATLAB by
connecting the fowling model.

Fig. 1: A model of a Shunt DC motor with PID-Controller using gains blocks in


Simulink.

6
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


➢ MATLAB code of parameters in M-file
To define the model parameters, use m-file as the following
clc
clear all
Va=24;Vf=Va;
Tl=2.49;
LAF=0.004;
LAA=0.01;
LFF=0.167;
Bm=1.074e-6;
J=0.21;
Raa=0.013;
Rff=1.43;
sim('SHDCPID')

Part - B/ Represented Shunt DC Motor with PID-Controller by block:

Fig.2: A model of a Shunt DC motor with PID-Controller using PID Controller


block in Simulink.

7
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation


Procedure:
1. Obtain the Simulink file and open it.
2. On the Modeling tab, open the Model Explorer and navigate within the
tree to the Model Workspace.
3. You should see all of the parameters listed in Table 1. Back on the
Modeling tab, click on the Model Settings.
4. Connect the modeling of SHDM as shown in Fig.3, and put the parameters
in Table 1.
5. Run the simulation and observe the behavior of the system.
A. For an input voltage of 24 volt and TL=0 N.m (open loop) and change
the load to TL=2.49 N.m after time is equal (10sec) without PID-
Controller.
B. For an input voltage of 24 volt and TL=0 N.m (open loop) and change
the load to TL=2.49 N.m after time is equal (10sec) with PID-
Controller put the values as following (Kp=20, Ki=5 and Kd=1.8).
C. For an input voltage of 24 volt and TL=0 N.m (open loop) and change
the load to TL=2.49 N.m after time is equal (10sec) with PID-
Controller to tune the values of following (Kp, Ki and Kd)
6. And then draw the output wave forms from the scope to the value (angular
velocity (wm(rad/sec)) and the reference required.
7. Write the values angular velocity (wm(rad/sec)) from display.
8. Save the scope view by copying it to the clipboard and pasting it into a
word doc, or by exporting it to the workspace and processing it as you
desire.
Calculations and Question
1. Discusses the results at each case (A, B and C).
2. To compare the implementation of mathematical model shunt DC motor
with the model of DC motor in Simulink, DC machine is added to the
Simulink model and feed with the same parameters of the previous one.

8
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation

9
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation

10
Southern Technical University Class: Fourth Year
Basrah Eng. Technical College M.Sc. Wafeeqa. A. Hasan
Dept. of Electrical Power Eng. Tech. 2023-2022

Modeling & Simulation

11

You might also like