Docsity

control design labaratory, Schemes and Mind Maps of Control Systems

Toggle sidebar
bg1
EE 3072 Dynamic Systems and Control LAB WEEK #3
Table of Contents
EE 3072 Dynamic Systems and Control LAB WEEK #3......................................................................................... 1
OBJECTIVE..............................................................................................................................................................1
BACKGROUND........................................................................................................................................................1
Mechanical Systems.............................................................................................................................................1
Electrical Systems ............................................................................................................................................... 2
PRELIMINARY ....................................................................................................................................................... 3
PROCEDURE ..........................................................................................................................................................4
A. Mechanical System.......................................................................................................................................... 4
B. Electrical System..............................................................................................................................................6
OBJECTIVE
The main goal of this lab is to model mechanical and electrical systems with differential equations and simulate
the system behaviour by using numerical methods. Moreover, we will see how to obtain transfer functions of the
modelled systems.
BACKGROUND
In application, we may face with complicated systems. However, if we manage to model a system by using
mathematical tools, the overall problem would be easier to solve.
In order to model a system, we often use differential equations. On the other hand, we have to deal with the
systems as their internal dynamics.
In this lab, we will look at both mechanical and electrical systems.
Mechanical Systems
Consider the spring-mass-dashpot system given below.
In order to obtain the mathematical models of this mechanical system consider the force from the spring (with
constant k), dashpot (with constant b1) and also the friction of the surface (with constant b2).
An external force is applied as given in figure.
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download control design labaratory and more Schemes and Mind Maps Control Systems in PDF only on Docsity!

EE 3072 Dynamic Systems and Control LAB WEEK

Table of Contents EE 3072 Dynamic Systems and Control LAB WEEK #3......................................................................................... 1 OBJECTIVE.............................................................................................................................................................. BACKGROUND........................................................................................................................................................ 1 Mechanical Systems............................................................................................................................................. Electrical Systems ............................................................................................................................................... 2 PRELIMINARY ....................................................................................................................................................... 3 PROCEDURE .......................................................................................................................................................... A. Mechanical System.......................................................................................................................................... 4 B. Electrical System..............................................................................................................................................

OBJECTIVE

The main goal of this lab is to model mechanical and electrical systems with differential equations and simulate

the system behaviour by using numerical methods. Moreover, we will see how to obtain transfer functions of the

modelled systems.

BACKGROUND

In application, we may face with complicated systems. However, if we manage to model a system by using

mathematical tools, the overall problem would be easier to solve.

In order to model a system, we often use differential equations. On the other hand, we have to deal with the

systems as their internal dynamics.

In this lab, we will look at both mechanical and electrical systems.

Mechanical Systems

Consider the spring-mass-dashpot system given below.

In order to obtain the mathematical models of this mechanical system consider the force from the spring (with

constant k), dashpot (with constant b1) and also the friction of the surface (with constant b2).

An external force is applied as given in figure.

Figure 1. Mass-spring-dashpot system

First of all, one should draw the free-body diagram of the given system. To do that, one must determine the

forces that are applied to the mass and their directions. Then, one need to utilize the Newton’s second law:

It is highly recommended to check out the "EXAMPLE 3–3" at page 66 in Katsuhiko Ogata - Modern Control

Engineering (2010, Prentice Hal).

Electrical Systems

Basic laws governing electrical circuits are Kirchhoff’s current law and voltage law. Kirchhoff’s current law (node

law) states that the algebraic sum of all currents entering and leaving a node is zero.

A mathematical model of an electrical circuit can be obtained by applying one or both of Kirchhoff’s laws to it.

Consider the following circuit which consists of 2 resistors, 1 capacitance and 1 inductance.

Moreover, ei represents the input voltage (source) and eo represents the output voltage.

  1. Determine the mathematical model of the electrical system given in Figure 2a.

PROCEDURE

A. Mechanical System

A.1.Simulate the following mechanical system with matlab using ode45 for the following parameter sets.

Figure 4 A mass-spring-dashpot system

Fe = 15 N, m = 10 kg, b = 8 N.kg.s/m with y(0) = [0; 0].

Time interval is from 0 to 20 sec.

However, you must solve the given system with different spring constant k choices.

  • k = 0.4 N.kg/m
  • k = 0.6 N.kg/m
  • k = 0.8 N.kg/m

There must be three different results that varies according to the spring constant k.

You must compare these results in a single plot with meaningful labels, title and legend.

F = 15; %N m = 10; %kg b = 8; %N.kg.s/m

k1 = 0.4; %N.kg/m k2 = 0.6; %N.kg/m k3 = 0.8; %N.kg/m k = [k1,k2,k3];

tspan = [0 20]; %s y0 = [0; 0];

[t1,y1] = ode45(@(t,y) [y(2); (1/m)(F - by(2) - k1* y(1))], tspan, y0);

[t2,y2] = ode45(@(t,y) [y(2); (1/m)(F - by(2) - k2* y(1))], tspan, y0);

[t3,y3] = ode45(@(t,y) [y(2); (1/m)(F - by(2) - k3* y(1))], tspan, y0);

plot(t1,y1(:,1), 'r-') hold on plot(t2,y2(:,1), 'g-') plot(t3,y3(:,1), 'b-') legend('k = 0.4','k = 0.6','k = 0.8') title('Mass-spring-dashpot system solution') xlabel('time (s)') ylabel('distance (meter)') hold off

A.2. Construct a simulink model for the given mechanical system.

%w3_mechanicalSys

Figure 5 An electrical system

a) ei1 = 5 Volt, L = 0.5 henry, C = 0.6 farad with three different resistor values:

  • R1 = 10 ohm
  • R2 = 20 ohm
  • R3 = 40 ohm

% Devre Parametreleri ei = 5; % Volt (Giriş gerilimi) L = 0.5; % Henry (İndüktans) C = 0.6; % Farad (Kapasitans)

% Direnç Değerleri R1 = 10; % ohm R2 = 20; % ohm R3 = 40; % ohm

% Zaman aralığı ve başlangıç koşulları % (Soruda belirtilmediği için başlangıçta kapasitör boş varsayılmıştır) tspan = [0 20]; % saniye y0 = [0; 0]; % Başlangıç gerilimi (e_o) ve türevi 0

% 1. Durum: R1 = 10 ohm [t1, y1] = ode45(@(t,y) [y(2); (1/(LC))ei - (R1/L)y(2) - (1/(LC))*y(1)], tspan, y0);

% 2. Durum: R2 = 20 ohm [t2, y2] = ode45(@(t,y) [y(2); (1/(LC))ei - (R2/L)y(2) - (1/(LC))*y(1)], tspan, y0);

% 3. Durum: R3 = 40 ohm

[t3, y3] = ode45(@(t,y) [y(2); (1/(LC))ei - (R3/L)y(2) - (1/(LC))*y(1)], tspan, y0);

% Çizim işlemleri figure; plot(t1, y1(:,1), 'r-', 'LineWidth', 1.5) hold on plot(t2, y2(:,1), 'g-', 'LineWidth', 1.5) plot(t3, y3(:,1), 'b-', 'LineWidth', 1.5)

% Etiketler, başlık ve gösterge legend('R = 10 \Omega', 'R = 20 \Omega', 'R = 40 \Omega', 'Location', 'best') title('RLC Circuit System Solution (Output Voltage e_o)') xlabel('Time (s)') ylabel('Voltage (V)') grid on hold off

b. For the electrical system, apply laplace transform and obtain the transfer function (Assume R = R1 (10 ohm)):

c. Determine the poles and zeros of the given transfer function:

d) plot the impulse response of this system using the impulse command and include figure explanations.