Question

Write a MATLAB program that w design a PD compensator assuming second-order approximations as follows. . Allow the user to in

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

Hello,

For the first part of taking input from user you can use the input function to take the input as follows :

input_text = 'Enter desired peak overshoot : ';
peak_overshoot = input(input_text);
input_text = 'Enter Peak Time : ';
peak_time = input(input_text);
input_text = 'Enter Gain Required : ';
gain_req = input(input_text);

For the next parts, take a random range of input for the input e(t) lets name it input_data. You can define this using linspace or start:step:stop methods.

Then take its laplace transform in MATLAB using :

answer = laplace(input_data);

Another way is defining input_data in terms of symbols like

syms a t
input_data = exp(-a*t);
answer = laplace(input_data);

The output of the the PD controller is then defined as :

output = answer * (Kp) * (1 + (Kd/Kp)*1i*w);

This output is then multiplied with G which is as defined in the question as :

G = K / (1i*w * (1i*w + 2) * (1i*w + 6));

So final output is C = output * G;

For displaying the plots use the matlab plot command.

plot (x,y); where x is the values you want on the X-axis and y the corresponding values on the Y-axis.

But for the bode plot you would like to go for a semilogy graph instead between gain and frequency so :

semilogy(frequency,gain);

where frequency is the range of values of "s" and gain will be final_output / input plotted with frequency on X-axis and gain in dB / 20 plotted along the Y-axis.

Required phase margin and bandwidth can be calculated using the cursor in the matlab plot that you get which displays the X and Y values of a point you select on the graph, difference between the X-axis values for gain 0 or the Y-axis plot of 1/20 will be giving you the bandwidth while phase margin can be calculated using the slope of the line, -20dB/decade being 90 degree and -40dB/decade being 180 degrees.

Poles and zeros are plotted when you plot the graph itself, real zeros are the points where the plot starts increasing its slope towards a more positive value and real poles are the points where the graph changes its slope towards the more negative value. All this can be found out using the cursor in matlab figure.

Add a comment
Know the answer?
Add Answer to:
Write a MATLAB program that w design a PD compensator assuming second-order approximations as fol...
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
  • 2) Problem 9.18 For Part (b) design a PD compensator instead of a lead compensator 18....

    2) Problem 9.18 For Part (b) design a PD compensator instead of a lead compensator 18. Consider the unity feedback system of Figure P9.1, with K GS (s +3)(s + 5) a. Show that the system cannot operate with a settling time of 2/3 second and a percent over- shoot of 1.5 % with a simple gain adjustment. b. Design a lead compensator so that the system meets the transient response characteristics of Part a. Specify the compensator's pole, zero,...

  • Design of PID compensator S. Design of PID (Proportional-plus-Integral and Derivative) Compensator ds/i (st3)(s+6 s+10) and...

    Design of PID compensator S. Design of PID (Proportional-plus-Integral and Derivative) Compensator ds/i (st3)(s+6 s+10) and unity feedback Design a PID s+10) An uncompensated system has a gain controller so that the system can operate with a peak time that is two thirds that of the uncompensated system at 20% overshoot and with zero steady-state error for a step input. system has a gain Uncompensated system Compensated system K (s+8 G(s) = (s+3)(s+6)(s+10) ,H(s) = 1 20% OS; desired T,-23a...

  • C(s) G(s) Figure 1: A block diagram for Problems 1-4 For the given unity feedback system with G(s...

    C(s) G(s) Figure 1: A block diagram for Problems 1-4 For the given unity feedback system with G(s) - s 5)3' (a) Find the location of the dominant poles to yield a 1.2 second settling time and overshoot of 15% (b) If a compensator with a zero at-1 is used to achieve the conditions of Part a, what must be the angular contribution of the compensator pole be? (c) Find the location of the compensator pole. (d) Find the gain...

  • 13. Consider the unity feedback system of Figure P11.1 with G(s) s(s+5s 20) The uncompensated sys...

    13. Consider the unity feedback system of Figure P11.1 with G(s) s(s+5s 20) The uncompensated system has about 55% overshoot and a peak time of 0.5 second when K 10. Do the following: [Section: 11.4] . Use frequency response methods to design a lead compensator to reduce the percent overshoot to 10%, while keeping the peak time and steady-state error about the same or less. Make any required second-order approximations. b. Use MATLAB or any other computer MATLAB ML program...

  • 3. Consider a second order system with transfer fuction P(s) = 2-B2 with a = 4000...

    3. Consider a second order system with transfer fuction P(s) = 2-B2 with a = 4000 and ß = 25. Design a compensator assuming unity feedback for the gain and phase margins you apriori specify (try to achieve as high as possible). Compute the poles and zeros of the closed-loor system. Plot the Nyquist plot of your compensator and verify that the Nyquist criterion is satisfied. Plot the step response of the closed-loop system and specify maximum overshoot, peak time,...

  • these are useful formjlas to solve this problem please show all work! thank you 2.) Design...

    these are useful formjlas to solve this problem please show all work! thank you 2.) Design compensator for zero steady-state error with 10% overshoot and 0.4s of Peak time for the open loop transfer function G specified below. Sketch the comparison between uncompensated and compensated responses. Also compare their root locus. Clearly mention the improvements achieved after compensation. (50 points = 10 pts for analyzing uncompensated system+5 pts for identifying controller type+25 pts for controller design+5 pts for response comparison+5...

  • Please solve these using matlab Problem 1 Given the transfer functions e S +5 (a) C(s)...

    Please solve these using matlab Problem 1 Given the transfer functions e S +5 (a) C(s) 20 S + 20 (b) Use the step function to determine the time constant and rise time for each system. Note: estimate these values from the plot and do not use the stepinfo function. Problem 2 Given the transfer function 100 G(S) = 22 +45 + 25 a. Use the plot resulting from the step function in MATLAB to determine the percent overshoot, settling...

  • % We can couple the design of gain on the root locus with a % step-response...

    % We can couple the design of gain on the root locus with a % step-response simulation for the gain selected. We introduce the command % rlocus(G,K), which allows us to specify the range of gain, K, for plotting the root % locus. This command will help us smooth the usual root locus plot by equivalently % specifying more points via the argument, K. Notice that the first root locus % plotted without the argument K is not smooth. We...

  • This was given with a previous answer...if that helps with some of the solving? Need final answer...

    this was given with a previous answer...if that helps with some of the solving? Need final answers boxed and a screenshot of MATLAB code Aircraft Pitch Control (3/2) Consider the aircraft model shown in Figure 1. We will assume that the aircraft is in steady-cruise at constant altitude and velocity; thus, the thrust, drag, weight and lift forces balance each other in the x- and y directions. We will also assume that a change in pitch angle will not change...

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