Question

MATLAB - Simulink Solution

U 005) Esin - M = 2kg; m= 0.1 kg; l= 0.5m I cos e M 8:Pendulum Angle 8:Angular velocity of pendulum x:Position of the car *:V

Initial conditions of system are Xo = [0 0 0 0]T Design a controller and simulate it to has zero steady state error. r is ref

0 0
Add a comment Improve this question Transcribed image text
Answer #1

%%%%%%%%%%. MATLAB CODE %%%%%%%%%%%%%%

% state space equation matrices

A = [0 1 0 0;

20.601 0 0 0;

0 0 0 1;

-0.4905 0 0 0];

B = [0;-1;0;0.5];

C = eye(4); % for getting output of all states

% eigen values of A = poles of open loop

E = eig(A);

% desired pole location

last_pole = -0.5; % you can change last pole location a/c to your need

p = [-1+3i; -1-3i; -5; last_pole];

% determining K matrix (gain matrix) for pole placement

K = place(A,B,p);

% integrating solution

X0 = [0.1 0 0 0]';

X = X0;

storeY = [];

t0 = 0;

dt = 0.1;

tf = 10;

T = t0:dt:tf;

for t = t0:dt:tf

if t <=10

r = 1;

else

r = 0;

end

U = r-K*X;

XDOT = A*X + B*U;

X = X + XDOT*dt;

Y = C*X;

storeY = [storeY Y];

end

figure

subplot(411)

plot(T,storeY(1,:))

legend('\theta')

subplot(412)

plot(T,storeY(2,:))

legend('theta\_dot')

subplot(413)

plot(T,storeY(3,:))

legend('x')

subplot(414)

plot(T,storeY(4,:))

legend('x\_dot')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

(I) With r = 0 && x = [0 0 0 0]'

1 0 -1 0 4 6 8 10 12 14 16 18 20 N 1 theta_dot 0 -1 0 4 6 8 10 12 14 16 18 20 N 1 X 0 2 4 6 8 10 12 14 16 18 20 1 X_dot 0 -1

(I) With r = 1 && x = [0 0 0 0]'

