You are on page 1of 8

Center for Advanced Studies in Engineering, Islamabad

Control Systems Lab

Experiment # 03: Mathematical Modeling & Analysis of


Mechanical and Electrical System
Name of Student: …………………………………………………….

Roll No.: ……………………………………………………………….

Date of Experiment: ………………………………………………….

Report submitted on: ………………………………………………..

Marks obtained: ……………………………………

Remarks: ……………………………………………

Instructor’s Signature: ……………………………...

Fall 2018-Semester V
CASE

Experiment # 3
Mathematical Modeling & Analysis of Mechanical and
Electrical System
Objectives
1. Mathematical Modeling & Analysis of Cruise Control System
2. Mathematical Modeling & Analysis of Mechanical system.
3. Mathematical Modeling & Analysis of Electrical system.
4. System Response using MATLAB Code and Simulink.

Location of Different Important Blocks:


There are some commonly used blocks in simulink for modeling and analysis of mechanical and
electrical system, which are given below.
Simulink > Continuous > Integrator.
Simulink > Continuous > Transfer Function.
Simulink > Continuous > Differentiator.
Simulink > Math Operations > Absolute.
Simulink > Math Operations > Gain.
Simulink > Math Operations > Slider Gain.
Simulink > Math Operations > Sum.
Simulink > Signal Routing > De-multiplexer.
Simulink > Signal Routing > Multiplexer.
Simulink > Sinks > Display.
Simulink > Sinks > Scope.
Simulink > Sources > Clock.
Simulink > Sources > Pulse Generator.
Simulink > Sources > Ramp.
Simulink > Sources > Signal Generator.
Simulink > Sources > Signal Builder.
Simulink > Sources > Sine Wave.
Simulink > Sources > Step Signal.

1. Mathematical Modeling & Analysis of Cruise Control System


