Design a controller using Matlab

In summary, the conversation discusses designing a controller in Matlab for a given plant that has a desired velocity error and phase margin. The plant is already of type-1 and has a pole at s=0, so the controller does not need to add additional poles at s=0. The chosen lead/lag compensator is used to tune the phase margin, and the Matlab sisotool is used to adjust the phase margin to 60 degrees. The calculated controller gain K is 8, and the compensator is restructured to have two poles and two zeros. The closed-loop characteristics are found to be satisfactory.
  • #1
PhysicoRaj
Gold Member
538
49

Homework Statement


For the plant:
##G(s)=\frac{1}{s(s+2)(0.4s+1)}##
Design a controller in Matlab such that ##K_v=4## , phase margin = ##60^o## and zero steady state error for step input.

Homework Equations


##e_{ss} = Lim_{s->0} \frac{s R(s)}{1+D(s)G(s)}##
Lead/Lag compensator structure: ##D(s) = K\frac{(\alpha s + 1)}{(\beta s + 1)}##

The Attempt at a Solution


From the data that ##e_{ss}=0## for step input and finite non zero velocity error for ramp reference, the system desired is type-1. The plant already has a pole at ##s=0##, hence the controller need not add poles at ##s=0## .
I chose the lead/lag compensator to tune the phase margin.
Using MATLAB I found the plant has a phase margin of ##65.7499^o## at phase crossover of ##0.4777 rad s^{-1}##.
To find the controller gain K:
using ##R(s) = \frac{1}{s^2}## (for ramp input) and ##e_{ss} = \frac{1}{4}## in the steady state error equation, I got ##K = 8## .
So my compensator becomes:
##D(s) = 8\frac{(\alpha s + 1)}{(\beta s + 1)}##

I loaded the plant in the Matlab sisotool and tried adjusting the phase margin to 60 degrees but its not going beyond 46 degrees:
attachment1.JPG


While with controller gain K around 2, the pm can be adjusted to 60 degrees:
attachment2.JPG


Is my choice of controller or controller gain wrong? Or have i missed anything in this route? Are other assumptions and calculations right? How do I proceed further?
Also, how would I verify the steady state error of the closed loop system after design (from the ramp response? [attachment3]) .

Thank you.
 

Attachments

  • attachment3.JPG
    attachment3.JPG
    35.3 KB · Views: 375
  • #3
I finally solved it. I assumed the controller gain ##K = 8## to be the inherent gain of the plant and for that plant designed a restructured controller of the form:
##D(s) = \frac{(\alpha_1 s+1)(\alpha_2 s+1)}{(\beta_1 s+1)(\beta_2 s+1)}##
leaving with two poles and two zeros.

fig6_siso.JPG


Closed loop characteristics were satisfactory.

fig4_step.JPG


Thanks.
 

Attachments

  • fig5_ramp.JPG
    fig5_ramp.JPG
    28.4 KB · Views: 354

1. How do I design a controller using Matlab?

To design a controller using Matlab, you will first need to have a basic understanding of control systems and the principles behind them. Then, you can use Matlab's Control System Toolbox to design and analyze your controller. This toolbox offers various tools and functions for designing and simulating control systems, such as PID controllers, state-space controllers, and frequency response plots.

2. What are the steps involved in designing a controller using Matlab?

The steps involved in designing a controller using Matlab are as follows:
1. Define your system's input and output variables
2. Model your system using either transfer function or state-space representation
3. Determine the performance requirements for your controller
4. Choose a suitable controller type (PID, state-space, etc.)
5. Use Matlab's Control System Toolbox to design and tune your controller
6. Simulate and analyze the performance of your controller
7. Implement the controller in your system and fine-tune if necessary.

3. What types of controllers can I design using Matlab?

Matlab's Control System Toolbox allows you to design various types of controllers, including PID controllers, state-space controllers, and lead-lag controllers. You can also design custom controllers by combining different control techniques and using the toolbox's functions for creating transfer functions and state-space models.

4. Can I design a controller for a nonlinear system using Matlab?

Yes, Matlab's Control System Toolbox offers tools and functions for designing controllers for both linear and nonlinear systems. You can use the toolbox's nonlinear control design functions to design controllers for systems with complex dynamics and nonlinearity.

5. How can I evaluate the performance of my controller in Matlab?

You can evaluate the performance of your controller in Matlab by simulating the closed-loop system using the toolbox's simulation functions. This will allow you to see how your controller responds to different inputs and disturbances. You can also analyze the performance using various metrics, such as rise time, settling time, and steady-state error, using the toolbox's analysis functions.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
800
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top