Question

...use the Matlab command C pid (Kp, Ki, Kd, Tf) to create your PID controller for Tr 0.5, KI = Kp = 0.5, and 1 < Kp < 10. c.Solve C & D please slide 3 is the one with the pendulum(20 POINTS) Using the Laplace method of analysis introduced in this lesson, determine the impulse response h(t) for the pendu

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

The MATLAB code is given below in bold letters.

clc;
close all;
clear all;

% Question C
% define the parameters
m = 1;
l = 1;
g = 9.81;
T = 10;

% define the matrices
A = [0 1 ;-g/l 0];
B = [1/(m*l^2);0];
C = [1 0];
D = 0;


% define the state space system
Mss1 = ss(A,B,C,D);

% define kp, ki and kd
kp = 10;
ki = 0.5;
kd = 0.5;
Tf = 0.5;

% define the controller C
C = pid(kp,ki,kd,Tf);

% convert from transfer function model to state space model
Mss2 = ss(C);


% Question D
% connecting the systems using the feedback command
unityloop = feedback(Mss1*Mss2,1)

Result:


a =
x1 x2 x3 x4
x1 -11 1 0.5 1
x2 -9.81 0 0 0
x3 -1 0 0 0
x4 2 0 0 -2

b =
u1
x1 11
x2 0
x3 1
x4 -2

c =
x1 x2 x3 x4
y1 1 0 0 0

d =
u1
y1 0

Continuous-time model.

Add a comment
Know the answer?
Add Answer to:
Solve C & D please slide 3 is the one with the pendulum ...use the Matlab...
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
  • Final Assignment: Impulse Response (20 POINTS) Using the Laplace method of analysis introduced in this lesson,...

    Final Assignment: Impulse Response (20 POINTS) Using the Laplace method of analysis introduced in this lesson, determine the impulse response h() for the pendulum example (see LESSON 22). Let m = 1 kg, / 1 m, g= 9.81 m/s2, and T 10 N.m. 0 1 +Im/2 T m 0 g + [0]T NS 194 .. Final Assignment: Cam Displacement Control Follower F F Spring k C Roller x, X, X m m TITT Cam x, x x, X, x F...

  • Question: CODE: >> %% PID controller design Kp = 65.2861; Ki = 146.8418; Kd = 4.0444;...

    Question: CODE: >> %% PID controller design Kp = 65.2861; Ki = 146.8418; Kd = 4.0444; Gc = pid(Kp,Ki,Kd); % close-loop TF T = feedback(G*Gc,1); %% checking the design obejective a_pid = stepinfo(T); % Settling Time tp_pid = a_pid.SettlingTime % Overshhot OS_pid = a_pid.Overshoot %% steady-state error [yout_pid,tout_pid] = lsim(T,stepInput,t); % steady-state error ess_pid = stepInput(end) - yout_pid(end); >> %% Effect of P in G Kp = 65.2861; Ki = 0; Kd = 0; Gc = pid(Kp,Ki,Kd); % close-loop TF...

  • Exercise: Given the mass-damper-spring network below: x(t) flt) m- 1kg; X(s) F(s) (s2 +10s + 20) ...

    Exercise: Given the mass-damper-spring network below: x(t) flt) m- 1kg; X(s) F(s) (s2 +10s + 20) b-10N-m/s 20N/m; f(t)-1 N Show how each of the controller gain, Kp, Kd and Ki contributes to obtain Fast rise time Minimum overshoot i. No steady state error MATLAB code S-tf('s') Sys 1/(sA2+10*s+20) Step Proportional Controller: Kp 300 % for faster reponse Gpspid(Кр) sys_p-feedback(sys Gp, 1) t-0:0.01:2 step(sys, sys p) Proportional-Derivative Controller: Kp 300 Kd-10 Gpdspid(Kp,0,Kd) sys pd feedback(Gpd sys, 1) step( sys, sys_p,...

  • Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r)...

    Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r) is a magnitude1 step. Plant is given by 1 (s+1)(3+2)(s+5 ) controller plant + 14 y C(s) P(S) a) Calculate Closed Loop characteristics and steady-state error(unity feedback and Kp=1, Kd=1, Ki=0)) 2.Using automatic PID tuning function, reduce steady-state error=0 and report Kp=?, Kd=? And Ki=?

  • Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r)...

    Using MATLAB. We want to control output(y) using PID control in Kds? +Kps+Ki C(s) S Input(r) is a magnitude1 step. Plant is given by 1 (s+1)(s+2)(s+59) controller plant 14 y C(s) P(S) a) Calculate Closed Loop characteristics and steady-state error(unity feedback and Kp=1, Kd=1, Ki=0)) 2.Using automatic PID tuning function, reduce steady-state error=0 and report Kp=?, Kd=? And Ki=?

  • 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...

  • Design by Synthesis: It is possible to design the PID so that the overshoot of the feedback syste...

    If anyone has Matlab, help me with problem e and f. Thank you. Design by Synthesis: It is possible to design the PID so that the overshoot of the feedback system would be zero, furthermore, the feedback system would behave as a first order system. This is done by noting the PID transfer function: 3. PID Controller Plant Gp (s) R(s) C(s) s2+s+1 Note in the above KPK and Ki/Kp may be chosen so that the numerator of the PID...

  • Using matlab and simulink! Lab Assignment Solve the following problems using the Word and MATLAB. The...

    Using matlab and simulink! Lab Assignment Solve the following problems using the Word and MATLAB. The table should be prepared in Word (Do not use MATLAB) for this. Use the MATLAB PUBLISH to submit your code. If you cannot, you may submit your report as a pdf form (prepare in word and save as pdf). The code, simulink model and figures should be included (print as a pdf or screen capture - consider readability). 1. Create the Simulink model as...

  • Please answer all the questions with MATLAB and also upload the code. Thanks. 3 Experiment - Matlab controller complexity and steady-state 3.1 Consider the satellite-attitude control problem shown in...

    Please answer all the questions with MATLAB and also upload the code. Thanks. 3 Experiment - Matlab controller complexity and steady-state 3.1 Consider the satellite-attitude control problem shown in following figure where the normalized parameters are J 10 spacecraft inertia; N-m-sec2 /rad erreference satellite attitude; rad actual satellite attitude; rad Hy 1 sensor scale; factor volts/rad Hr = 1 reference sensor scale factor ; volts/rad w= disturbance torque: N-m H, D(s) Js Figure 4: Satellite attitude control Suppose kP =...

  • Problem 3. (15 points) Consider the feedback system in Figure 3, where G(s)1 (s -1)3 Ge(s)...

    Problem 3. (15 points) Consider the feedback system in Figure 3, where G(s)1 (s -1)3 Ge(s) G(s) Figure 3: Problem 3 1. Let the compensator be given by a pure gain, ie, Ge(s)-K, K 0 (a) Draw the root locus of the compensated system (b) Is it possible to stabilize the systems by selecting K appropriately? If so, find the range for K such that the closed-loop system is BIBO stable. If not, explain. 2. This time, let the compensator...

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