The model of the cruise control system is relatively simple. If the inertia of the wheels is
neglected, and it is assumed that friction (which is proportional to the car's speed) is what that is
opposing the motion of the car. By applying this assumption, this problem is reduced to the
simple mass and damper system shown below. Remember to give the input for a small period of
time. Its output will be quite similar to a car whose driver accelerates it for an instance and then
leaves the car to decelerate at its own speed.

Control Systems Lab 2


CASE

Figure-1: Cruise control system

Modeling & Analysis in MATLAB and Simulink


1. Draw the free body diagram of the system shown in Fig-1 and represent it in the form of
differential equations.
2. Find the transfer function X(s)/U(s) & V(s)/U(s) of the system and write a code using MATLAB
to find the open loop and closed loop step response.
3. Find the roots of the system to check the stability of the system and plot them in S‐ plane.
4. Find the step response of the same system using simulink for open loop and closed loop.

System Parameters
i. b= 26 Ns/m
ii. m= 1580 kg
iii. u = 500 N

Observation
When the engine applied a 500 Newton force, the car will reach a maximum velocity of 19 m/s
with a rise time of 360 seconds as shown in open loop response. We observe that the open-
loop system is stable and does not oscillate since the pole is real and negative. Furthermore, the
speed of response is determined by the magnitude of this pole, b/m: the larger the magnitude,
the quicker the system approaches the steady-state value. Since we're typically not able to
change the system parameters to change the dynamic response of the system, we must instead
design controllers which alter the poles and zeros of the closed-loop system to meet the desired
performance specifications.

2. Mathematical Modeling & Analysis of Mass, Spring & Damper System


Consider the mass-spring-damper system shown in Fig-2. The linear motion concerned is in the
horizontal direction. We assume that the mass is moving towards right. Thus, the only applied
force is towards right and all other forces opposes the motion.

Control Systems Lab 3


CASE

Figure-2: Mass, spring and damper system

Modeling & Analysis in MATLAB and Simulink


1. Draw the free body diagram of the system shown in Fig-2 and represent it in the form of
differential equations.
2. Find the transfer function X(s)/F(s) of the system and write a code using MATLAB to find the
open loop and closed loop step response.
3. Find the roots of the system to check the stability of the system and plot them in S‐ plane.
4. Find the step response of the same system using simulink for open loop and closed loop.

System Parameters
i. k = 1 N/m
ii. b = 0.2 Ns/m
iii. m = 1 kg
iv. u = 1 N

Observation
When a force of 1N is applied then system response will eventually goes to 1 but also having
some overshoot. We observe that the open-loop system is stable but contains sustain oscillations
since the poles are complex and lies in LH plane. Since we do not change the system parameters
to change the dynamic response of the system, we must design a controllers which alter the poles
and zeros of the closed-loop system to meet the desired performance specifications.

3. Mathematical Modeling & Analysis of Inverting Operational Amplifier


Operational amplifiers, or simply op-amps, offer a convenient way to build, implement or realize
continuous-data or s-domain transfer functions. In control systems, op-amps are often used to
implement the controllers or compensators that evolve from the control system design process.
An operational amplifier as shown in Fig-3 is an electronic amplifier used to implement first order
and higher order transfer function. If positive terminal of op-amp is grounded, then it is called
inverting amplifier. Op amps are also frequently used in filters used for compensation purposes.
In the ideal op amp, no current flows into the input terminals, and the output voltage is not
affected by the load connected to the output terminal. In an actual op amp, a very small (almost

Control Systems Lab 4


CASE

negligible) current flows into an input terminal and the output cannot be loaded too much. In
our analysis here, we make the assumption that the op-amps are ideal.

Figure-3: Inverting Amplifier

Modeling & Analysis in MATLAB and Simulink


1. Find the transfer function Eo/Ei of the system shown in Fig-3 and write a code in MATLAB to
find its open loop and closed loop step response.
2. Find the roots of the system to check the stability of the system and plot them in S‐ plane.
3. Find the step response of the same system using simulink for open loop and closed loop.

System Parameters
i. R1 = 10 kΩ
ii. R2 = 10 kΩ
iii. C = 470 uF
iv. Ei = 1 V

Observation
When the input voltage is applied then the system response will goes to -1 as seen in the open
loop system. The response is negative decaying curve because our system is an inverting
amplifier, which can cause our output response to goes to -1 (means to invert the response). Op-
amp also have a built in negative feedback loop so you do not need a closed loop response
because it is already given. You will get a closed loop response from an open loop transfer
function.

Control Systems Lab 5


CASE

Exercise
Q.1 Find the step response of cruise control system in fig 1 by changing the system parameter as
given below. Also comment on the change of parameter on stability and system response.
System Parameters
i. b = 10 Ns/m
ii. m = 200 kg
iii. u = 500 N

Q.2 Find the step response of mass, spring and damper system in fig 2 by changing the system
parameter as given below. Also comment on the change of parameter on stability and system
response.
System Parameters
i. k =15 N/m
ii. b = 5 Ns/m
iii. m = 100 kg
iv. u = 5 N

Q.3 Find the step response of inverting operational circuit in fig 3 by changing the system
parameter as given below. Also comment on the change of parameter on stability and system
response.
System Parameters
i. R1 = 100 Ω
ii. R2 = 100 Ω
iii. C = 470 uF
vi. Ei = 5 V

Control Systems Lab 6


CASE

Labs Rubrics
Control System
Lab # 3
Mathematical Modeling of Mechanical & Electrical System

Lab #03: Marks distribution


ER1 ER4 ER7 ER9 RR2
Task

Lab #03: Marks obtained


ER1 ER4 ER7 ER9 RR2 Total
Task

Lab Evaluation Rubrics


# Qualities & Criteria 0 < Poor <=40 40< Satisfactory <= 70 70 < Good <= 90 90< Excellent <=100
No Tasks were Some tasks were Few tasks were left All tasks completed
completed/ completed. Could not to be completed. in due time. All goals
ER1 Task Completion minimal effort justify the reasons for Provided acceptable achieved.
shown uncompleted tasks and justification for the
goals. uncompleted tasks
and goals.
ER4 System model/ None of the Incomplete diagrams Diagrams without Correct Diagrams,
Mathematical model/ requirements are and partially correct labels and few properly labeled
Network model/ Block fulfilled/ labels/Circuit doesn’t details. showing all the
diagram/ Circuit Demonstrates incorporate required Construction is necessary details and
Diagram/ Simulation minimal or no components/ Blocks not fairly good / Input/Outputs/
Diagram understanding of connected correctly/ Chooses a Chooses an optimal
the connection Chooses a mathematical mathematical mathematical model
between model that applies to an model that applies that applies to an
mathematical engineering problem, to an engineering engineering
models and but requires assistance problem, and has problem, and
engineering in model development. some success in develops new
problems/ minimal model models.
effort shown development.
ER7 Code indentation, No indentation of Computationally Working code and Good structure,
optimization and code, no complex routine with good indentation or optimized code and
descriptive variable optimization and improper indentation structure, but not good variable names
name no descriptive and variable names optimized resulting and comments
variable names/ in unnecessary
minimal effort computations
shown

Control Systems Lab 7


CASE

ER9 Results and Plots Unable to produce Inaccurate plots and Correct plots Good presentation
any plots or results results without any of the correct plots
/minimal efforts necessary with proper labels,
shown identifying features captions & visibility
such as labels,
captions & visibility
RR2 Content/Information The report is not The report is objective The report is The report is
objective based based and for some part objective based and objective based and
and addresses the addresses the issues for most part addresses the issues
issues referred in referred in the addresses the referred in the
the proposed topic proposed topic with an issues referred in proposed topic with
poorly. The acceptable the proposed topic in depth analysis and
provided engineering/theoretical with an acceptable reasoning. The
information & analysis. The provided engineering/theore provided information
results is not information & results tical analysis and & results is
coherent rather for some parts is reasoning. The necessary, relevant
irrelevant. Little necessary and sufficient provided and sufficient to
engineering/theore to discuss these issues information & discuss these issues.
tical analysis is results for most The details are easily
presented part is necessary understood at peer
and sufficient to level.
discuss these issues

Control Systems Lab 8

You might also like