Download presentation
Presentation is loading. Please wait.
Published byYuliani Yuwono Modified over 5 years ago
1
Simulink Examples Ex1: Simulate the following equation Blocks needed:
2
Connect these blocks as shown in previous slide
fig1 Set the frequency=5 rad/sec ; phase=pi/2 ; A=2. Observe the output on the scope Check if your answer is correct directly from Matlab command window by applying the code: >> t=(0:.01:10);A=2;phi=pi/2;omega=5; >> xt=A*cos(omega*t+phi); >> plot(t,xt);grid Compare the 2 graphs and show them to the teacher
3
Ex2: Simulate the following diffrential equation
Mx’’+Cx’+Kx=f(t) X’’=(f(t) - Cx’ - Kx)/M m = 2.0; c=0.7; k=1 Blocks you will need
4
>>plot(time,simout);grid (ıf you are using matlab command window)
5
Ex3: Using the same system presented in Example 2, we will simulate the response using transfer function approach. Step (from Sources), Transfer Function (from Continous),Scope (from Sinks), and Save File to Workspace (from Sinks). Connect the block as shown in the fig3 You should observe the same output as in Ex2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.