0% found this document useful (0 votes)
5 views12 pages

touseef

The document outlines a Control Engineering Lab focused on modeling mechanical, electrical, and electromechanical systems using MATLAB. It includes objectives, system diagrams, governing equations, transfer functions, and MATLAB code for various systems such as mass-spring-damper, RLC circuit, DC motor, pendulum, and liquid-level systems. Additionally, it discusses impulse response graphs and provides examples of projects for further practice.

Uploaded by

mf325392
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)
5 views12 pages

touseef

The document outlines a Control Engineering Lab focused on modeling mechanical, electrical, and electromechanical systems using MATLAB. It includes objectives, system diagrams, governing equations, transfer functions, and MATLAB code for various systems such as mass-spring-damper, RLC circuit, DC motor, pendulum, and liquid-level systems. Additionally, it discusses impulse response graphs and provides examples of projects for further practice.

Uploaded by

mf325392
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/ 12

Control Engineering Lab (ME-317L)

Lab 1: Modelling Mechanical, Electrical & Electromechanical Systems in MATLAB


Lab Objectives:
1. Introduce students to system modelling using transfer functions.
2. Provide hands-on experience in defining transfer functions in MATLAB.
3. Model different mechanical, electrical, and electromechanical systems for practice.

1. Mass-Spring-Damper System (Mechanical System)

System Diagram:
• A mass (M) is connected to a spring (K) and a damper (B).
• A force F(t) is applied, causing displacement x(t).

Governing Equation:
Applying Newton’s second law:
Laplace Transform:

Transfer Function:

MATLAB CODE

M = 2; B = 3; K = 5;
num = [1];
den = [M B K];
G_mech = tf(num, den)
impulse(G_mech)
title('Impulse Response of Mass-Spring-Damper System')
2. RLC Circuit (Electrical System)

System Diagram:
• A series circuit consists of a resistor (R), inductor (L), and capacitor (C).
• Input: Voltage V(t), Output: Current I(t).

Governing Equation:
Using Kirchhoff’s Voltage Law (KVL):

Transfer Function:
MATLAB CODE:

L = 0.5; R = 1; C = 0.25;
num = [1];
den = [L R 1/C];
G_elec = tf(num, den)
impulse(G_elec)
title('Impulse Response of RLC Circuit')

3. DC Motor (Electromechanical System)

System Diagram:
• A DC motor converts electrical energy into mechanical motion.
• Input: Voltage V, Output: Angular velocity ω

