Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
225 views

MatLab Assignment

This document describes MATLAB assignments for modeling physical systems using Simulink. It includes exercises to model a mass-spring system, simulate the system with varying damping coefficients, find the response when no input is applied but with initial velocity, and model a cruise control system. The assignments involve constructing Simulink diagrams, defining parameter values in M-files, and simulating and plotting the outputs to analyze the system responses under different conditions.

Uploaded by

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

MatLab Assignment

This document describes MATLAB assignments for modeling physical systems using Simulink. It includes exercises to model a mass-spring system, simulate the system with varying damping coefficients, find the response when no input is applied but with initial velocity, and model a cruise control system. The assignments involve constructing Simulink diagrams, defining parameter values in M-files, and simulating and plotting the outputs to analyze the system responses under different conditions.

Uploaded by

Ther Htet Aung
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

MANDALAY TECHNOLOGICAL UNIVERSITY

DEPARTMENT OF MECHATRONICS ENGINEERING

CONTROL ENGINEERING
(McE-42077)

MATLAB
Assignment – III

Mg Ther Htet Aung


IV-BE MC-26
Laboratory Experiment 3:
Modeling of Physical Systems using SIMULINK

Mass Spring System Model:


Consider the Mass-Spring system used in the previous exercise as shown
in the figure. Where Fs(x) is the spring force, Ff(x) is the friction
coefficient, x(t) is the displacement and Fa(t) is the applied force:

The differential equation for the above Mass-Spring system can then be written as
follows:

For Non-linear such case, (1) becomes


Exercise 1: Modeling of a second order system
Construct a Simulink diagram to calculate the response of the Mass-Spring system.
The input force increases from 0 to 8 N at t = 1 s. The parameter values are M = 2
kg, K = 16 N/m, and B = 4 N/m.

Solution:

M – file for parameter values

Simulink Block Diagram


Input Code:

Output
Output from the scope of the Simulink block diagram

Exercise 2: Simulation with system parameter variation


The effect of changing B is to alter the amount of overshoot or undershoot. These
are related to a term called the damping ratio. Simulate and compare the results of
the variations in B in exercise 1. Take values of B = 4, 8, 12, 25 N-s/m.

Solution

M – file for parameter values


Input Code
Output

Output from the scope of the Simulink block diagram

For B = 4,
For B = 8,

For B = 12,

For B = 25,
Exercise 3: System response from the stored energy with zero input
Find the response of the above system when there is no input for t ≥ 0, but when the
initial value of the displacement x (0) is zero and the initial velocity v (0) is 1
m/s.

Solution

Output

Output from the scope of the Simulink block diagram


For B = 4,
For B = 8,

For B = 12,

For B = 25,
Exercise 4: Cruise System
As we know in the cruise system, the spring force Fs (x) = 0 which means that K = 0
Equation (2) becomes

Or

Find the velocity response of the above system by constructing a Simulink block
diagram and calling the block diagram from Matlab m-file. Use M=750, B=30 and a
constant force Fa = 300. Plot the response of the system such that it runs for 125
seconds.

Solution

M – file for parameter values


Simulink Block Diagram

Input Code
Output

Output from the scope of the Simulink block diagram

♦♦♦♦♦

You might also like