You are on page 1of 6

Simulink Assignment : 5 Questions; 5 marks

Notes:
1. You can use either MATLAB or Simulink or both to do all these problems
2. For every problem, take a screenshot of your MATLAB/simulink model
and paste in a word or ppt . Upload the file in Taxila and there is no need to
attach ****.m or *****.slx (MATLAB/ Simulink) files.
---------------------------------------------------------------------------------------------------
Q1) Use Matlab or Simulink to plot the function T= 6 ln t – 7* e^0.2*t over the
interval 0<= t <=3 ; where T is the temperature in °C and t is the time.
Solution:
t=[0:0.01:3];
T=6*log(t)-7*exp(0.2*t);
plot(t,T),xlabel('t(min)'),ylabel('T(celcius)'),title('time-Temperature graph')

Q2) The equation for the voltage Vc across the capacitor of an RC circuit is
RC dVc/dt + Vc = Vin
Where Vin the applied voltage. Suppose that RC =0.2 s and that the capacitor
voltage initially is 2V. If the applied voltage goes from 0 to 10 V at t=0, use
Simulink or MATLAB to determine and plot the voltage Vc for time 0<=t <=1s
Solution:
RC dVc/dt + Vc = Vin → dVc/dt= (Vin-Vc)/RC

Q3)The following equation describes the temperature T(t) of a certain object


immersed in a liquid bath of temperature Tb(t):
Suppose the object’s temperature is initially T(0) =70°C and the bath
temperature is 170°C. Use Simulink or MATLAB to answer the following
questions:
a. Determine T(t).
b. How long will it take for the object’s temperature T to reach 168°C?
c. Plot the object’s temperature T(t) as a function of time.
Solution:

Q4)
(Power (kW) = Torque (N.m) x Speed (RPM) /9.5488)

Solution:

Engine Power
Engine Torque
Q5)

Solution:

i = @(t) 0.3+0.1*exp(-5*t).*sin(25*pi*t);

y = integral(i,0,7) * 10^7

Plot command

fplot(y,[0,7])

************************************

You might also like