Governing Equations:
Electrical equation (Kirchhoff's Voltage Law):

Mechanical equation (Newton’s Second Law):


Transfer Function (Speed to Voltage Input):

MATLAB Code:
J = 0.01; B = 0.1; K_t = 0.01; R = 1; L = 0.5; K_b = 0.01;
num = [K_t];
den = [J*L J*R + B*L B*R + K_t*K_b];
G_motor = tf(num, den)
impulse(G_motor)
title('Impulse Response of DC Motor')
4. Pendulum System (Mechanical System)

System Diagram:
• A pendulum consists of a mass (m) attached to a rod (length L).
• Input: Torque T, Output: Angular displacement θ

Governing Equation:
Using Newton’s second law for rotational motion:

Transfer Function:
MATLAB Code

I = 2; b = 0.5; m = 1; g = 9.81; L = 1;
num = [1];
den = [I b m*g*L];
G_pendulum = tf(num, den)
impulse(G_pendulum)
title('Impulse Response of Pendulum System')

5. Liquid-Level System (Fluid System)

System Diagram:

• A water tank has an inlet flow qin and an outlet flow qout
• Output: Water height h(t)
Governing Equation:
Mass balance equation:

Transfer Function:

MATLAB Code:

A = 2; R = 0.1;
num = [1];
den = [A 1/R];
G_tank = tf(num, den)
impulse(G_tank)
title('Impulse Response of Liquid-Level System')
Impulse Function and Response Graphs

Impulse Function Explanation:

• The impulse function (Dirac Delta function) represents an idealized force or input
applied in an infinitesimally short time with an area of 1.
• It is used in system analysis to determine the system’s response to a sudden force or
disturbance.

Impulse Response Graphs:

• Mass-Spring-Damper System: Shows an initial spike in displacement followed by


damped oscillations.
• RLC Circuit: Displays a sharp current pulse followed by an exponential decay or
oscillations depending on damping.
• DC Motor: Shows a sharp acceleration initially before stabilizing at a steady velocity.
• Pendulum System: Exhibits an initial angular displacement followed by periodic
oscillations if undamped or gradual decay if damping is present.
• Liquid-Level System: Shows a sudden rise in water height followed by gradual leveling
off depending on the system's resistance to outflow.
Additionally, these graphs are representative of the natural response of the system because:
1. Impulse response is essentially how the system behaves due to its internal dynamics
when subjected to a very short and sudden input.
2. The response is dictated by the system’s characteristic equation, which depends on
system parameters like damping, stiffness, resistance, and inertia.
3. These responses reveal key properties like stability, oscillations, and damping
behaviour without any external forcing function.
The characteristic equation of a system is a polynomial equation derived from the system's
differential equation that determines the system’s natural frequencies, stability, and
dynamic behaviour.
How is it obtained?
1. Start with the system’s governing differential equation.
2. Express it in the Laplace domain (assuming zero initial conditions).
3. Write the equation in the standard form:
Where P(s) and Q(s) are polynomials in s.
4. The characteristic equation is obtained by setting the denominator of the transfer
function to zero

Why is it important?
• The roots of the characteristic equation (poles) determine the system’s stability and
response.
• If all roots have negative real parts, the system is stable.
• If any root has a positive real part, the system is unstable.
• Complex roots indicate oscillatory behaviour.

Systems for Project/Assignment/Practice

1. Mechanical Systems (Vibrations & Motion)


1. Car Suspension System (Shock Absorbers & Springs)
o Models how a car absorbs road bumps using a spring-damper system.
2. Bicycle Frame & Rider Vibration
o Models how vibrations from the road travel through the bike frame to the
rider.
3. Elevator Motion Control System
o Models how an elevator motor moves a cabin with acceleration, damping,
and control.
4. Gym Equipment (Treadmill Motor & Running Belt)
o Represents how the treadmill motor drives the belt while opposing user
weight.
5. Damped Clock Pendulum
o Models how a clock’s pendulum swings and gradually stops due to air
resistance.

2. Electrical Systems (Circuits & Magnetics)


6. Home Inverter System (Battery & Transformer)
o Models how an inverter converts DC battery power to AC supply.
7. Smartphone Vibration Motor (Micro DC Motor)
o Simulates the vibrating motor in a phone when receiving a notification.
8. Electric Car Charging Circuit (Battery Charging Dynamics)
o Models how battery charge varies with time when connected to a charger.

3. Electromechanical Systems (Motion & Actuation)


9. Ceiling Fan Speed Control (DC Motor & Load Inertia)
o Models how a fan motor speeds up or slows down when voltage is applied.
10. Robotic Arm Joint Actuation (Servo Motor System)
• Simulates how a robotic arm motor moves its joint with damping.
11. Wind Turbine Blade Rotation (Generator & Aerodynamic Load)
• Represents how wind energy converts to electricity via rotational motion.

4. Thermal & Fluid Systems (Energy & Flow)


12. Room Heating System (Electric Heater & Air Convection)
• Models how a heater warms up a room and how heat dissipates over time.
13. Boiling Water in a Kettle (Thermal Response Model)
• Simulates how the water temperature rises with power input and cooling effects.
14. Water Level in a Toilet Tank (Fluid Dynamics Model)
• Models how the water level stabilizes when the flush valve and inflow interact.
15. Air Conditioning System (Temperature Control & Delay)
• Represents how an AC system regulates room temperature over time.

• Each group will:

Derive the governing equation


Find the transfer function
Simulate impulse response in MATLAB

You might also like