0.05 0 -0.05 0 1 2. 3 4 On (o 7 8 9 10 0.2 theta_dot 0 -0.2 0 1 3 4 On 6 7 8 9 10 N 0.5 X 0 -0.5 0 1 2 3 4 5 6 7 8 9 10 0.5 X

(I) With r = 0 && x = [0.1 0 0 0]'

0.1 0 -0.1 0 1 2. 3 4 On (o 7 8 9 10 0.5 theta_dot 0 -0.5 0 1 2 3 4 On 6 7 8 9 10 0.4 X 0.2 0 0 1 2 3 4 5 6 7 8 9 10 0.5 X_do(I) With r = 1 && x = [0.1 0 0 0]'

0.2 0 -0.2 0 1 2. 3 4 On co 7 8 9 10 1 theta_dot 0 -1 0 1 2 3 4 On 6 7 8 9 10 0.5 X -0.5 0 1 2 3 4 5 6 7 8 9 10 1 X_dot 0 -1

(I) With r = 1 && x = [0 0.05 0 0]'

0.1 0 -0.1 0 0.2 1 2. 3 4 On co 7 8 9 10 theta_dot 0 -0.2 0 1 2 3 4 On 6 7 8 9 10 0.5 X -0.5 0 1 2 3 4 5 6 7 8 9 10 0.5 X_dot

note: I've attached an entirely MatLab solution to this problem. Coz sharing solution of SIMULINK doesn't worth it here as it will be consisting of only block diagrams.

—————————————————

I’ve attached the solution above. I hope you will find it useful.

If any doubt, FEEL FREE to comment anytime.

Thank You!

1 0 -1 0 4 6 8 10 12 14 16 18 20 N 1 theta_dot 0 -1 0 4 6 8 10 12 14 16 18 20 N 1 X 0 2 4 6 8 10 12 14 16 18 20 1 X_dot 0 -1 0 2 4 6 8 10 12 14 16 18 20

We were unable to transcribe this image

We were unable to transcribe this image

0.2 0 -0.2 0 1 2. 3 4 On co 7 8 9 10 1 theta_dot 0 -1 0 1 2 3 4 On 6 7 8 9 10 0.5 X -0.5 0 1 2 3 4 5 6 7 8 9 10 1 X_dot 0 -1 0 1 2 3 4 5 6 7 8 9 10

0.1 0 -0.1 0 0.2 1 2. 3 4 On co 7 8 9 10 theta_dot 0 -0.2 0 1 2 3 4 On 6 7 8 9 10 0.5 X -0.5 0 1 2 3 4 5 6 7 8 9 10 0.5 X_dot 0 -0.5 0 1 2 3 4 5 6 7 8 9 10

Add a comment
Know the answer?
Add Answer to:
MATLAB - Simulink Solution U 005) Esin - M = 2kg; m= 0.1 kg; l= 0.5m...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following system: -1-2-21 гг 1 0 1 L Where u is the system input and y is the measur...

    control system with observer Consider the following system: -1-2-21 гг 1 0 1 L Where u is the system input and y is the measured output. 1. Find the transfer function of the system. 2. Design a state feedback controller with a full-state observer such that the step response of the closed loop system is second order dominant with an overshoot Mp settling time ts s 5 sec. Represent the observer-based control system in a compact state space form. 10%...

  • Problem 3 (70 pts): Consider the mechanical system in Figure , the so-called "cart pendulum" system....

    Problem 3 (70 pts): Consider the mechanical system in Figure , the so-called "cart pendulum" system. The cart has a moving mass M, and is connected to a linear motor via a flexible coupling with stiffness K and damping B. An inverted pendulum of length1, negligible inertia and mass m is attached to the cart via a rotary actuator. If the pendulum damping coefficient is b, the linear actuator force is F and the rotary actuator torque is t 1)...

  • A position control system is given below. Use the MATLAB simulation tool (including Simulink) to ...

    Please provide an original answer. Will thumbs up. Thank you. A position control system is given below. Use the MATLAB simulation tool (including Simulink) to design the controller and to select the appropriate parameters. Please document your source code (submit the code or Simulink block diagrams), show your simulation results, and provide an analysis of obtained results. You are allowed to work in groups of two students. d(t) r(t) yt) то Set d(t)-0 and then design the controller (select gains...

  • PLEASE DO IN MATLAB Problem 8 (PID feedback control). This problem is about Proportional-Integral-Derivative feedback control...

    PLEASE DO IN MATLAB Problem 8 (PID feedback control). This problem is about Proportional-Integral-Derivative feedback control systems. The general setup of the system we are going to look at is given below: e(t) u(t) |C(s) y(t) P(s) r(t) Here the various signals are: signal/system r(t) y(t) e(t) P(s) C(s) и(t) meaning desired output signal actual output signal error signal r(t) y(t) Laplace transform of the (unstable) plant controller to be designed control signal Our goal is to design a controller...

  • Consider the following ODE where m= 10 kg, b = 2 N-s/m and u(t) = 0....

    Consider the following ODE where m= 10 kg, b = 2 N-s/m and u(t) = 0. Assume initial conditions of z(0) = 15 and ż(0) = 25. Use MATLAB control system toolbox commands to simulate the dynamic response of the system for 0 st 35. m2 + bż = u(t) PLOT 2(t) and ż(t) on two sets of axes using the subplot command. REPORT: max 2 = max ż

  • 1. Consider a feedback system given below: T(s) Disturbance Controller Dynamics R(S) + Gc(s) G.(s) U(s)...

    1. Consider a feedback system given below: T(s) Disturbance Controller Dynamics R(S) + Gc(s) G.(s) U(s) Sensor H(s) IMs) Sensor noise where the input and transfer functions are given as follows: R(s) = –,7,(s) = 0, N(s) = 0, G, - 15,6, -_- , and H(s) = 1. s's + 3) a. Derive the system transfer function Y(s)/R(s) = G,, poles, $, On, and, from the response function y(t), the performance measures: rise time Tr, peak time Tp, percent overshoot...

  • slove in Matlab AP2. A system is modeled by the following differential equation in which X(t)...

    slove in Matlab AP2. A system is modeled by the following differential equation in which X(t) is the output and (() is the input: *+ 2x(t) + 5x(t) = 3u(t), x(0) = 0, X(t) = 2 a. Create a state-space representation of the system. b. Plot the following on the same figure for 0 st s 10 sec : i. the initial condition response (use the initial function) il the unit step response (use the step function) iii. the total...

  • Matlab Simulink please list all the steps Extra Credit: Simulink Disturbance Analysis D(s) Controller Plant Gp(s)...

    Matlab Simulink please list all the steps Extra Credit: Simulink Disturbance Analysis D(s) Controller Plant Gp(s) Ge REs 92.9s213.63s 1 97.6s (0.1s + 1) 127 s(s +1)(s +2)(s 5) (s 10) Ge(s) Gp (s) The controller for the system above was designed to accurately track a variety of input signals for the given plant/process. Verify that the feedback system is well suited to this task by creating a model in Simulink and performing the following: 1. Create a model to:...

  • A state space linear system is shown below. Use Matlab to solve the following problems. Requirement...

    A state space linear system is shown below. Use Matlab to solve the following problems. Requirement for project report: (1) Results; (2) Matlab code. dx1/dt=-x1(t)+u(t) dx2/dt=x1(t)-2x2(t)-x3(t)+3u(t) dx3/dt=-3x3(t) y(t)=-x1(t)+2x2(t)+x3(t)+u(t) (1) Assume the system has input u(t)=e-3t if t>t0 and zero initial state x(0)=[0;0;0]. Using the transition matrix obtained, compute the system’s output (analytical solution), and plot the output as a function of time (t within 0 to 10). (2) Using the function lsim to simulate the system’s output (analytical solution), and...

  • Problem 2: (40 pts) Part A: (20pts) A third-order system has an of Y(s)-L[y(t) corresponding to...

    Problem 2: (40 pts) Part A: (20pts) A third-order system has an of Y(s)-L[y(t) corresponding to a unit step input u(t) is known to be input of u(t) and an output of y(t). The forced response portion 1 Ys) (3 +3s2+ 4s +5) = a) Determine the input-output differential equation for the system b) From your result in a), determine the transformed free response Yee (s) corresponding to initial conditions of: y(0)= y(0) = 0 and ý(0)-6 Part B (20pts)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT